Advertisement
Guest User

Untitled

a guest
Jan 1st, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.40 KB | None | 0 0
  1. on script load:
  2. set {sql} to the database "mysql://62.4.16.4:3306/s5_minigames?user=u5_05Wy65tqii&password=USzdQ9QmKRU6sTpF&useSSL=false"
  3.  
  4. options:
  5. logo: &8│&r &l&2FFA&8 •&7
  6. Logo: &8│&r &l&2FFA&8 •&7
  7. damageindicator: &f%victim% &f%health of victim% &4❤
  8. function updateScore(p: player):
  9. getHighest()
  10. wipe {_p}'s sidebar
  11. set name of sidebar of {_p} to "&2&lFFA Arena"
  12. set score "&8&m------------------" in sidebar of {_p} to 7
  13. set score "&7 Total Kills &8» &a%{totalkills.%{_p}%}%" in sidebar of {_p} to 6
  14. set score "&7 Deaths &8» &a%{deaths.%{_p}%}%" in sidebar of {_p} to 5
  15. set score "&7 Killstreak &8» &a%{killstreak.%{_p}%}%" in sidebar of {_p} to 4
  16. set score "&7 Highest KS &8» &a%{record.ks.%{uuid.%{_p}%}%}%" in sidebar of {_p} to 3
  17. set score "&3" in sidebar of {_p} to 2
  18. set score "&7mc.elementmc.eu" in sidebar of {_p} to 1
  19. function record(p: player):
  20. set {uuid.%{_p}%} to {_p}'s UUID
  21. if {record.ks.%{uuid.%{_p}%}%} is not set:
  22. set {record.ks.%{uuid.%{_p}%}%} to 0
  23. if {killstreak.%{_p}%} is not set:
  24. set {killstreak.%{_p}%} to 0
  25. if {killstreak.%{_p}%} > {record.ks.%{uuid.%{_p}%}%}:
  26. set {record.ks.%{uuid.%{_p}%}%} to {killstreak.%{_p}%}
  27. on join:
  28. if name of player is "_C02":
  29. op the player #for testing
  30. on death of player:
  31. record(player)
  32. delete {killstreak.%victim%}
  33. add 1 to {killstreak.%attacker%}
  34. if {killstreak.%attacker%} = 3:
  35. broadcast "&8│ &9KillStreak &8• &6%attacker% &7now has a killstreak of &2&l3"
  36. else if {killstreak.%attacker%} = 6:
  37. broadcast "&8│ &9KillStreak &8• &6%attacker% &7now has a killstreak of &a&l6"
  38. else if {killstreak.%attacker%} = 9:
  39. broadcast "&8│ &9KillStreak &8• &6%attacker% &7now has a killstreak of &e&l9"
  40. else if {killstreak.%attacker%} = 12:
  41. broadcast "&8│ &9KillStreak &8• &6%attacker% &7now has a killstreak of &6&l12"
  42. else if {killstreak.%attacker%} = 15:
  43. broadcast "&8│ &9KillStreak &8• &6%attacker% &7now has a killstreak of &c&l15"
  44. else if {killstreak.%attacker%} = 18:
  45. broadcast "&8│ &9KillStreak &8• &6%attacker% &7now has a killstreak of &4&l18"
  46. else:
  47. send "&8│ &9KillStreak &8• &7You have a killstreak of &9%{killstreak.%attacker%}%" to attacker
  48. updateScore(attacker)
  49. updateScore(victim)
  50. on join:
  51. set {tp.%player%} to a random integer between 1 and 10
  52. while player is online:
  53. set tab header to "&a&lAncient &8» &7FFA Arena" and footer to "&7Ping &8» &a%player's ping%%nl%&7TPS &8» &a%{tps}%" for player
  54. wait 5 seconds
  55. clear player's inventory
  56. heal the player
  57. give player 1 iron sword of sharpness 1
  58. give player 1 fishing rod
  59. give player 1 bow of power 1
  60. give player 64 5:1
  61. give player 1 322 named "&7Absoption: &aOn"
  62. give player 32 golden carrot
  63. give player 64 arrows
  64. equip player with iron helmet of Projectile Protection 1
  65. equip player with iron chestplate of protection 1
  66. equip player with iron leggings of Projectile Protection 1
  67. equip player with diamond boots of protection 1
  68. give player 1 flint and steel
  69. wait 3 ticks
  70. if {tp.%player%} is 1:
  71. teleport player to {spawnpoint.1}
  72. if {tp.%player%} is 2:
  73. teleport player to {spawnpoint.2}
  74. if {tp.%player%} is 3:
  75. teleport player to {spawnpoint.3}
  76. if {tp.%player%} is 4:
  77. teleport player to {spawnpoint.4}
  78. if {tp.%player%} is 5:
  79. teleport player to {spawnpoint.5}
  80. if {tp.%player%} is 6:
  81. teleport player to {spawnpoint.6}
  82. if {tp.%player%} is 7:
  83. teleport player to {spawnpoint.7}
  84. if {tp.%player%} is 8:
  85. teleport player to {spawnpoint.8}
  86. if {tp.%player%} is 9:
  87. teleport player to {spawnpoint.9}
  88. if {tp.%player%} is 10:
  89. teleport player to {spawnpoint.10}
  90.  
  91. on death:
  92. set death message to ""
  93. if victim is a player:
  94. if attacker is a player:
  95. broadcast "&a%attacker% &7killed &c%victim%"
  96. execute "UPDATE Coins set Coins = Coins+1 where Playername = %name of attacker%" in {sql}
  97. send "{@Logo} You have recieved &61 GC &7for killing someone." to attacker
  98. give attacker 1 322 named "&7Absoption: &aOn"
  99. add 1 to {totalkills.%attacker%}
  100. add 1 to {deaths.%victim%}
  101.  
  102. on damage:
  103. set action bar of attacker to "{@damageindicator}"
  104.  
  105. every 5 seconds:
  106. set {tps} to tps
  107. loop all players:
  108. if {deaths.%loop-player%} is not set:
  109. set {deaths.%loop-player%} to 0
  110. if {totalkills.%loop-player%} is not set:
  111. set {totalkills.%loop-player%} to 0
  112. wipe loop-player sidebar
  113. set name of sidebar of loop-player to "&2&lFFA Arena"
  114. set score "&8&m------------------" in sidebar of loop-player to 7
  115. set score "&7 Total Kills &8» &a%{totalkills.%loop-player%}%" in sidebar of loop-player to 6
  116. set score "&7 Deaths &8» &a%{deaths.%loop-player%}%" in sidebar of loop-player to 5
  117. set score "&7 Killstreak &8» &an/a" in sidebar of loop-player to 4
  118. set score "&7 Highest KS &8» &an/a" in sidebar of loop-player to 3
  119. set score "&3" in sidebar of loop-player to 2
  120. set score "&7mc.elementmc.eu" in sidebar of loop-player to 1
  121.  
  122. on respawn:
  123. set {tp.%player%} to a random integer between 1 and 10
  124. clear player's inventory
  125. give player 1 iron sword of sharpness 1
  126. give player 1 fishing rod
  127. give player 1 bow of power 1
  128. give player 64 5:1
  129. give player 1 322 named "&7Absoption: &aOn"
  130. give player 32 golden carrot
  131. give player 64 arrows
  132. give player 1 flint and steel
  133. equip player with iron helmet of Projectile Protection 1
  134. equip player with iron chestplate of protection 1
  135. equip player with iron leggings of Projectile Protection 1
  136. equip player with diamond boots of protection 1
  137. if {tp.%player%} is 1:
  138. teleport player to {spawnpoint.1}
  139. if {tp.%player%} is 2:
  140. teleport player to {spawnpoint.2}
  141. if {tp.%player%} is 3:
  142. teleport player to {spawnpoint.3}
  143. if {tp.%player%} is 4:
  144. teleport player to {spawnpoint.4}
  145. if {tp.%player%} is 5:
  146. teleport player to {spawnpoint.5}
  147. if {tp.%player%} is 6:
  148. teleport player to {spawnpoint.6}
  149. if {tp.%player%} is 7:
  150. teleport player to {spawnpoint.7}
  151. if {tp.%player%} is 8:
  152. teleport player to {spawnpoint.8}
  153. if {tp.%player%} is 9:
  154. teleport player to {spawnpoint.9}
  155. if {tp.%player%} is 10:
  156. teleport player to {spawnpoint.10}
  157.  
  158. command /staff [<text>]:
  159. permission: rank.moderator
  160. trigger:
  161. if {staffmode::%player%} is not set:
  162. wait 1 tick
  163. clear player's inventory
  164. message "&8[&5Staff Mode&8] &7Staff Mode: &aEnabled"
  165. wait 1 tick
  166. hide player from all players
  167. equip player with chain leggings
  168. wait 1 tick
  169. enchant the player's leggings with unbreaking 3
  170. enchant the player's leggings with protection 1
  171. wait 1 tick
  172. set slot 2 of player to a music disc named "&aRandom TP"
  173. set slot 1 of player to redstone named "&bInv Opener"
  174. set slot 2 of player to player head named "&bTeleport To Last Report"
  175. set slot 3 of player to a gray dye named "&9&lVisible&8&l: &fOff"
  176. set slot 4 of player to a lead named "&9Follower &7(Follow Players Around) "
  177. set player's gamemode to creative
  178. else:
  179. message "&8[&5Staff Mode&8] &7Staff Mode: &cDisabled"
  180. delete {staffmode::%player%}
  181. wait 1 ticks
  182. clear player's inventory
  183. set player's gamemode to survival
  184. reveal player from all players
  185. clear inventory of player
  186.  
  187. command /giveall <item> [<integer>]:
  188. usage: /giveall <item> [<amount>]
  189. permission: rank.owner
  190. trigger:
  191. if arg-2 is more than 1:
  192. set {_amt} to arg-2
  193. else:
  194. set {_amt} to 1
  195. loop all players:
  196. loop {_amt} times:
  197. if loop-player has space for (1 of (arg-1)):
  198. give loop-player (1 of (arg-1))
  199. else:
  200. drop (1 of (arg-1)) at (location 0.5 above loop-player)
  201. broadcast "&a%sender% &7Give all players &a%{_amt}% %arg-1%'s&7."
  202.  
  203. on weather change:
  204. cancel event
  205.  
  206. command /setspawnpoints <text>:
  207. permission: rank.owner
  208. trigger:
  209. send "{@Logo} You have create a spawnpoint at location &a%Location%&7."
  210. set {spawnpoint.%arg-1%} to location of player
  211.  
  212. on place:
  213. wait 5 seconds
  214. delete the block
  215.  
  216. on break:
  217. cancel event
  218.  
  219. on join:
  220. set join message to "&7(&a+&7) &7%player%"
  221.  
  222. on quit:
  223. set leave message to "&7(&c-&7) &7%player%"
  224.  
  225. on drop:
  226. cancel event
  227.  
  228.  
  229. on rightclick with dye:
  230. execute player command "/vanish"
  231.  
  232. on damage of player:
  233. attacker is a player
  234. projectile doesn't exist
  235. if distance between attacker and victim is greater than 5:
  236. cancel event
  237. add 1 to {reach.%attacker%}
  238. loop all players:
  239. if loop-player has permission "uhc.admin" or "rank.support":
  240. send "&7[&aCheat Shield&7] &f%attacker% is possibly hacking (reach)." to loop-player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement