local RS = game:GetService("ReplicatedStorage")
local rebirth = RS:WaitForChild("RequestCompletionRebirth")
local maps = workspace.Maps
local mapId = 1
local found = maps and maps:FindFirstChild("Map"..mapId)
local burger = found and found.burger
local plr = game.Players.LocalPlayer
local stopped = false
local function re(h)
if h then
h.Health = 0
end
end
plr.Chatted:Connect(function(msg)
if msg == "StopInit" then
stopped = true
end
end)
while true do
if stopped then
break
end
local character = plr.Character or plr.CharacterAdded:Wait()
if character and burger then
local humanoid = character:FindFirstChildOfClass("Humanoid")
character:PivotTo(burger:GetPivot())
wait(0.5)
local proximity = burger:FindFirstChild("ProximityPrompt")
if proximity then
proximity:InputHoldBegin()
local triggered = false
proximity.Triggered:Connect(function()
triggered = true
end)
local startTime = tick()
while not triggered and (tick() - startTime) < 1 do
wait(0.1)
end
if triggered then
wait(1)
rebirth:FireServer()
wait(3)
else
re(humanoid)
wait(5)
end
else
re(humanoid)
wait(5)
end
else
re(humanoid)
wait(5)
end
end