local game = game local players = game:GetService("Players") local localPlayer = players.LocalPlayer local character = localPlayer.Character local runService = game:GetService("RunService") local replicatedStorage = game:GetService("ReplicatedStorage") local cd = 0 runService.RenderStepped:Connect(function(delta) character = localPlayer.Character cd += delta if cd > 0.1 then cd = 0 for _,v in workspace.CurrentCamera:GetChildren() do if v.ClassName == "Model" and v:FindFirstChild("Humanoid") and v.Humanoid.Health > 0 and string.find(v.Name,"Lvl") and not string.find(v.Name, localPlayer.Name) and v:FindFirstChild("HumanoidRootPart") and (character.HumanoidRootPart.CFrame.Position - v.HumanoidRootPart.CFrame.Position).Magnitude < 50 then replicatedStorage.RemoteObject.SetDataTarget:FireServer(v.Data.Value) replicatedStorage.RemoteObject.SetAttacking:FireServer(true) replicatedStorage.RemoteObject.RequestAttack:FireServer({{v.Data.Value,0}}) end end end end)