Advertisement
Guest User

teleport gui roblox

a guest
Sep 19th, 2016
38,151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.95 KB | None | 0 0
  1. local quickPlaceID = 491748710
  2. local justGo = true
  3. local whitelistPlayers = {"MalinYT"}
  4.  
  5.  
  6. local GUI = game:GetObjects("rbxassetid://281287169")[1]:Clone()
  7. GUI.Parent = game.Players.LocalPlayer.PlayerGui
  8. script.Parent = GUI
  9.  
  10. local mainWindow = GUI:WaitForChild("Window")
  11. local mainWindowContent = mainWindow:WaitForChild("Main")
  12. local outputBase = mainWindowContent:WaitForChild("OutputText")
  13. local outputBox = mainWindowContent:WaitForChild("Output")
  14. local Settings = mainWindowContent:WaitForChild("Settings")
  15. local ToId = mainWindowContent:WaitForChild("PlaceID")
  16. local GoButton = mainWindowContent:WaitForChild("GOButton")
  17. local AutoButton = Settings:WaitForChild("AutoSetting")
  18.  
  19. local PID = ""
  20. local LocatedTeleporter = ""
  21. local located = false
  22. local foundTele = ""
  23. local speedrun = false
  24.  
  25. ToId.Text = tostring(quickPlaceID)
  26.  
  27. function RecursiveSearch(obj, objname) -- Old ALX Function
  28. local foundObj = false
  29. for i,v in pairs(obj:GetChildren()) do
  30. if v.Name == objname then
  31. foundObj = v
  32. end
  33. end
  34. return foundObj
  35. end
  36.  
  37. function FindTeleporter(root)
  38. for i,v in pairs(root:GetChildren()) do
  39. if RecursiveSearch(v,"TouchScript") and RecursiveSearch(v,"teleBeam1") then
  40. foundTele = v
  41. return
  42. end
  43. FindTeleporter(v)
  44. end
  45. if game.PlaceId == 183364845 then
  46. foundTele = workspace.TpToNextWorld
  47. speedrun = true
  48. return
  49. end
  50. end
  51.  
  52. function printOutput(str)
  53. for i,v in pairs(outputBox:GetChildren()) do
  54. if v.Position.Y.Offset < 10 then
  55. v:Destroy()
  56. end
  57. v.Position = UDim2.new(0,0,0,v.Position.Y.Offset-20)
  58. end
  59. local newOutput = outputBase:Clone()
  60. newOutput.Position = UDim2.new(0,0,0,285)
  61. newOutput.Parent = outputBox
  62. newOutput.Text = str
  63. newOutput.Visible = true
  64. end
  65.  
  66. function locateTeleporter()
  67. FindTeleporter(workspace)
  68. if foundTele == false then
  69. printOutput("Teleporter not found. Cannot continue.")
  70. else
  71. if RecursiveSearch(foundTele,"PlaceId") then
  72. printOutput("Teleporter found... Masking...")
  73. for i,v2 in pairs(foundTele:GetChildren()) do -- Masks your teleporter
  74. if v2:isA("BasePart") then
  75. if RecursiveSearch(v2,"Decal") then
  76. v2.Decal:Destroy()
  77. end
  78. v2.Transparency = 1
  79. v2.Anchored = true
  80. v2.CanCollide = false
  81. end
  82. end
  83. PID = foundTele.PlaceId
  84. print(PID)
  85. LocatedTeleporter = foundTele
  86. located = true
  87. elseif RecursiveSearch(foundTele.TouchScript.TeleportScript, "PlaceId") then
  88. printOutput("Teleporter found... Masking...")
  89. for i,v2 in pairs(foundTele:GetChildren()) do -- Masks your teleporter
  90. if v2:isA("BasePart") then
  91. if RecursiveSearch(v2,"Decal") then
  92. v2.Decal:Destroy()
  93. end
  94. v2.Transparency = 1
  95. v2.Anchored = true
  96. v2.CanCollide = false
  97. end
  98. end
  99. PID = foundTele.TouchScript.TeleportScript.PlaceId
  100. LocatedTeleporter = foundTele
  101. located = true
  102. else
  103. printOutput("Incompatible teleporter.")
  104. end
  105. end
  106. end
  107.  
  108. function checkWhitelist(name)
  109. for i,v in pairs(whitelistPlayers) do
  110. if v == name then
  111. return false
  112. end
  113. end
  114. return true
  115. end
  116.  
  117. function Place()
  118. local placeID = ToId.Text
  119. if #game.Players:GetChildren() - 1 - #whitelistPlayers == 0 then
  120. printOutput("No players to teleport.")
  121. return
  122. elseif placeID == "" or string.find(placeID,"%a") or string.len(placeID) > 9 then
  123. printOutput("Invalid ID")
  124. return
  125. end
  126. print("Teleportation process to "..placeID.." has started on "..#game.Players:GetChildren() - 1 - #whitelistPlayers)
  127. if located then
  128. print("--=Teleporter Found, starting teleport=--")
  129. PID.Value = placeID
  130. if speedrun then
  131. LocatedTeleporter.swagtp.Disabled = true
  132. wait()
  133. LocatedTeleporter.swagtp.Disabled = false
  134. end
  135. for i,v in pairs(game.Players:GetPlayers()) do
  136. if v.Name ~= game.Players.LocalPlayer.Name and checkWhitelist(v.Name) then
  137. if RecursiveSearch(game.Players,v.Name) and RecursiveSearch(game.Workspace,v.Name) then
  138. printOutput("Attempting to teleport "..v.Name.." to "..placeID.."...")
  139. local playerBase = game.Workspace:FindFirstChild(v.Name)
  140. for i,v2 in pairs(playerBase:GetChildren()) do -- Masks the player
  141. if v2:isA("BasePart") then
  142. if RecursiveSearch(v2,"face") then
  143. v2.face:Destroy()
  144. end
  145. v2.Transparency = 1
  146. elseif v:isA("Hat") then
  147. v2:Destroy()
  148. end
  149. end
  150. spawn(function()
  151. while wait() do
  152. if not game.Players:FindFirstChild(v.Name) then return end
  153. if game.Workspace:FindFirstChild(v.Name) then
  154. playerBase = game.Workspace:FindFirstChild(v.Name)
  155. if playerBase:FindFirstChild("Torso") and not speedrun then
  156. playerBase.HumanoidRootPart.CFrame = LocatedTeleporter.teleBeam1.CFrame
  157. else
  158. playerBase.HumanoidRootPart.CFrame = LocatedTeleporter.CFrame
  159. end
  160. end
  161. end
  162. printOutput("Teleported "..v.Name.." to "..placeID.." successfully.")
  163. end)
  164. end
  165. end
  166. end
  167. else
  168. printOutput("Teleporter Not Found")
  169. end
  170. end
  171.  
  172. wait()
  173. printOutput("-==== Limited Placing Gui by Raspberry Pi loaded ===-")
  174. printOutput("Locating teleporter...")
  175. wait(0.5)
  176. locateTeleporter()
  177. if located then
  178. printOutput('Ready. Paste in a PlaceId and click "GO" to start placing.')
  179. if justGo then
  180. Place()
  181. end
  182. GoButton.Active = true
  183. GoButton.TextColor3 = Color3.new(1,1,1)
  184. GoButton.MouseButton1Down:connect(function()
  185. if AutoButton.enabled.Visible then return end
  186. Place()
  187. end)
  188. AutoButton.MouseButton1Down:connect(function()
  189. if AutoButton.enabled.Visible == false then
  190. AutoButton.enabled.Visible = true
  191. printOutput("Auto On.")
  192. else
  193. AutoButton.enabled.Visible = false
  194. printOutput("Auto Off.")
  195. end
  196. end)
  197. spawn(function()
  198. while wait(1) do
  199. if AutoButton.enabled.Visible == true then
  200. GoButton.Active = false
  201. GoButton.TextColor3 = Color3.new(160/255, 160/255, 160/255)
  202. Place()
  203. else
  204. GoButton.Active = true
  205. GoButton.TextColor3 = Color3.new(1,1,1)
  206. end
  207. end
  208. end)
  209. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement