Silo32

Gheads.sk

Jul 22nd, 2023
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. on load:
  2. register new shaped recipe for golden apple named "&7[&6&lThe Golden Apple&7]" using gold ingot, gold ingot, gold ingot, gold ingot, player head, gold ingot, gold ingot, gold ingot, gold ingot with id "golden_head" in group "custom_uhc"
  3.  
  4. on consume:
  5. if event-item is a golden apple:
  6. if name of player's tool contains "&7[&6&lThe Golden Apple&7]":
  7. remove regeneration from player
  8. remove absorption from player
  9. execute console command "/effect give %player% minecraft:regeneration 5 2"
  10. apply absorption to player for 2 minutes
  11.  
  12. on death of a player:
  13. if {heads} are set:
  14. set {_temp} to the block below the victim
  15. set block 1 meter above {_temp} to oak fence
  16. set block 2 meter above {_temp} to victim's skull
  17.  
  18. command /goldenheads [<text>]:
  19. aliases: /gheads, /ghead, /heads, /head, /gh
  20. permission: skript.op
  21. trigger:
  22. if arg-1 is set:
  23. if arg-1 is "on" or "enable":
  24. if {heads} is set:
  25. send "&eGolden Heads&a are already &a&lenabled"
  26. else:
  27. set {heads} to true
  28. send "&eGolden Heads&a are now &a&lenabled"
  29. else if arg-1 is "off" or "disable":
  30. if {heads} is set:
  31. delete {heads}
  32. send "&eGolden Heads&a are now &c&ldisabled"
  33. else:
  34. send "&eGolden Heads&a are already &c&ldisabled"
  35. else if arg-1 is "toggle" or "t":
  36. if {heads} is set:
  37. delete {heads}
  38. send "&eGolden Heads&a are now &c&ldisabled"
  39. else:
  40. set {heads} to true
  41. send "&eGolden Heads&a are now &a&lenabled"
  42. else if arg-1 is "help" or "h":
  43. send "&a/goldenheads &aon&7/&coff&7/&etoggle"
  44. else:
  45. make command sender execute command "/gh h"
  46. else:
  47. make command sender execute command "/gh t"
Advertisement
Add Comment
Please, Sign In to add comment