Advertisement
artbarte

Natural Disaster Survival Win Every Round ( GUI )

Apr 24th, 2017
4,285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. -- Create ScreenGui
  2. local screenGui = Instance.new("ScreenGui")
  3. screenGui.Parent = game.Players.LocalPlayer.PlayerGui
  4.  
  5. -- Create TextButton
  6. local textButton = Instance.new("TextButton")
  7. textButton.Parent = screenGui
  8. textButton.Position = UDim2.new(0, 500, 0, 50)
  9. textButton.Size = UDim2.new(0, 200, 0, 50)
  10. textButton.BackgroundColor3 = BrickColor.Red().Color
  11. textButton.Active = true
  12. textButton.Draggable = true
  13. textButton.Text = "Teleport !"
  14.  
  15. -- Bind function to button click
  16. textButton.MouseButton1Down:connect(function()
  17. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-274.412628, 193.849991, 305.037903) + Vector3.new(1,0,0)
  18. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement