IchinoseYuki

IY-Core.sk v1.1

Dec 11th, 2019
29
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.1"
  5.  
  6. on connect:
  7. {IY::config::%uuid of player%::language} is not set
  8. set {IY::config::%uuid of player%::language} to {IY::config::default::language}
  9. {IY::config::default::language} is not set
  10. set {IY::config::%uuid of player%::language} to "en"
  11. player's current language is "ja_jp"
  12. set {IY::config::%uuid of player%::language} to "ja"
  13.  
  14. command /config [<string>]:
  15. aliases: /c, /cf, /cfg
  16. trigger:
  17. if arg is set:
  18. if player doesn't have permission "skript.iy.config":
  19. send "&4Error: &rYou don't have permission." if {IY::config::%uuid of player%::language} is "en"
  20. send "&4失敗: &rそのコマンドを使用する権限がありません。" if {IY::config::%uuid of player%::language} is "ja"
  21. stop
  22. if arg is not "default" or "dflt" or "df" or "d":
  23. send "&4Error: &rIncorrect argument for command.%nl%&0: &7/config &c&n%arg-1%" if {IY::config::%uuid of player%::language} is "en"
  24. send "&4失敗: &rコマンドの引数の指定が間違っています。%nl%&0: &7/config &c&n%arg-1%" if {IY::config::%uuid of player%::language} is "ja"
  25. stop
  26. open chest with 1 row named "Config -Default-" to player if {IY::config::%uuid of player%::language} is "en"
  27. open chest with 1 row named "詳細設定 -デフォルト-" to player if {IY::config::%uuid of player%::language} is "ja"
  28. wait a tick
  29. if {IY::config::%uuid of player%::language} is "en":
  30. 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"
  31. 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"
  32. set slot 4 of player's current inventory to player head item with nbt "{SkullOwner:{Id:""7d0630c3-23bf-4e0b-b4ad-b4f5bef7b97f"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvY2ZmYzk3N2NjN2UxMGU1NjRhMDk2MzhhNTNiYmM0YzU0YzljOGRhYzc0NTBiYTNkZmEzYzkwOTlkOTRmNSJ9fX0=""}]}}}" named "&eUnset" with lore "&7Click to change." if {IY::config::default::language} is not set
  33. if {IY::config::%uuid of player%::language} is "ja":
  34. 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"
  35. 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"
  36. set slot 4 of player's current inventory to player head item with nbt "{SkullOwner:{Id:""7d0630c3-23bf-4e0b-b4ad-b4f5bef7b97f"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvY2ZmYzk3N2NjN2UxMGU1NjRhMDk2MzhhNTNiYmM0YzU0YzljOGRhYzc0NTBiYTNkZmEzYzkwOTlkOTRmNSJ9fX0=""}]}}}" named "&e未設定" with lore "&7クリックで変更" if {IY::config::default::language} is not set
  37. stop
  38. open chest with 1 row named "Config" to player if {IY::config::%uuid of player%::language} is "en"
  39. open chest with 1 row named "詳細設定" to player if {IY::config::%uuid of player%::language} is "ja"
  40. wait a tick
  41. 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"
  42. 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"
  43.  
  44. on tab complete:
  45. set {_args::*} to substring of event-string from 2 to length of event-string split at " "
  46. {_args::1} is "config" or "c" or "cf" or "cfg" #label
  47. if size of {_args::*} is 2: #arg 1
  48. set {_comp::*} to "default"
  49. loop {_comp::*}:
  50. set {_size} to length of {_args::2}
  51. if the first {_size} characters of {_args::2} is the first {_size} characters of loop-value:
  52. add loop-value to completions
  53. if the first 1 characters of {_args::2} is not set:
  54. add "default" to completions
  55.  
  56. on inventory click:
  57. name of current inventory is "Config" or "詳細設定"
  58. clicked item is set
  59. play sound "block.lever.click" with volume 0.5 and pitch 1.5 at player for player
  60. if clicked slot is 4:
  61. if {IY::config::%uuid of player%::language} is "en":
  62. set {IY::config::%uuid of player%::language} to "ja"
  63. else:
  64. set {IY::config::%uuid of player%::language} to "en"
  65. execute player command "/config"
  66.  
  67. on inventory click:
  68. name of current inventory is "Config -Default-" or "詳細設定 -デフォルト-"
  69. clicked item is set
  70. play sound "block.lever.click" with volume 0.5 and pitch 1.5 at player for player
  71. if clicked slot is 4:
  72. if {IY::config::default::language} is "en":
  73. set {IY::config::default::language} to "ja"
  74. else if {IY::config::default::language} is "ja":
  75. clear {IY::config::default::language}
  76. else:
  77. set {IY::config::default::language} to "en"
  78. execute player command "/config default"
RAW Paste Data