Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. -- Create ScreenGui
  2. local screenGui = Instance.new("ScreenGui")
  3. screenGui.Parent = game.CoreGui
  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.BorderSizePixel = 4
  11. textButton.BackgroundColor3 = BrickColor.Red().Color
  12. textButton.Active = true
  13. textButton.Draggable = true
  14. textButton.TextSize = 32
  15. textButton.Font = "SciFi"
  16. textButton.Text = "Run Script !"
  17.  
  18. -- Bind function to button click
  19. textButton.MouseButton1Down:connect(function()
  20. for i = 1, math.huge, 1 do
  21. wait(0.5)
  22. yourtarget = game.Players.LocalPlayer.PlayerGui.ScreenGui.UI.Target.Img.PlayerText
  23. plr = game.Players:FindFirstChild(yourtarget.Text)
  24. plr.Character.Head.Position = game.Players.LocalPlayer.Character.Head.Position + Vector3.new(0,-1,2)
  25. end
  26. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement