Actuallyimabaddie

Untitled

Apr 30th, 2026
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.54 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local UIS = game:GetService("UserInputService")
  3.  
  4. local player = Players.LocalPlayer
  5.  
  6. -- GUI
  7. local screenGui = Instance.new("ScreenGui")
  8. screenGui.Parent = player:WaitForChild("PlayerGui")
  9.  
  10. local frame = Instance.new("Frame")
  11. frame.Parent = screenGui
  12. frame.Size = UDim2.new(0, 220, 0, 160)
  13. frame.Position = UDim2.new(0.5, -110, 0.5, -80)
  14. frame.BackgroundColor3 = Color3.fromRGB(35,35,35)
  15. frame.BorderSizePixel = 0
  16.  
  17. local corner = Instance.new("UICorner")
  18. corner.CornerRadius = UDim.new(0,12)
  19. corner.Parent = frame
  20.  
  21. -- Title
  22. local title = Instance.new("TextLabel")
  23. title.Parent = frame
  24. title.Size = UDim2.new(1,0,0,35)
  25. title.BackgroundTransparency = 1
  26. title.Text = "Teleport GUI"
  27. title.TextScaled = true
  28. title.Font = Enum.Font.GothamBold
  29. title.TextColor3 = Color3.new(1,1,1)
  30.  
  31. -- Spawn Button
  32. local spawnButton = Instance.new("TextButton")
  33. spawnButton.Parent = frame
  34. spawnButton.Size = UDim2.new(0.85,0,0,45)
  35. spawnButton.Position = UDim2.new(0.075,0,0.32,0)
  36. spawnButton.Text = "Teleport To Spawn"
  37. spawnButton.TextScaled = true
  38. spawnButton.Font = Enum.Font.GothamBold
  39. spawnButton.BackgroundColor3 = Color3.fromRGB(0,170,255)
  40. spawnButton.TextColor3 = Color3.new(1,1,1)
  41.  
  42. local spawnCorner = Instance.new("UICorner")
  43. spawnCorner.CornerRadius = UDim.new(0,10)
  44. spawnCorner.Parent = spawnButton
  45.  
  46. -- House Button
  47. local houseButton = Instance.new("TextButton")
  48. houseButton.Parent = frame
  49. houseButton.Size = UDim2.new(0.85,0,0,45)
  50. houseButton.Position = UDim2.new(0.075,0,0.67,0)
  51. houseButton.Text = "Teleport To House"
  52. houseButton.TextScaled = true
  53. houseButton.Font = Enum.Font.GothamBold
  54. houseButton.BackgroundColor3 = Color3.fromRGB(255,100,100)
  55. houseButton.TextColor3 = Color3.new(1,1,1)
  56.  
  57. local houseCorner = Instance.new("UICorner")
  58. houseCorner.CornerRadius = UDim.new(0,10)
  59. houseCorner.Parent = houseButton
  60.  
  61. -- Dragging
  62. local dragging = false
  63. local dragInput
  64. local dragStart
  65. local startPos
  66.  
  67. local function update(input)
  68. local delta = input.Position - dragStart
  69. frame.Position = UDim2.new(
  70. startPos.X.Scale,
  71. startPos.X.Offset + delta.X,
  72. startPos.Y.Scale,
  73. startPos.Y.Offset + delta.Y
  74. )
  75. end
  76.  
  77. title.InputBegan:Connect(function(input)
  78. if input.UserInputType == Enum.UserInputType.MouseButton1
  79. or input.UserInputType == Enum.UserInputType.Touch then
  80. dragging = true
  81. dragStart = input.Position
  82. startPos = frame.Position
  83.  
  84. input.Changed:Connect(function()
  85. if input.UserInputState == Enum.UserInputState.End then
  86. dragging = false
  87. end
  88. end)
  89. end
  90. end)
  91.  
  92. title.InputChanged:Connect(function(input)
  93. if input.UserInputType == Enum.UserInputType.MouseMovement
  94. or input.UserInputType == Enum.UserInputType.Touch then
  95. dragInput = input
  96. end
  97. end)
  98.  
  99. UIS.InputChanged:Connect(function(input)
  100. if input == dragInput and dragging then
  101. update(input)
  102. end
  103. end)
  104.  
  105. -- Teleport Function
  106. local function teleport(cf)
  107. local character = player.Character or player.CharacterAdded:Wait()
  108. local hrp = character:WaitForChild("HumanoidRootPart")
  109.  
  110. hrp.CFrame = cf + Vector3.new(0,5,0)
  111. end
  112.  
  113. -- Spawn TP
  114. spawnButton.MouseButton1Click:Connect(function()
  115. teleport(workspace.SpawnLocation.CFrame)
  116. end)
  117.  
  118. -- House TP
  119. houseButton.MouseButton1Click:Connect(function()
  120. local target = workspace.Houses.House_15.Build.Frames:GetChildren()[3]
  121.  
  122. if target:IsA("BasePart") then
  123. teleport(target.CFrame)
  124.  
  125. elseif target:IsA("Model") then
  126. local part = target.PrimaryPart or target:FindFirstChildWhichIsA("BasePart")
  127.  
  128. if part then
  129. teleport(part.CFrame)
  130. end
  131. end
  132. end)
Advertisement
Add Comment
Please, Sign In to add comment