IY-Sudo.sk v1.0

Nov 16th, 2019
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Written by IchinoseYuki (Discord:一ノ瀬雪#1027)
  2. #Request: IY-Core Ver:1.0 or later
  4. on script load:
  5. broadcast "&e&l&k|||&9&l[&b&lIchinoseYuki Skript - Sudo&9&l]&e&l&k|||&r &7Ver.1.0"
  7. command /sudo [<string>]:
  8. trigger:
  9. if player doesn't have permission "skript.iy.sudo":
  10. sender is a player
  11. send "&4Error: &rYou don't have permission." if {IY::config::%uuid of player%::language} is "en"
  12. send "&4失敗: &rそのコマンドを使用する権限がありません。" if {IY::config::%uuid of player%::language} is "ja"
  13. stop
  14. if arg is not set:
  15. send "&4Error: &rSpecify argument for command." if {IY::config::%uuid of player%::language} is "en"
  16. send "&4失敗: &rコマンドの引数を指定してください。" if {IY::config::%uuid of player%::language} is "ja"
  17. stop
  18. set {_AG} to arg
  19. set {_AG::*} to {_AG} split at " "
  20. set {_PL} to {_AG::1} parsed as player
  21. set {_CM} to last length of arg - length of {_AG::1} + -1 characters of {_AG}
  22. execute {_PL} command "%{_CM}%"
  23. replace all "/" with "" in {_CM}
  24. send "&aSuccess: &rHave %{_PL}% execute /%{_CM}%." if {IY::config::%uuid of player%::language} is "en"
  25. send "&a成功: &r%{_PL}%に/%{_CM}%を実行させました。" if {IY::config::%uuid of player%::language} is "ja"
  27. on tab complete:
  28. set {_args::*} to substring of event-string from 2 to length of event-string split at " "
  29. {_args::1} is "sudo"
  30. if size of {_args::*} is 2:
  31. loop all players:
  32. loop-player is not player
  33. add "%loop-player%" to {_comp::*}
  34. loop {_comp::*}:
  35. set {_size} to length of {_args::2}
  36. if the first {_size} characters of {_args::2} is the first {_size} characters of loop-value:
  37. add loop-value to completions
  38. if completions is not set:
  39. add {_comp::*} to completions
RAW Paste Data