Advertisement
xXGokyXx

Hero Havoc Unobfuscated

Mar 2nd, 2019
844
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. lplayer = game.Players.LocalPlayer.Name
  2. warn("xXGokyXx's auto fight script loaded, you now should auto fight any enemies you get into a battle with!")
  3. warn('This should only have to be executed once. If it stops working let me know.')
  4. function battle()
  5. if game.ReplicatedStorage.PlayerFolder[lplayer].CurrentBattle:FindFirstChild('Enemy1') ~= nil then
  6. if game.ReplicatedStorage.PlayerFolder[lplayer].CurrentBattle.Enemy1.Health.Value > 0 then
  7. game.ReplicatedStorage.RemoteEvents.BattleEvents.BattleClick:InvokeServer(game.ReplicatedStorage.PlayerFolder[lplayer].CurrentBattle.Enemy1)
  8. end
  9. end
  10. if game.ReplicatedStorage.PlayerFolder[lplayer].CurrentBattle:FindFirstChild('Enemy2') ~= nil then
  11. if game.ReplicatedStorage.PlayerFolder[lplayer].CurrentBattle.Enemy2.Health.Value > 0 then
  12. game.ReplicatedStorage.RemoteEvents.BattleEvents.BattleClick:InvokeServer(game.ReplicatedStorage.PlayerFolder[lplayer].CurrentBattle.Enemy2)
  13. end
  14. end
  15. if game.ReplicatedStorage.PlayerFolder[lplayer].CurrentBattle:FindFirstChild('Enemy3') ~= nil then
  16. if game.ReplicatedStorage.PlayerFolder[lplayer].CurrentBattle.Enemy3.Health.Value > 0 then
  17. game.ReplicatedStorage.RemoteEvents.BattleEvents.BattleClick:InvokeServer(game.ReplicatedStorage.PlayerFolder[lplayer].CurrentBattle.Enemy3)
  18. end
  19. end
  20. if game.ReplicatedStorage.PlayerFolder[lplayer].CurrentBattle:FindFirstChild('Enemy4') ~= nil then
  21. if game.ReplicatedStorage.PlayerFolder[lplayer].CurrentBattle.Enemy4.Health.Value > 0 then
  22. game.ReplicatedStorage.RemoteEvents.BattleEvents.BattleClick:InvokeServer(game.ReplicatedStorage.PlayerFolder[lplayer].CurrentBattle.Enemy4)
  23. end
  24. end
  25. if game.ReplicatedStorage.PlayerFolder[lplayer].CurrentBattle:FindFirstChild('Enemy5') ~= nil then
  26. if game.ReplicatedStorage.PlayerFolder[lplayer].CurrentBattle.Enemy5.Health.Value > 0 then
  27. game.ReplicatedStorage.RemoteEvents.BattleEvents.BattleClick:InvokeServer(game.ReplicatedStorage.PlayerFolder[lplayer].CurrentBattle.Enemy5)
  28. end
  29. end
  30. end
  31.  
  32. while wait() do
  33. if game.ReplicatedStorage.PlayerFolder[lplayer]:FindFirstChild('CurrentBattle') ~= nil then
  34. battle()
  35. end
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement