Advertisement
iiFlamez

Untitled

Dec 1st, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.89 KB | None | 0 0
  1. -- params : ...
  2.  
  3. local p = game.Players.LocalPlayer
  4. local m = p:GetMouse()
  5. local d = game.ReplicatedStorage.DataHolder
  6. repeat
  7. repeat
  8. wait()
  9. until p.Character
  10. until p.Character:FindFirstChild("Humanoid")
  11. local h = p.Character.Humanoid
  12. wait(2)
  13. local energy = {
  14. Fire = {5}
  15. }
  16. local exp = {
  17. Fire = {25}
  18. }
  19. local equipped = false
  20. local antimagicequipped = false
  21. local antimagicvalue = 1
  22. local combatvalue = 1
  23. local a1 = game.ReplicatedStorage.Animations.FireballThrow
  24. local at1 = h:LoadAnimation(a1)
  25. local antimagicidle = h:LoadAnimation(game.ReplicatedStorage.Animations.AntiMagicIdle)
  26. local antimagicslash1 = h:LoadAnimation(game.ReplicatedStorage.Animations.AntiMagicSlash1)
  27. local antimagicslash2 = h:LoadAnimation(game.ReplicatedStorage.Animations.AntiMagicSlash2)
  28. local antimagicslash3 = h:LoadAnimation(game.ReplicatedStorage.Animations.AntiMagicSlash3)
  29. local punch1 = h:LoadAnimation(game.ReplicatedStorage.Animations.Punch1)
  30. local punch2 = h:LoadAnimation(game.ReplicatedStorage.Animations.Punch2)
  31. local punch3 = h:LoadAnimation(game.ReplicatedStorage.Animations.Punch3)
  32. local equipping = false
  33. local move1 = false
  34. local clicking = false
  35. local move1CD = 5
  36. local combatCD = 0.8
  37. Equip = function()
  38. if equipped == false then
  39. game.ReplicatedStorage.Events.EquipGrimoire:FireServer(equipped)
  40. equipped = true
  41. else
  42. if equipped == true then
  43. game.ReplicatedStorage.Events.EquipGrimoire:FireServer(equipped)
  44. equipped = false
  45. end
  46. end
  47. end
  48.  
  49. Move1 = function()
  50. if p.UserId == 96144572 then
  51. at1:Play()
  52. local aim = m.Hit.p
  53. game.ReplicatedStorage.Events.BennySkill1:FireServer(aim)
  54. return
  55. end
  56. do
  57. if d[p.UserId].Data.Clover.Value == 3 then
  58. if d[p.UserId].Data.Type.Value == "Fire" then
  59. at1:Play()
  60. wait(0.4)
  61. local aim = m.Hit.p
  62. game.ReplicatedStorage.Events.Fireball:FireServer(aim)
  63. else
  64. do
  65. if d[p.UserId].Data.Type.Value == "Wind" then
  66. at1:Play()
  67. wait(0.4)
  68. local aim = m.Hit.p
  69. game.ReplicatedStorage.Events.WindSlash:FireServer(aim)
  70. else
  71. do
  72. if d[p.UserId].Data.Type.Value == "Dark" then
  73. at1:Play()
  74. wait(0.4)
  75. local aim = m.Hit.p
  76. game.ReplicatedStorage.Events.DarkBullet:FireServer(aim)
  77. else
  78. do
  79. if d[p.UserId].Data.Type.Value == "Light" then
  80. at1:Play()
  81. local aim = m.Hit.p
  82. game.ReplicatedStorage.Events.LightSpear:FireServer(aim)
  83. else
  84. do
  85. if d[p.UserId].Data.Type.Value == "Water" then
  86. for i = 1, 10 do
  87. local aim = m.Hit.p
  88. game.ReplicatedStorage.Events.WaterBullets:FireServer(aim)
  89. wait(0.25)
  90. end
  91. end
  92. do
  93. if d[p.UserId].Data.Clover.Value == 4 then
  94. if d[p.UserId].Data.Type.Value == "Light" then
  95. at1:Play()
  96. local aim = m.Hit.p
  97. game.ReplicatedStorage.Events.LightSpear2:FireServer(aim)
  98. else
  99. do
  100. if d[p.UserId].Data.Type.Value == "Fire" then
  101. at1:Play()
  102. wait(0.4)
  103. local aim = m.Hit.p
  104. game.ReplicatedStorage.Events.Fireball2:FireServer(aim)
  105. else
  106. do
  107. if d[p.UserId].Data.Type.Value == "Water" then
  108. for i = 1, 25 do
  109. local aim = m.Hit.p
  110. game.ReplicatedStorage.Events.WaterBullets:FireServer(aim)
  111. wait(0.1)
  112. end
  113. else
  114. do
  115. if d[p.UserId].Data.Type.Value == "Dark" then
  116. at1:Play()
  117. wait(0.4)
  118. local aim = m.Hit.p
  119. game.ReplicatedStorage.Events.DarkBullet2:FireServer(aim)
  120. else
  121. do
  122. if d[p.UserId].Data.Type.Value == "Wind" then
  123. at1:Play()
  124. wait(0.4)
  125. local aim = m.Hit.p
  126. game.ReplicatedStorage.Events.WindSlash2:FireServer(aim)
  127. end
  128. do
  129. if d[p.UserId].Data.Clover.Value == 5 and d[p.UserId].Data.Type.Value == "Anti Magic" then
  130. if antimagicequipped then
  131. antimagicidle:Stop()
  132. game.ReplicatedStorage.Events.AntiMagicEquip:FireServer(antimagicequipped)
  133. antimagicequipped = false
  134. else
  135. if not antimagicequipped then
  136. antimagicidle:Play()
  137. game.ReplicatedStorage.Events.AntiMagicEquip:FireServer(antimagicequipped)
  138. antimagicequipped = true
  139. end
  140. end
  141. end
  142. end
  143. end
  144. end
  145. end
  146. end
  147. end
  148. end
  149. end
  150. end
  151. end
  152. end
  153. end
  154. end
  155. end
  156. end
  157. end
  158. end
  159. end
  160. end
  161. end
  162. end
  163. end
  164.  
  165. Hold = function()
  166. local enabled = true
  167. game.ReplicatedStorage.Events.GrimoireParticle:FireServer(enabled)
  168. end
  169.  
  170. LetGo = function()
  171. local enabled = false
  172. game.ReplicatedStorage.Events.GrimoireParticle:FireServer(enabled)
  173. end
  174.  
  175. h.Running:connect(function(s)
  176. if antimagicequipped then
  177. if s > 0 then
  178. antimagicidle:Stop()
  179. else
  180. antimagicidle:Play()
  181. end
  182. end
  183. end)
  184. m.Button1Down:connect(function()
  185. if antimagicequipped and not equipped and not clicking then
  186. clicking = true
  187. if antimagicvalue == 1 then
  188. antimagicvalue = 2
  189. antimagicslash1:Play()
  190. else
  191. if antimagicvalue == 2 then
  192. antimagicvalue = 3
  193. antimagicslash2:Play()
  194. else
  195. if antimagicvalue == 3 then
  196. antimagicvalue = 1
  197. antimagicslash3:Play()
  198. end
  199. end
  200. end
  201. game.ReplicatedStorage.Events.AntiMagicSlash:FireServer()
  202. wait(combatCD)
  203. clicking = false
  204. end
  205. if not antimagicequipped and not equipped and not clicking then
  206. clicking = true
  207. if combatvalue == 1 then
  208. combatvalue = 2
  209. punch1:Play()
  210. else
  211. if combatvalue == 2 then
  212. combatvalue = 3
  213. punch2:Play()
  214. else
  215. if combatvalue == 3 then
  216. combatvalue = 1
  217. punch3:Play()
  218. end
  219. end
  220. end
  221. game.ReplicatedStorage.Events.Combat:FireServer()
  222. wait(combatCD)
  223. clicking = false
  224. end
  225. end)
  226. m.KeyDown:connect(function(k)
  227. if k == "e" and not equipping then
  228. equipping = true
  229. Equip()
  230. wait(0.25)
  231. equipping = false
  232. end
  233. if k == "z" and equipped then
  234. Hold()
  235. end
  236. end)
  237. m.KeyUp:connect(function(k)
  238. if k == "z" and equipped then
  239. LetGo()
  240. if not move1 then
  241. move1 = true
  242. Move1()
  243. wait(move1CD)
  244. move1 = false
  245. end
  246. end
  247. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement