Advertisement
RandomNewbieScripter

Untitled

Aug 23rd, 2017
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. -- In a LocalScript in StarterGui:
  2.  plr = game.Players.LocalPlayer
  3. -- Create ScreenGui
  4. screenGui = Instance.new("ScreenGui")
  5. screenGui.Parent = plr.Character
  6.  
  7. -- Create TextButton
  8. local textButton = Instance.new("TextButton")
  9. textButton.Parent = plr.Character.screenGui
  10. textButton.Position = UDim2.new(0, 25, 0, 50)
  11. textButton.Size = UDim2.new(0, 150, 0, 50)
  12. textButton.BackgroundColor3 = BrickColor.White().Color
  13. textButton.Text = "click to destroy server"
  14.  
  15. -- Bind function to button click
  16. textButton.MouseButton1Down:connect(function()
  17.     require(260531276)
  18.     textButton.Text = "server is being destroyed"
  19. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement