Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local TeleportService = game:GetService("TeleportService")
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local player = Players.LocalPlayer
- local placeId = game.PlaceId
- local startTime = tick()
- local freezeThreshold = 45
- local lastHeartbeat = tick()
- local autoJumpEnabled = true
- -- GUI Setup
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "RejoinTimerGUI"
- screenGui.ResetOnSpawn = false
- screenGui.Parent = player:WaitForChild("PlayerGui")
- local timerLabel = Instance.new("TextLabel")
- timerLabel.Size = UDim2.new(0, 200, 0, 50)
- timerLabel.Position = UDim2.new(0.5, -100, 0, 20)
- timerLabel.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- timerLabel.BackgroundTransparency = 0.3
- timerLabel.BorderSizePixel = 0
- timerLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- timerLabel.Font = Enum.Font.SourceSansBold
- timerLabel.TextScaled = true
- timerLabel.Text = "Time Passed: 0s"
- timerLabel.Parent = screenGui
- local toggleButton = Instance.new("TextButton")
- toggleButton.Size = UDim2.new(0, 120, 0, 30)
- toggleButton.Position = UDim2.new(0.5, -60, 0, 80)
- toggleButton.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- toggleButton.Font = Enum.Font.SourceSansBold
- toggleButton.TextScaled = true
- toggleButton.Text = "Auto Jump: ON"
- toggleButton.Parent = screenGui
- toggleButton.MouseButton1Click:Connect(function()
- autoJumpEnabled = not autoJumpEnabled
- toggleButton.Text = "Auto Jump: " .. (autoJumpEnabled and "ON" or "OFF")
- end)
- -- Update GUI Timer
- task.spawn(function()
- while true do
- timerLabel.Text = "Time Passed: " .. math.floor(tick() - startTime) .. "s"
- task.wait(1)
- end
- end)
- -- Auto rejoin after 17 minutes
- task.spawn(function()
- while true do
- if tick() - startTime >= 1020 then
- TeleportService:Teleport(placeId, player)
- end
- task.wait(5)
- end
- end)
- -- Detect freeze/crash
- RunService.Heartbeat:Connect(function()
- lastHeartbeat = tick()
- end)
- task.spawn(function()
- while true do
- if tick() - lastHeartbeat > freezeThreshold then
- TeleportService:Teleport(placeId, player)
- end
- task.wait(5)
- end
- end)
- -- Auto Jump Handling (persists after respawn)
- local function startAutoJump()
- task.spawn(function()
- while true do
- if autoJumpEnabled and player.Character and player.Character:FindFirstChild("Humanoid") then
- player.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
- end
- task.wait(2)
- end
- end)
- end
- -- Call once on first load
- startAutoJump()
- -- Call again whenever character respawns
- player.CharacterAdded:Connect(function()
- task.wait(1) -- give time for Humanoid to load
- startAutoJump()
- end)
- -- queueonteleport reload
- pcall(function()
- if queueonteleport then
- queueonteleport([[
- loadstring(game:HttpGet("https://pastebin.com/raw/95LaFfDe"))()
- ]])
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement