Advertisement
ProtonDev-Sys

Untitled

Feb 28th, 2021
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.54 KB | None | 0 0
  1. getgenv().killallRange = 9e9-- the range where killaura will trigger
  2. getgenv().cooldown = .4 -- the wait between attacks
  3. -- getting all the classes
  4. local player = game:GetService("Players").LocalPlayer
  5. local ult
  6. local ult2
  7. local ab
  8. local ab2
  9. local name = game.ReplicatedStorage.Profiles[player.Name].Class.Value
  10. if name == 'DualWielder' then
  11. name = 'DualWield'
  12. ult = "DualWieldUltimateSword"
  13. ult2 = "DualWieldUltimateSlam"
  14. ab = "CrossSlash"
  15. ab2 = 'DashStrike'
  16. elseif name == 'Defender' then
  17. ab = 'Spin'
  18. ab2 = 'Groundbreaker'
  19. elseif name == 'Mage' then
  20. ab = 'ArcaneWave'
  21. ab2 = 'ArcaneBlastAOE'
  22. ab3 = 'ArcaneBlast'
  23. elseif name == 'Swordmaster' then
  24. ab = 'CrescentStrike'
  25. ab2 = 'Leap'
  26. elseif name == 'Guardian' then
  27. ult = 'SwordPrison'
  28. ab = 'RockSpikes'
  29. ab12 = 'SlashFury'
  30. elseif name == 'IcefireMage' then
  31. ult2 = 'IcefireMageUltimateFrost'
  32. ab = 'IceSpikes'
  33. ab12 = 'LightingStrike'
  34. ab2 = 'IcefireMageFireballBlast'
  35. ab22 = 'IcefireMageFireball'
  36. elseif name == 'Paladin' then
  37. ab = 'LightThrust'
  38. ab12 = 'LightPaladin'
  39. elseif name == 'Demon' then
  40. name = 'DemonDPS'
  41. ab = 'ScythThrow'
  42. ab12 = 'DemonSoulAOE'
  43. ab13 = 'DemonSoulDPS'
  44. ab2 = 'DemonLifeStealAOE'
  45. rem = game.ReplicatedStorage.Shared.Combat.Skillsets.Demon.Ultimate
  46. elseif name == 'Beserker' then
  47. ab2 = 'AggroSlam'
  48. ab1 = 'GigaSpin'
  49. ab12 = 'Fissure'
  50. rem = game:GetService("ReplicatedStorage").Shared.Combat.Skillsets.Berserker.BerserkHit
  51. elseif name == 'Dragoon' then
  52. ab = 'DragoonCross'
  53. ab12 = 'MultiStrike'
  54. ab2 = 'DragoonFall'
  55. ult = 'DragoonUltimate'
  56. rem2 = game:GetService("ReplicatedStorage").Shared.Combat.Skillsets.Dragoon.Ultimate
  57. end
  58.  
  59. -- anti kick
  60. local mt = getrawmetatable(game)
  61. local nm = mt.__namecall
  62. setreadonly(mt,false)
  63. mt.__namecall = newcclosure(function(self,...)
  64. local method = getnamecallmethod()
  65. if method == 'Kick' or method == 'kick' then
  66. return wait(9e9)
  67. end
  68. return nm(self,...)
  69. end)
  70. setreadonly(mt,true)
  71.  
  72. -- attack function using keys
  73. local e = require(game:GetService("ReplicatedStorage").Shared.Combat)
  74. local currentkeys = getupvalues(require(game:GetService('ReplicatedStorage').Shared.Combat)['AttackTargets'])[1]
  75. function attack(mobs,vectors,attack)
  76. local leave = false
  77. for i , v in pairs(mobs) do
  78. if not v.Parent then
  79. leave = true
  80. end
  81. end
  82. if leave then return end
  83. if #currentkeys == 5 then
  84. currentkeys = game:GetService("ReplicatedStorage").Remotes.GetKeys:InvokeServer(currentkeys[4])
  85. repeat wait() until #currentkeys > 4
  86. end
  87. table.remove(currentkeys,#currentkeys)
  88. game:GetService('ReplicatedStorage').Shared.Combat.AttackTarget:FireServer(mobs,vectors,attack,currentkeys[#currentkeys])
  89. wait(getgenv().cooldown)
  90. end
  91. -- count loop ( kinda useless but I cba to rewrite my kill function )
  92. local count = 1
  93. coroutine.wrap(function()
  94. while wait(1.5) do
  95. count = 1
  96. end
  97. end)()
  98. -- Main kill function that damages the mobs
  99. function kill()
  100. if player.Character and player.Character:FindFirstChild("Head") then
  101. local targets = {}
  102. local vec = {}
  103. if workspace:FindFirstChild('MissionObjects') then
  104. -- getting mission objects so we can damage those to
  105. for i , v in pairs(workspace:GetDescendants()) do
  106. if v.Name == 'HealthProperties' and v.Parent.Parent.Name ~= 'Characters' then
  107. table.insert(targets,v.Parent)
  108. table.insert(vec,player.Character.Head.Position+Vector3.new(math.random()+math.random(3,5),-(math.random()+5),math.random()))
  109. end
  110. end
  111. else
  112. -- finding all the mobs
  113. for i , v in pairs(workspace:GetChildren()) do
  114. if v:FindFirstChild("Collider") or v:FindFirstChild("BigCollider") then
  115. local col = v:FindFirstChild("Collider") or v:FindFirstChild("BigCollider")
  116. if col and (player.Character.HumanoidRootPart.Position-col.Position).Magnitude <= getgenv().killallRange then
  117. table.insert(targets,v)
  118. table.insert(vec,player.Character.Head.Position+Vector3.new(math.random()+math.random(3,5),-(math.random()+5),math.random()))
  119. end
  120. end
  121. end
  122. for i , v in pairs(workspace.Mobs:GetChildren()) do
  123. if v:FindFirstChild("Collider") or v:FindFirstChild("BigCollider") or v:FindFirstChild("HealthProperties") then
  124. local col = v:FindFirstChild("Collider") or v:FindFirstChild("BigCollider")
  125. if col and (player.Character.HumanoidRootPart.Position-col.Position).Magnitude <= getgenv().killallRange then
  126. table.insert(targets,v)
  127. table.insert(vec,player.Character.Head.Position+Vector3.new(math.random()+math.random(3,5),-(math.random()+5),math.random()))
  128. end
  129. end
  130. end
  131. end
  132.  
  133. -- Checking if there's any mobs in range and if there are then it'll attack them
  134. if vec[1] then
  135. for i = 0 , 3 ,1 do
  136. attack(targets,vec,name..tostring(count+i))
  137. end
  138. if ab13 then
  139. for i = 0 , 3 ,1 do
  140. attack(targets,vec,ab13..tostring(count+i))
  141. end
  142. end
  143. if ult then
  144. attack(targets,vec,ult..tostring(count))
  145. end
  146. if ullt2 then
  147. attack(targets,vec,ult2)
  148. end
  149. if ab then
  150. attack(targets,vec,ab..tostring(count))
  151. end
  152. if ab12 then
  153. attack(targets,vec,ab12..tostring(count))
  154. end
  155. if ab22 then
  156. attack(targets,vec,ab22)
  157. end
  158. if ab2 then
  159. attack(targets,vec,ab2)
  160. end
  161. if ab3 then
  162. attack(targets,vec,ab3)
  163. end
  164. if rem then
  165. rem:FireServer(targets)
  166. end
  167. -- some classe's have specific remotes for things like ultimate's, we fire those here
  168. if rem2 then
  169. rem2:FireServer()
  170. end
  171. count = count + 1
  172.  
  173. end
  174. end
  175. -- a caution wait
  176. wait(3)
  177. end
  178. -- main kill loop
  179. while wait() do
  180. kill()
  181. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement