Advertisement
Builder4Life

Untitled

Dec 9th, 2022
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. function commandgen(cmd: text):
  2. create script "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
  3. write "command /%{_cmd}%:" at line 1 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
  4. write " trigger:" at line 2 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
  5. write " set {_waitedcommand} to difference between {spawn.teleport.%player%.lastused} and now" at line 3 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
  6. write " if {_waitedcommand} is less than 5 seconds:" at line 4 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
  7. write " send formatted ""&c&lᴇᴍᴘʏʀᴇᴀɴ &8» &fYou cannot use this command for a difference between &75 seconds &fand &7%{_waitedcommand}%""" at line 5 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
  8. write " stop" at line 6 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
  9. write " else:" at line 7 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
  10. write " if {global.%{_cmd}%.spawn} is set:" at line 8 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
  11. write " teleport player to {global.%{_cmd}%.spawn}" at line 9 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
  12. write " set {spawn.teleport.%player%.lastused} to now" at line 10 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
  13. write " send """ at line 11 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
  14. write " send formatted ""&c&lᴇᴍᴘʏʀᴇᴀɴ &8» &fYou teleported to %{_cmd}%"" to player" at line 12 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
  15. write " send """ at line 13 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
  16. write " else:" at line 14 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
  17. write " if player has permission ""mineplex.admin"":" at line 15 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
  18. write " send formatted ""&c&lᴇʀʀᴏʀ &8» &fThere is no spawn. Create one using &c/manager setspawn <name>""" at line 16 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
  19. write " send formatted ""&c&lᴇʀʀᴏʀ &8» &cThere was an error accessing your order.""" at line 17 to file "plugins/Skript/scripts/Spawns/%{_cmd}%.sk"
  20. execute console command "sk reload /Spawns/"
  21.  
  22.  
  23.  
  24.  
  25. command /test1:
  26. trigger:
  27.  
  28. if {_waitedcommand} is less than 5 seconds:
  29. send formatted "�c�l???????? �8� �fYou cannot use this command for a difference between �75 seconds �fand �7<none>"
  30. stop
  31. else:
  32. if {global.test1.spawn} is set:
  33. teleport player to {global.test1.spawn}
  34.  
  35. send "
  36. send formatted "�c�l???????? �8� �fYou teleported to test1" to player
  37. send "
  38. else:
  39. if player has permission "mineplex.admin":
  40. send formatted "�c�l????? �8� �fThere is no spawn. Create one using �c/manager setspawn <name>"
  41. send formatted "�c�l????? �8� �cThere was an error accessing your order."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement