Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save c584pgx9tz-design/0954e9b49662d89b3925a4f758496822 to your computer and use it in GitHub Desktop.

Select an option

Save c584pgx9tz-design/0954e9b49662d89b3925a4f758496822 to your computer and use it in GitHub Desktop.
-- ====== AUTO-RUN ON TELEPORT (WITH 3s DELAY) ======
if queue_on_teleport then
queue_on_teleport([[
task.delay(3, function()
-- Services
local Players = game:GetService("Players")
local TeleportService = game:GetService("TeleportService")
local player = Players.LocalPlayer
-- ====== STATE ======
local enabled = true
local teleporting = false
-- ====== GUI ======
local gui = Instance.new("ScreenGui")
gui.Name = "ItemTeleportGUI"
gui.Parent = player:WaitForChild("PlayerGui")
local frame = Instance.new("Frame", gui)
frame.Size = UDim2.new(0, 240, 0, 100)
frame.Position = UDim2.new(0.5, -120, 0.3, 0)
frame.BackgroundColor3 = Color3.fromRGB(30,30,30)
Instance.new("UICorner", frame)
local toggle = Instance.new("TextButton", frame)
toggle.Size = UDim2.new(1, -10, 0, 40)
toggle.Position = UDim2.new(0, 5, 0, 5)
toggle.Text = "Teleport: ON"
toggle.BackgroundColor3 = Color3.fromRGB(50,50,50)
toggle.TextColor3 = Color3.fromRGB(0,255,0)
toggle.Font = Enum.Font.SourceSansBold
toggle.TextSize = 16
local status = Instance.new("TextLabel", frame)
status.Size = UDim2.new(1, -10, 0, 40)
status.Position = UDim2.new(0, 5, 0, 55)
status.BackgroundTransparency = 1
status.Text = "New Item: No"
status.TextColor3 = Color3.fromRGB(255,255,255)
status.Font = Enum.Font.SourceSansBold
status.TextSize = 16
toggle.MouseButton1Click:Connect(function()
enabled = not enabled
toggle.Text = enabled and "Teleport: ON" or "Teleport: OFF"
toggle.TextColor3 = enabled and Color3.fromRGB(0,255,0) or Color3.fromRGB(255,0,0)
end)
-- ====== TELEPORT ======
local function doTeleport()
if not enabled or teleporting then return end
teleporting = true
TeleportService:Teleport(game.PlaceId)
task.delay(10, function()
teleporting = false
end)
end
-- ====== ITEM DETECTION ======
local function onNewItem(item)
if not enabled then return end
status.Text = "New Item: YES"
task.delay(1, function()
status.Text = "New Item: No"
doTeleport()
end)
end
player:WaitForChild("Backpack").ChildAdded:Connect(onNewItem)
local function hookCharacter(char)
char.ChildAdded:Connect(onNewItem)
end
if player.Character then hookCharacter(player.Character) end
player.CharacterAdded:Connect(hookCharacter)
print("[LOADED] Item teleport script active (queued on teleport)")
end)
]])
end
-- ====== EXECUTE IN CURRENT SERVER (3s DELAY) ======
task.delay(3, function()
local Players = game:GetService("Players")
local TeleportService = game:GetService("TeleportService")
local player = Players.LocalPlayer
local enabled = true
local teleporting = false
local gui = Instance.new("ScreenGui")
gui.Name = "ItemTeleportGUI"
gui.Parent = player:WaitForChild("PlayerGui")
local frame = Instance.new("Frame", gui)
frame.Size = UDim2.new(0, 240, 0, 100)
frame.Position = UDim2.new(0.5, -120, 0.3, 0)
frame.BackgroundColor3 = Color3.fromRGB(30,30,30)
Instance.new("UICorner", frame)
local toggle = Instance.new("TextButton", frame)
toggle.Size = UDim2.new(1, -10, 0, 40)
toggle.Position = UDim2.new(0, 5, 0, 5)
toggle.Text = "Teleport: ON"
toggle.BackgroundColor3 = Color3.fromRGB(50,50,50)
toggle.TextColor3 = Color3.fromRGB(0,255,0)
toggle.Font = Enum.Font.SourceSansBold
toggle.TextSize = 16
local status = Instance.new("TextLabel", frame)
status.Size = UDim2.new(1, -10, 0, 40)
status.Position = UDim2.new(0, 5, 0, 55)
status.BackgroundTransparency = 1
status.Text = "New Item: No"
status.TextColor3 = Color3.fromRGB(255,255,255)
status.Font = Enum.Font.SourceSansBold
status.TextSize = 16
toggle.MouseButton1Click:Connect(function()
enabled = not enabled
toggle.Text = enabled and "Teleport: ON" or "Teleport: OFF"
toggle.TextColor3 = enabled and Color3.fromRGB(0,255,0) or Color3.fromRGB(255,0,0)
end)
local function doTeleport()
if not enabled or teleporting then return end
teleporting = true
TeleportService:Teleport(game.PlaceId)
task.delay(10, function()
teleporting = false
end)
end
local function onNewItem(item)
if not enabled then return end
status.Text = "New Item: YES"
task.delay(1, function()
status.Text = "New Item: No"
doTeleport()
end)
end
player:WaitForChild("Backpack").ChildAdded:Connect(onNewItem)
local function hookCharacter(char)
char.ChildAdded:Connect(onNewItem)
end
if player.Character then hookCharacter(player.Character) end
player.CharacterAdded:Connect(hookCharacter)
print("[LOADED] Item teleport script active")
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment