Advertisement
maximdnepr1

Roblox script TP to player GUI

Mar 11th, 2023 (edited)
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.28 KB | None | 0 0
  1. local ScreenGui = Instance.new("ScreenGui")
  2. local Frame = Instance.new("Frame")
  3. local Frame1 = Instance.new("Frame")
  4. local TextLabel = Instance.new("TextLabel")
  5. local UIGradient = Instance.new("UIGradient")
  6. local TextLabel_2 = Instance.new("TextLabel")
  7. local Teleport = Instance.new("TextButton")
  8. local TextBox = Instance.new("TextBox")
  9. local Close = Instance.new("ImageButton")
  10. local UIGradient_2 = Instance.new("UIGradient")
  11.  
  12. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  13. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  14.  
  15. Frame.Parent = ScreenGui
  16. Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  17. Frame.BorderSizePixel = 2
  18. Frame.Position = UDim2.new(0.0385470726, 0, 0.092187494, 0)
  19. Frame.Size = UDim2.new(0, 225, 0, 153)
  20.  
  21. Frame1.Name = "Frame1"
  22. Frame1.Parent = Frame
  23. Frame1.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  24. Frame1.Size = UDim2.new(0, 225, 0, 18)
  25.  
  26. TextLabel.Parent = Frame1
  27. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  28. TextLabel.BackgroundTransparency = 1.000
  29. TextLabel.ClipsDescendants = true
  30. TextLabel.Position = UDim2.new(0.0933333337, 0, -0.0333333313, 0)
  31. TextLabel.Size = UDim2.new(0, 182, 0, 18)
  32. TextLabel.Font = Enum.Font.Creepster
  33. TextLabel.Text = "Teleport to player script"
  34. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  35. TextLabel.TextScaled = true
  36. TextLabel.TextSize = 19.000
  37. TextLabel.TextWrapped = true
  38.  
  39. UIGradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(0, 0, 0)), ColorSequenceKeypoint.new(0.44, Color3.fromRGB(18, 18, 18)), ColorSequenceKeypoint.new(0.74, Color3.fromRGB(21, 21, 21)), ColorSequenceKeypoint.new(0.90, Color3.fromRGB(30, 30, 30)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(38, 38, 38))}
  40. UIGradient.Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0.00, 0.12), NumberSequenceKeypoint.new(1.00, 0.12)}
  41. UIGradient.Parent = Frame1
  42.  
  43. TextLabel_2.Parent = Frame
  44. TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  45. TextLabel_2.BackgroundTransparency = 1.000
  46. TextLabel_2.Position = UDim2.new(0.217777774, 0, 0.206342652, 0)
  47. TextLabel_2.Size = UDim2.new(0, 127, 0, 34)
  48. TextLabel_2.Font = Enum.Font.Creepster
  49. TextLabel_2.Text = "Player Name:"
  50. TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  51. TextLabel_2.TextScaled = true
  52. TextLabel_2.TextSize = 14.000
  53. TextLabel_2.TextStrokeTransparency = 0.000
  54. TextLabel_2.TextWrapped = true
  55.  
  56. Teleport.Name = "Teleport"
  57. Teleport.Parent = Frame
  58. Teleport.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  59. Teleport.BackgroundTransparency = 1.000
  60. Teleport.BorderSizePixel = 100
  61. Teleport.Position = UDim2.new(0.213333324, 0, 0.745098054, 0)
  62. Teleport.Size = UDim2.new(0, 128, 0, 32)
  63. Teleport.Font = Enum.Font.Creepster
  64. Teleport.Text = "Teleport"
  65. Teleport.TextColor3 = Color3.fromRGB(255, 255, 255)
  66. Teleport.TextScaled = true
  67. Teleport.TextSize = 30.000
  68. Teleport.TextStrokeTransparency = 0.000
  69. Teleport.TextWrapped = true
  70.  
  71. TextBox.Parent = Frame
  72. TextBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  73. TextBox.BackgroundTransparency = 0.450
  74. TextBox.Position = UDim2.new(0.0933333337, 0, 0.470588237, 0)
  75. TextBox.Size = UDim2.new(0, 182, 0, 31)
  76. TextBox.Font = Enum.Font.FredokaOne
  77. TextBox.Text = ""
  78. TextBox.TextColor3 = Color3.fromRGB(0, 0, 0)
  79. TextBox.TextScaled = true
  80. TextBox.TextSize = 14.000
  81. TextBox.TextWrapped = true
  82.  
  83. Close.Name = "Close"
  84. Close.Parent = Frame
  85. Close.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  86. Close.BackgroundTransparency = 1.000
  87. Close.Position = UDim2.new(0.920000017, 0, -0.00653594779, 0)
  88. Close.Size = UDim2.new(0, 18, 0, 18)
  89. Close.Image = "rbxassetid://12354611575"
  90.  
  91. UIGradient_2.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(29, 29, 29)), ColorSequenceKeypoint.new(0.18, Color3.fromRGB(38, 38, 38)), ColorSequenceKeypoint.new(0.47, Color3.fromRGB(58, 57, 57)), ColorSequenceKeypoint.new(0.68, Color3.fromRGB(70, 69, 69)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(90, 90, 90))}
  92. UIGradient_2.Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0.00, 0.12), NumberSequenceKeypoint.new(1.00, 0.12)}
  93. UIGradient_2.Parent = Frame
  94.  
  95. local function RBSSYU_fake_script() -- Frame1.LocalScript
  96.     local script = Instance.new('LocalScript', Frame1)
  97.  
  98.     local UIS = game:GetService('UserInputService')
  99.    
  100.     local frame = script.Parent.Parent
  101.    
  102.    
  103.    
  104.     local dragToggle = nil
  105.    
  106.     local dragSpeed = 0.05
  107.    
  108.     local dragStart = nil
  109.    
  110.     local startPos = nil
  111.    
  112.    
  113.    
  114.     local function updateInput(input)
  115.    
  116.         local delta = input.Position - dragStart
  117.    
  118.         local position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X,
  119.    
  120.             startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  121.    
  122.         game:GetService('TweenService'):Create(frame, TweenInfo.new(dragSpeed), {Position = position}):Play()
  123.    
  124.     end
  125.    
  126.    
  127.    
  128.     frame.InputBegan:Connect(function(input)
  129.    
  130.         if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then
  131.    
  132.             dragToggle = true
  133.    
  134.             dragStart = input.Position
  135.    
  136.             startPos = frame.Position
  137.    
  138.             input.Changed:Connect(function()
  139.    
  140.                 if input.UserInputState == Enum.UserInputState.End then
  141.    
  142.                     dragToggle = false
  143.    
  144.                 end
  145.    
  146.             end)
  147.    
  148.         end
  149.    
  150.     end)
  151.    
  152.    
  153.    
  154.     UIS.InputChanged:Connect(function(input)
  155.    
  156.         if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  157.    
  158.             if dragToggle then
  159.    
  160.                 updateInput(input)
  161.    
  162.             end
  163.    
  164.         end
  165.    
  166.     end)
  167. end
  168. coroutine.wrap(RBSSYU_fake_script)()
  169. local function LERNDIO_fake_script() -- TextBox.LocalScript
  170.     local script = Instance.new('LocalScript', TextBox)
  171.  
  172.     local button = script.Parent.Parent.Teleport
  173.    
  174.     local function onButtonActivated()
  175.         local ooooooof = script.Parent.Text
  176.         local plr1 = game.Players.LocalPlayer.Character
  177.         local plr2 = game.Workspace:FindFirstChild(ooooooof)
  178.         plr1.HumanoidRootPart.CFrame = plr2.HumanoidRootPart.CFrame * CFrame.new(0,2,0)
  179.     end
  180.    
  181.     button.Activated:Connect(onButtonActivated)
  182. end
  183. coroutine.wrap(LERNDIO_fake_script)()
  184. local function DPEIIPL_fake_script() -- Close.LocalScript
  185.     local script = Instance.new('LocalScript', Close)
  186.  
  187.     local closebutton = script.Parent
  188.     local Gui = script.Parent.Parent.Parent
  189.     closebutton.MouseButton1Click:Connect(function()
  190.         Gui.Enabled = false
  191.         end)
  192.    
  193. end
  194. coroutine.wrap(DPEIIPL_fake_script)()
  195.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement