Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. local plr = game.Players.LocalPlayer
  2.  
  3. local getTarget = function()
  4. local checkLevel = plr.Level.Value
  5. local currentPlace
  6. if checkLevel == "Forest" then
  7. currentPlace = workspace.Levels["Forest"]
  8. elseif checkLevel == "City" then
  9. currentPlace = workspace.Levels["City"]
  10. elseif checkLevel == "Wilderness" then
  11. currentPlace = workspace.Levels["Wilderness"]
  12. elseif checkLevel == "Beach" then
  13. currentPlace = workspace.Levels["Beach"]
  14. elseif checkLevel == "Sea" then
  15. currentPlace = workspace.Levels["Sea"]
  16. elseif checkLevel == "Magma" then
  17. currentPlace = workspace.Levels["Magma"]
  18. end
  19. for i,v in next, currentPlace.Enemies:GetChildren() do
  20. if v:FindFirstChild("HumanoidRootPart") and v:FindFirstChild("Health") and v.Health.Value > 1 then
  21. return v
  22. end
  23. end
  24. end
  25.  
  26. local VirtualUser=game:service('VirtualUser')
  27. game:service'Players'.LocalPlayer.Idled:connect(function()
  28. print("AntiAFK")
  29. VirtualUser:CaptureController()
  30. VirtualUser:ClickButton2(Vector2.new())
  31. end)
  32.  
  33. game:GetService("RunService").Stepped:connect(function()
  34. if plr.Character and plr.Character:FindFirstChildWhichIsA("Humanoid") then
  35. game.Players.LocalPlayer.Character:FindFirstChildWhichIsA("Humanoid"):ChangeState(11)
  36. end
  37. end)
  38.  
  39. game:GetService("ReplicatedStorage").Remote.UpdateSettings:FireServer("MusicVolume", 0)
  40. while wait() do
  41. local target = getTarget()
  42. if target then
  43. repeat wait()
  44. if target:FindFirstChild("HumanoidRootPart") then
  45. plr.Character.HumanoidRootPart.CFrame = target.HumanoidRootPart.CFrame + Vector3.new(0,10,0)
  46. game:GetService("ReplicatedStorage").Remote.CastSpell:FireServer(1, target)
  47. game:GetService("ReplicatedStorage").Remote.CastSpell:FireServer(2, target)
  48. workspace.Levels.Forest.SpawnPoint.CFrame = plr.Character.HumanoidRootPart.CFrame
  49. if target:FindFirstChild("Health") and target.Health.Value <= 0 then
  50. target:Remove()
  51. end
  52. else break
  53. end
  54. until not target
  55. end
  56. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement