local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local UserInputService = game:GetService("UserInputService")
local player = Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local hrp = char:WaitForChild("HumanoidRootPart")
local LOCATIONS = {
["Police room"] = Vector3.new(854.50, 102.78, 2249.51),
["Cafeteria"] = Vector3.new(961.81, 99.99, 2249),
["armory or not"] = Vector3.new(834.16, 98.19, 2188.05),
["on top the roof"] = Vector3.new(683.92, 123.99, 2316),
["idk"] = Vector3.new(504, 122.04, 2461.57),
["guard tower"] = Vector3.new(769.45, 122.04, 2582)
}
local isTeleporting = false
local gui = Instance.new("ScreenGui")
gui.Name = "TeleporterUI"
gui.Parent = player:WaitForChild("PlayerGui")
gui.ResetOnSpawn = false
local mainFrame = Instance.new("Frame")
mainFrame.Size = UDim2.new(0, 180, 0, 250)
mainFrame.Position = UDim2.new(0, 10, 0, 10)
mainFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 45)
mainFrame.BorderSizePixel = 0
mainFrame.Active = true
mainFrame.Selectable = true
mainFrame.Draggable = true
mainFrame.Parent = gui
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, 8)
corner.Parent = mainFrame
local title = Instance.new("TextLabel")
title.Size = UDim2.new(1, 0, 0, 30)
title.Position = UDim2.new(0, 0, 0, 0)
title.BackgroundColor3 = Color3.fromRGB(50, 50, 70)
title.TextColor3 = Color3.new(1, 1, 1)
title.Text = "W teleporter"
title.Font = Enum.Font.SourceSansBold
title.TextSize = 16
title.Parent = mainFrame
local titleCorner = Instance.new("UICorner")
titleCorner.CornerRadius = UDim.new(0, 8)
titleCorner.Parent = title
local buttonsFrame = Instance.new("Frame")
buttonsFrame.Size = UDim2.new(1, -10, 1, -40)
buttonsFrame.Position = UDim2.new(0, 5, 0, 35)
buttonsFrame.BackgroundTransparency = 1
buttonsFrame.Parent = mainFrame
local buttonNames = {"Police room", "Cafeteria", "armory or not", "on top the roof", "idk", "guard tower"}
local buttons = {}
local buttonColors = {
Color3.fromRGB(200, 80, 80), -- Red
Color3.fromRGB(80, 180, 80), -- Green
Color3.fromRGB(80, 120, 200), -- Blue
Color3.fromRGB(180, 80, 180), -- Purple
Color3.fromRGB(220, 160, 80), -- Orange
Color3.fromRGB(80, 180, 180) -- Cyan
}
for i = 1, 6 do
local btnName = buttonNames[i]
local button = Instance.new("TextButton")
button.Size = UDim2.new(1, 0, 0, 30)
button.Position = UDim2.new(0, 0, 0, (i-1) * 35)
button.BackgroundColor3 = buttonColors[i]
button.TextColor3 = Color3.new(1, 1, 1)
button.Text = btnName
button.Font = Enum.Font.SourceSansSemibold
button.TextSize = 12
button.Name = btnName
button.Parent = buttonsFrame
local btnCorner = Instance.new("UICorner")
btnCorner.CornerRadius = UDim.new(0, 6)
btnCorner.Parent = button
button.MouseEnter:Connect(function()
if not isTeleporting then
button.BackgroundColor3 = buttonColors[i]:Lerp(Color3.new(1, 1, 1), 0.2)
end
end)
button.MouseLeave:Connect(function()
if not isTeleporting then
button.BackgroundColor3 = buttonColors[i]
end
end)
buttons[btnName] = button
end
local info = Instance.new("TextLabel")
info.Size = UDim2.new(1, -10, 0, 15)
info.Position = UDim2.new(0, 5, 1, -20)
info.BackgroundTransparency = 1
info.TextColor3 = Color3.fromRGB(180, 180, 180)
info.Text = "Drag to move • 1-6 keys"
info.Font = Enum.Font.SourceSans
info.TextSize = 11
info.Parent = mainFrame
local function teleportTo(locationName)
if isTeleporting or not hrp or not LOCATIONS[locationName] then return end
isTeleporting = true
local button = buttons[locationName]
local originalText = button.Text
if button then
button.Text = "⟳ TP..."
button.BackgroundColor3 = Color3.fromRGB(255, 200, 50)
end
print("Teleporting to " .. locationName .. "...")
local targetPos = LOCATIONS[locationName]
local targetCF = CFrame.new(targetPos + Vector3.new(0, 5, 0))
local distance = (targetPos - hrp.Position).Magnitude
local teleportTime = math.max(0.001, distance / 99999) -- Very fast
local tween = TweenService:Create(
hrp,
TweenInfo.new(teleportTime, Enum.EasingStyle.Linear),
{CFrame = targetCF}
)
tween:Play()
tween.Completed:Wait()
task.wait(0.2)
if button then
button.Text = originalText
for i = 1, 6 do
if buttonNames[i] == locationName then
button.BackgroundColor3 = buttonColors[i]
break
end
end
end
isTeleporting = false
print("✅ Arrived at " .. locationName)
end
for btnName, button in pairs(buttons) do
button.MouseButton1Click:Connect(function()
teleportTo(btnName)
end)
end
player.CharacterAdded:Connect(function(newChar)
char = newChar
hrp = newChar:WaitForChild("HumanoidRootPart")
end)
getgenv().UpdateTP = function(locationName, x, y, z)
if LOCATIONS[locationName] then
LOCATIONS[locationName] = Vector3.new(x, y, z)
print("✅ " .. locationName .. " updated to: " .. x .. ", " .. y .. ", " .. z)
else
print("❌ Location '" .. locationName .. "' not found")
print("Available: Police room, Cafeteria, armory or not, on top the roof, idk, guard tower")
end
end
Comments
No comments yet
Be the first to share your thoughts!