Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- local getTarget = function()
- local checkLevel = plr.Level.Value
- local currentPlace
- if checkLevel == "Forest" then
- currentPlace = workspace.Levels["Forest"]
- elseif checkLevel == "City" then
- currentPlace = workspace.Levels["City"]
- elseif checkLevel == "Wilderness" then
- currentPlace = workspace.Levels["Wilderness"]
- elseif checkLevel == "Beach" then
- currentPlace = workspace.Levels["Beach"]
- elseif checkLevel == "Sea" then
- currentPlace = workspace.Levels["Sea"]
- elseif checkLevel == "Magma" then
- currentPlace = workspace.Levels["Magma"]
- end
- for i,v in next, currentPlace.Enemies:GetChildren() do
- if v:FindFirstChild("HumanoidRootPart") and v:FindFirstChild("Health") and v.Health.Value > 1 then
- return v
- end
- end
- end
- local VirtualUser=game:service('VirtualUser')
- game:service'Players'.LocalPlayer.Idled:connect(function()
- print("AntiAFK")
- VirtualUser:CaptureController()
- VirtualUser:ClickButton2(Vector2.new())
- end)
- game:GetService("RunService").Stepped:connect(function()
- if plr.Character and plr.Character:FindFirstChildWhichIsA("Humanoid") then
- game.Players.LocalPlayer.Character:FindFirstChildWhichIsA("Humanoid"):ChangeState(11)
- end
- end)
- game:GetService("ReplicatedStorage").Remote.UpdateSettings:FireServer("MusicVolume", 0)
- while wait() do
- local target = getTarget()
- if target then
- repeat wait()
- if target:FindFirstChild("HumanoidRootPart") then
- plr.Character.HumanoidRootPart.CFrame = target.HumanoidRootPart.CFrame + Vector3.new(0,10,0)
- game:GetService("ReplicatedStorage").Remote.CastSpell:FireServer(1, target)
- game:GetService("ReplicatedStorage").Remote.CastSpell:FireServer(2, target)
- workspace.Levels.Forest.SpawnPoint.CFrame = plr.Character.HumanoidRootPart.CFrame
- if target:FindFirstChild("Health") and target.Health.Value <= 0 then
- target:Remove()
- end
- else break
- end
- until not target
- end
- end
Add Comment
Please, Sign In to add comment