Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Monsters Inc.
- # WiNtErHaX9
- options:
- P : &8[&cMonsters Inc&8]&f
- C : &f
- H : &6
- MaxAllowedDoors: 1000000 #Change to your liking, how many doors can people make?
- MaxAllowedPlaces: 100000
- Perm: skript.op
- command /monstersinc [<text>] [<text>]:
- trigger:
- if arg-1 is "enable" or "on":
- if {Inc.On} is not set:
- command sender has permission "{@Perm}":
- set {Inc.On} to true
- broadcast "{@P} Enabled by: {@H}%command sender%"
- command "/monstersinc sound mob.cat.purr"
- else:
- message "{@P} No permissions!"
- else:
- message "{@P} Already enabled!"
- else if arg-1 is "disable" or "off":
- if {Inc.On} is true:
- command sender has permission "{@Perm}":
- delete {Inc.On}
- broadcast "{@P} Disabled by: {@H}%command sender%"
- command "/monstersinc sound mob.cat.purr"
- else:
- message "{@P} Already disabled!"
- else if arg-1 is "toggle" or "switch":
- command sender has permission "{@Perm}":
- if {Inc.On} is not set:
- command "/monstersinc on"
- else:
- command "/monstersinc off"
- else if arg-1 is "reset":
- delete {Doors::*}
- delete {Doors.Used::*}
- delete {Doors.Placed}
- delete {Doors.Teleport::*}
- delete {Doors.IPlaced::*}
- broadcast "{@P} Reset!"
- else if arg-1 is "sound":
- set {_sound} to arg-2
- loop all players:
- execute console command "playsound %{_sound}% %loop-player% ~ ~ ~ 1 1 1"
- on place:
- {Inc.On} is true:
- event-block is door:
- if {Doors.IPlaced::%event-player%} is greater than {@MaxAllowedPlaces}:
- message "{@P} You have already placed maximum doors!"
- cancel the event
- stop trigger
- else:
- add 1 to {Doors.Placed}
- add 1 to {Doors.IPlaced::%event-player%}
- message "{@P} You created door {@H}%{Doors.Placed}%!"
- set {_loc} to (location of the event-block)
- add {_loc} to {Doors.Teleport::*}
- on click:
- {Inc.On} is true:
- event-block is door:
- if {Doors.Placed} is greater than 1:
- if {Doors.Used::%event-player%} is greater than {@MaxAllowedDoors}:
- message "{@P} You used all your doors!"
- stop trigger
- else:
- set {_door} to (random element out of {Doors.Teleport::*})
- teleport (event-player) to ({_door})
- message "{@P} You were teleported to: {@H}%{_door}%!"
- add 1 to {Doors.Used::%event-player%}
- else:
- message "{@P} 1 more door needs to be placed!"
- on break:
- {Inc.On} is true:
- event-block is door:
- message "{@P} Can't do that!"
Advertisement
Add Comment
Please, Sign In to add comment