Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Create ScreenGui
- local screenGui = Instance.new("ScreenGui")
- screenGui.Parent = game.Players.LocalPlayer.PlayerGui
- -- Create TextButton
- local textButton = Instance.new("TextButton")
- textButton.Parent = screenGui
- textButton.Position = UDim2.new(0, 500, 0, 50)
- textButton.Size = UDim2.new(0, 200, 0, 50)
- textButton.BackgroundColor3 = BrickColor.Red().Color
- textButton.Active = true
- textButton.Draggable = true
- textButton.Text = "Teleport !"
- -- Bind function to button click
- textButton.MouseButton1Down:connect(function()
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-274.412628, 193.849991, 305.037903) + Vector3.new(1,0,0)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement