getgenv().Settings = { Avoid = {}, -- Add Usernames inside strings like: "Player123" or 'Player321' and add a , whenever you're adding a second or third string/player. AvoidFriends = false, Attack_IShowSpeed = true, Keybind = Enum.KeyCode.X } local Settings = getgenv().Settings local punch = game:GetService("ReplicatedStorage"):WaitForChild("MainEvents") and game:GetService("ReplicatedStorage").MainEvents:WaitForChild("PUNCHEVENT") local plrs = game:GetService("Players") local lplr = plrs.LocalPlayer local char = lplr.Character or lplr.CharacterAdded:Wait() local hrp = char:WaitForChild("HumanoidRootPart") local uis = game:GetService("UserInputService") lplr.CharacterAdded:Connect(function(character) char = character;hrp = character:WaitForChild("HumanoidRootPart"); end) local ready = {} local function setup(plr,char) if plr == lplr then return end local hum = char:WaitForChild("Humanoid") local hrp = char:WaitForChild("HumanoidRootPart") ready[plr] = {v_char = char,v_hum = hum,v_hrp = hrp,Field = false,Pvp = false,Teammates = false} if Settings.Attack_IShowSpeed then local folder = char.Parent if folder:FindFirstChild("Speed") then local speed_char = folder.Speed local speed_hum = speed_char:WaitForChild("Humanoid") local speed_hrp = speed_char:WaitForChild("HumanoidRootPart") ready["IShowSpeed"..string.rep("0",math.random(20,25)):gsub(".",function() return tostring(math.random(0,9)) end)] = {v_char = speed_char,v_hum = speed_hum,v_hrp = speed_hrp,Field = false,Pvp = false,Teammates = false} end end char.ChildAdded:Connect(function(obj) if obj:IsA("ForceField") then ready[plr].Field = true end if obj.Name == "PartyHighlight" then ready[plr].Teammates = true end end) char.ChildRemoved:Connect(function(obj) if obj:IsA("ForceField") then ready[plr].Field = false end if obj.Name == "PartyHighlight" then ready[plr].Teammates = false end end) local bbg = char:FindFirstChild("PVPOFFGUI") if bbg then local tl = bbg:FindFirstChild("TextLabel") if tl then ready[plr].Pvp = tl.Text == "PVP : OFF" tl:GetPropertyChangedSignal("Text"):Connect(function() ready[plr].Pvp = tl.Text == "PVP : OFF" end) end end end plrs.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(plr_char) setup(plr,plr_char) end) end) plrs.PlayerRemoving:Connect(function(plr) ready[plr] = nil end) for i,v in next,plrs:GetPlayers() do if v.Character then setup(v,v.Character) end v.CharacterAdded:Connect(function(plr_char) setup(v,plr_char) end) end local conn = true uis.InputBegan:Connect(function(input,gp) if gp then return end if input.KeyCode == Settings.Keybind then conn = not conn end end) local c_char,c_hrp local function closest() local max = 1e5 for key,data in pairs(ready) do if key ~= lplr then for _,name in ipairs(Settings.Avoid) do if key.Name == name then continue end end if Settings.AvoidFriends and lplr:IsFriendsWith(key.UserId) then continue end local thrp = data.v_hrp if thrp and not data.Teammates then local dist = thrp.Position-hrp.Position local current = dist:Dot(dist) if current < max then max = current c_char = data.v_char c_hrp = thrp end end end end end game:GetService("RunService").Heartbeat:Connect(function() if not conn then return end closest() if c_char and c_hrp then punch:FireServer(4,c_char,400,c_hrp) end end)