IchinoseYuki

IY-Core.sk v1.0

Oct 25th, 2019
44
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Written by IchinoseYuki (Discord:一ノ瀬雪#1027)
  2.  
  3. on script load:
  4. broadcast "&e&l&k|||&9&l[&b&lIchinoseYuki Skript - Core System&9&l]&e&l&k|||&r &7Ver.1.0"
  5.  
  6. on connect:
  7. set {IY::config::%uuid of player%::language} to {IY::config::default::language} if {IY::config::%uuid of player%::language} is not set
  8.  
  9. on script load:
  10. set {IY::config::default::language} to "en" if {IY::config::default::language} is not set
  11.  
  12. command /config [<string>]:
  13. aliases: /c, /cf, /cfg
  14. trigger:
  15. if arg is set:
  16. if arg is not "default" or "dflt" or "df" or "d":
  17. send "&4Error: &rIncorrect argument for command.%nl%&0: &7/config &c&n%arg-1%" if {IY::config::%uuid of player%::language} is "en"
  18. send "&4失敗: &rコマンドの引数の指定が間違っています。%nl%&0: &7/config &c&n%arg-1%" if {IY::config::%uuid of player%::language} is "ja"
  19. stop
  20. if player doesn't have permission "skript.iy.config":
  21. send "&4Error: &rYou don't have permission." if {IY::config::%uuid of player%::language} is "en"
  22. send "&4失敗: &rそのコマンドを使用する権限がありません。" if {IY::config::%uuid of player%::language} is "ja"
  23. stop
  24. open chest with 1 row named "Config -Default-" to player if {IY::config::%uuid of player%::language} is "en"
  25. open chest with 1 row named "詳細設定 -デフォルト-" to player if {IY::config::%uuid of player%::language} is "ja"
  26. wait a tick
  27. if {IY::config::%uuid of player%::language} is "en":
  28. set slot 4 of player's current inventory to player head item with nbt "{SkullOwner:{Id:""3c30484a-76d3-4cfe-88e5-e7599bc9ac4d"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGNhYzk3NzRkYTEyMTcyNDg1MzJjZTE0N2Y3ODMxZjY3YTEyZmRjY2ExY2YwY2I0YjM4NDhkZTZiYzk0YjQifX19""}]}}}" named "&eEnglish" with lore "&7Click to change." if {IY::config::default::language} is "en"
  29. set slot 4 of player's current inventory to player head item with nbt "{SkullOwner:{Id:""6a140d7c-ecaf-48ec-879b-3da8d7f1d316"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDY0MGFlNDY2MTYyYTQ3ZDNlZTMzYzQwNzZkZjFjYWI5NmYxMTg2MGYwN2VkYjFmMDgzMmM1MjVhOWUzMzMyMyJ9fX0=""}]}}}" named "&eJapanese" with lore "&7Click to change." if {IY::config::default::language} is "ja"
  30. if {IY::config::%uuid of player%::language} is "ja":
  31. set slot 4 of player's current inventory to player head item with nbt "{SkullOwner:{Id:""3c30484a-76d3-4cfe-88e5-e7599bc9ac4d"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGNhYzk3NzRkYTEyMTcyNDg1MzJjZTE0N2Y3ODMxZjY3YTEyZmRjY2ExY2YwY2I0YjM4NDhkZTZiYzk0YjQifX19""}]}}}" named "&e英語" with lore "&7クリックで変更" if {IY::config::default::language} is "en"
  32. set slot 4 of player's current inventory to player head item with nbt "{SkullOwner:{Id:""6a140d7c-ecaf-48ec-879b-3da8d7f1d316"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDY0MGFlNDY2MTYyYTQ3ZDNlZTMzYzQwNzZkZjFjYWI5NmYxMTg2MGYwN2VkYjFmMDgzMmM1MjVhOWUzMzMyMyJ9fX0=""}]}}}" named "&e日本語" with lore "&7クリックで変更" if {IY::config::default::language} is "ja"
  33. stop
  34. open chest with 1 row named "Config" to player if {IY::config::%uuid of player%::language} is "en"
  35. open chest with 1 row named "詳細設定" to player if {IY::config::%uuid of player%::language} is "ja"
  36. wait a tick
  37. set slot 4 of player's current inventory to player head item with nbt "{SkullOwner:{Id:""3c30484a-76d3-4cfe-88e5-e7599bc9ac4d"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGNhYzk3NzRkYTEyMTcyNDg1MzJjZTE0N2Y3ODMxZjY3YTEyZmRjY2ExY2YwY2I0YjM4NDhkZTZiYzk0YjQifX19""}]}}}" named "&eEnglish" with lore "&7Click to change." if {IY::config::%uuid of player%::language} is "en"
  38. set slot 4 of player's current inventory to player head item with nbt "{SkullOwner:{Id:""6a140d7c-ecaf-48ec-879b-3da8d7f1d316"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDY0MGFlNDY2MTYyYTQ3ZDNlZTMzYzQwNzZkZjFjYWI5NmYxMTg2MGYwN2VkYjFmMDgzMmM1MjVhOWUzMzMyMyJ9fX0=""}]}}}" named "&e日本語" with lore "&7クリックで変更" if {IY::config::%uuid of player%::language} is "ja"
  39.  
  40. on tab complete:
  41. set {_args::*} to substring of event-string from 2 to length of event-string split at " "
  42. {_args::1} is "config" or "c" or "cf" or "cfg" #label
  43. if size of {_args::*} is 2: #arg 1
  44. set {_comp::*} to "default"
  45. loop {_comp::*}:
  46. set {_size} to length of {_args::2}
  47. if the first {_size} characters of {_args::2} is the first {_size} characters of loop-value:
  48. add loop-value to completions
  49. if the first 1 characters of {_args::2} is not set:
  50. add "default" to completions
  51.  
  52. on inventory click:
  53. name of current inventory is "Config" or "詳細設定"
  54. clicked item is set
  55. play sound "block.lever.click" with volume 0.5 and pitch 1.5 at player for player
  56. if clicked slot is 4:
  57. if {IY::config::%uuid of player%::language} is "en":
  58. set {IY::config::%uuid of player%::language} to "ja"
  59. else:
  60. set {IY::config::%uuid of player%::language} to "en"
  61. execute player command "/config"
  62.  
  63. on inventory click:
  64. name of current inventory is "Config -Default-" or "詳細設定 -デフォルト-"
  65. clicked item is set
  66. play sound "block.lever.click" with volume 0.5 and pitch 1.5 at player for player
  67. if clicked slot is 4:
  68. if {IY::config::default::language} is "en":
  69. set {IY::config::default::language} to "ja"
  70. else:
  71. set {IY::config::default::language} to "en"
  72. execute player command "/config default"
RAW Paste Data