Fr4st3yyt

Draggable GUI Script

Jul 30th, 2022
7,866
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local mouse = player:GetMouse()
  3.  
  4. mouse.Button1Down:Connect(function()
  5. script.Parent.Holding.Value = true
  6. end)
  7.  
  8. mouse.Button1Up:Connect(function()
  9. script.Parent.Holding.Value = false
  10. end)
  11.  
  12. mouse.Move:Connect(function()
  13. if script.Parent.Holding.Value == true then
  14. script.Parent.Frame.Position = UDim2.new(0,mouse.X,0,mouse.Y)
  15. end
  16. end)
Advertisement
Add Comment
Please, Sign In to add comment