
Key Required
_G.AutoSlap = true
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local LocalPlayer = Players.LocalPlayer
local function getSlap()
return LocalPlayer.Character:WaitForChild("SLAPtula"):WaitForChild("SlapTool_Comm"):WaitForChild("RF"):WaitForChild("Slap")
end
local function getClosestPlayer()
local lpChar = LocalPlayer.Character
if not lpChar or not lpChar:FindFirstChild("HumanoidRootPart") then return end
local closest, closestDist = nil, 20
for _, player in pairs(Players:GetPlayers()) do
local char = player.Character
if player ~= LocalPlayer and char and char:FindFirstChild("HumanoidRootPart") then
local dist = (char.HumanoidRootPart.Position - lpChar.HumanoidRootPart.Position).Magnitude
if dist <= closestDist then
closestDist = dist
closest = player
end
end
end
return closest
end
RunService.RenderStepped:Connect(function()
if _G.AutoSlap then
local target = getClosestPlayer()
if target then
getSlap():InvokeServer(target, Vector3.new(1,0,1))
end
end
end)No comments yet for this script.
