--BROUGHT TO YOU BY RobloxScripter.com!--
_G.Enabled = true
_G.TP = false
function getClosest()
local t = math.huge
local p = nil
for i,v in pairs(game:GetService("Workspace")["__THINGS"].Items:GetChildren()) do
if (v.Model.PrimaryPart.Position - game.Players.LocalPlayer.Character.PrimaryPart.Position).Magnitude < t then
t = (v.Model.PrimaryPart.Position - game.Players.LocalPlayer.Character.PrimaryPart.Position).Magnitude
p = v
end
end
return p
end
while wait() do
while wait() do
if _G.Enabled == true then
local c = getClosest()
if _G.TP == true then
game.Players.LocalPlayer.Character.PrimaryPart.CFrame = c.Model.PrimaryPart.CFrame
end
fireclickdetector(c.Model.ClickDetector)
Wait(0.1)
else
break
end
end
end