www.roblox-scripter.com

Script – Box Simulator

Thank you for using our website
Your script:

important!
For the script to work, change the value of false to true in the first line.
When you need to disable the script, return the value to false
And in the second line, change the name of the location

				
					_G.Enabled = true
_G.World = "Spawn" --Spawn, Beach, Samurai, Winter, Desert, Wizard, Volcano, Mine, Mushroom, Ocean

local player = game.Players.LocalPlayer
while _G.Enabled and task.wait() do
    local nearest = nil
    for i,v in pairs(game:GetService("Workspace").Map.Worlds.Spawn[_G.World].Boxes:GetChildren()) do
        if v:IsA("MeshPart") then
            if v.Health.Value > 0 then
                if nearest == nil or (player.Character:WaitForChild("HumanoidRootPart").Position - v.Position).Magnitude < (player.Character:WaitForChild("HumanoidRootPart").Position - nearest.Position).Magnitude then
                    nearest = v 
                end
            end
        end
    end
    fireclickdetector(nearest.ClickDetector) 
    repeat task.wait() until not v or not _G.Enabled 
    wait(0.5)
end