Jump to content

Chat skripts and /spawn


aaaCya

Recommended Posts

options:
	server: &7[&bExample&7]&7
	no-perm: &cNo perms!.
	usage: &b&lUSAGE &7|

command /sc [<text>]:
	aliases:staffchat
	permission: staff.chat
	permission message: "{@no-perm}"
	trigger:
		if arg-1 is set:
			send "& &f%player's display name% &8| &f%arg-1%" to all players where [input has permission "staff"]
		else:
			if {staff.chat::%player's uuid%} is not set:
				set {staff.chat::%player's uuid%} to true
				send "&bSC &7| &bStaff chat &aenabled&b."
			else:
				delete {staff.chat::%player's uuid%}
				send "&bSC &7| &bStaff chat &cdisabled&b."

on chat:
	if {staff.chat::%player's uuid%} is set:
		cancel event
		send "&bSC &7| &f%player's display name% &7| &b%message%" to all players where [input has permission "staff"]

on chat:
	set {_m} to uncolored message
	set {_mes::*} to {_m} split at ""
	if {_mes::1} is "@":
		cancel event
		replace all "@" with "" in message
		execute player command "/sc %message%"

 

 

options:
    p: &7[&b!&7]&7
    msg: {@p} &cNo perms!
    version: .0.

on chat:
    if player does not have permission "staff.chat":
        if {lock} is set:
            cancel event
            send "{@p} &bYou can not speak while chat is &4&lLOCKED&b!"

command /chat [<text>]:
    permission: staff.chat
    permission message: {@msg}
    trigger:
        if arg-1 is "help":
            send "&b/chat help &7→ &bShows this help page!"
            send "&b/chat lock &7→ &bLocks the chat!"
            send "&b/chat clear &7→ &bClears the chat!"
        if arg-1 is "mute":
            if {lock} is set:
                delete {lock}
                broadcast "{@p} &bThe chat has been &2&lUNLOCKED&b by &b%player%!"
            else:
                set {lock} to true
                broadcast "{@p} &bThe chat has been &4&lLOCKED&b by &b%player%!"
        if arg-1 is "clear":
            loop 100 times:
                broadcast " "
            broadcast "{@p} &bThe chat has been &4&lCLEARED&b by &b%player%!"

 

on join:
	teleport player to {spawn}
	
command /setspawn:
	trigger:
		if player has permission "spawn.set":
			if {spawn} is not set:
				send "&7[&bExample&7] &aThe spawn has been set"
				set {spawn} to location of player
				stop
			
command /delspawn:
	trigger:
		if player has permission "spawn.delete":
			if {spawn} is set:
				send "&7[&bExample&7] &cThe spawn has been deleted"
				delete {spawn}
				stop

			
command /spawn:
	trigger:
		teleport player to {spawn}
		send "&7[&bExample&7] &aYou have been teleported to spawn"

 

 

Note: I once again made the skripts overnight, so there might be errors.

Recommended/required addons: TusKe, Skrayfall, skQuery

Edited by pizzaschut
I used to play Minehut I guess?
Yeah, I still watch the forums for some reason. (15/5/2023)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...