Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- P: &5[StS]&r
- command /SecondsToSave [<text>] [<integer>]:
- aliases: /sts
- permission: skript.sts
- trigger:
- if arg-1 is "on" or "enable":
- set {sts} to true
- set {sts.clear} to a random integer between 1 and arg-2
- broadcast "{@P} Enabled!"
- broadcast "{@P} Game length set to %arg-2% minutes!"
- if arg-1 is "off" or "disable":
- delete {sts}
- delete {sts.clear}
- broadcast "{@P} Disabled!"
- if arg-1 is "clear":
- set {sts.clear.number} to arg-2
- broadcast "{@P} You will have %arg-2% seconds to save!"
- if arg-1 is "start":
- if {sts} is not set:
- message "{@P} You need to enable StS!"
- message "{@P} /sts on"
- stop trigger
- if {sts} is true:
- loop {sts.clear} times:
- {sts} is true:
- wait 1 second
- loop {sts.clear.number} times:
- {sts} is true:
- {sts.clear.number} is greater than 0:
- broadcast "{@P} &4&l%{sts.clear.number}%&r seconds to save!"
- subtract 1 from {sts.clear.number}
- wait 1 minute
- loop all players:
- clear the loop-player's inventory
- if arg-1 is "chest" or "chests":
- if {sts.chest} is not set:
- set {sts.chest} to true
- broadcast "{@P} Chests enabled!"
- stop trigger
- if {sts.chest} is false:
- set {sts.chest} to true
- broadcast "{@P} Chests enabled!"
- stop trigger
- if {sts.chest} is true:
- set {sts.chest} to false
- broadcast "{@P} Chests disabled!"
- stop trigger
- on place of chest:
- if {sts.chest} is false:
- cancel the event
- message "{@P} You are not allowed to use chests!"
- on rightclick:
- block is a chest:
- if {sts.chest} is false:
- cancel the event
- message "{@P} You are not allowed to use chests!"
Advertisement
Add Comment
Please, Sign In to add comment