Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. ===========================
  2. MANA
  3. SKRIPT
  4. =============================
  5.  
  6. variables:
  7. {health.%player%} = %health%
  8. {healthmax.%player%} = 100
  9. {defence.%player%} = 0
  10. {mana.%player%} = 100
  11. {manasec.%player%} = 1
  12. {manamax.%player%} = 100
  13. {manavar.%player%} = 0
  14.  
  15. on join:
  16. if {health.%player%} is not set:
  17. set {health.%player%} to 100
  18. #stats(player)
  19. while player is online:
  20. loop 4 times:
  21. wait 2 seconds
  22. set action bar of player to "&7Mana: &b%{mana.%player%}% &7| &b%{manamax.%player%}%"
  23. if {health.%player%} < {healthmax.%player%}:
  24. wait 30 seconds
  25. add 18 to {health.%player%}
  26. if {health.%player%} > {healthmax.%player%}:
  27. set {health.%player%} to {healthmax.%player%}
  28. if {mana.%player%} is less than {manamax.%player%}:
  29. add {manasec.%player%} to {mana.%player%}
  30. set {manavar.%player%} to {manamax.%player%}
  31. add 1 to {manavar.%player%}
  32. if {mana.%player%} is greater than {manamax.%player%}:
  33. set {mana.%player%} to {manamax.%player%}
  34.  
  35. every second in world "world":
  36. loop all players:
  37. if {mana.%loop-player%} is less than {manamax.%loop-player%}:
  38. add {manasec.%loop-player%} to {mana.%loop-player%}
  39. set {manavar.%loop-player%} to {manamax.%loop-player%}
  40. add 1 to {manavar.%loop-player%}
  41. if {mana.%loop-player%} is greater than {manamax.%loop-player%}:
  42. set {mana.%loop-player%} to {manamax.%loop-player%}
  43.  
  44. command /setmanasec [<number>]:
  45. trigger:
  46. set {manasec.%player%} to arg-1
  47.  
  48. ==============================
  49. HEALING WAND
  50. SKRIPT
  51. ===============================
  52. on join:
  53. set {wohcd::%player%} to 0
  54.  
  55. on right click with stick:
  56. if name of player's tool is "&5Wand of Hearts":
  57. if {wohcd::%player%} is 0:
  58. if {mana.%player%} is greater than 40:
  59. add 12 to {wohcd::%player%}
  60. remove 40 from {mana.%player%}
  61. loop 4 times:
  62. heal player by 10
  63. execute console command "/execute at %player% run particle minecraft:instant_effect ~ ~1 ~ 0 0 0 0.1 100"
  64. execute console command "/execute at %player% run particle minecraft:heart ~ ~3 ~ 0 0 0 0.1 100"
  65. wait 1 second
  66. wait 8 seconds
  67. set {wohcd::%player%} to 0
  68. else:
  69. send "&cThe ability is on cooldown." to player
  70.  
  71. else:
  72. send "&cNot Enough Mana!" to player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement