Advertisement
Tubers93slol_scripts

Spin script

Sep 9th, 2024 (edited)
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local mouse = player:GetMouse()
  3.  
  4. local screenGui = Instance.new("ScreenGui")
  5. screenGui.Name = "SpinGui"
  6. screenGui.Parent = player:WaitForChild("PlayerGui")
  7.  
  8. local spinButton = Instance.new("TextButton")
  9. spinButton.Size = UDim2.new(0, 100, 0, 50)
  10. spinButton.Position = UDim2.new(0.5, -50, 0.5, -25)
  11. spinButton.Text = "Spin"
  12. spinButton.Parent = screenGui
  13.  
  14. local unspinButton = Instance.new("TextButton")
  15. unspinButton.Size = UDim2.new(0, 100, 0, 50)
  16. unspinButton.Position = UDim2.new(0.5, -50, 0.6, -25)
  17. unspinButton.Text = "Unspin"
  18. unspinButton.Parent = screenGui
  19.  
  20. local spinning = false
  21.  
  22. local function spin()
  23. spinning = true
  24. while spinning do
  25. player.Character.HumanoidRootPart.Velocity = player.Character.HumanoidRootPart.CFrame.LookVector * 2000
  26. wait(0.1)
  27. end
  28. end
  29.  
  30. local function stopSpin()
  31. spinning = false
  32. player.Character.HumanoidRootPart.Velocity = Vector3.new(0, 0, 0)
  33. end
  34.  
  35. spinButton.MouseButton1Click:Connect(spin)
  36. unspinButton.MouseButton1Click:Connect(stopSpin)
  37.  
  38. screenGui.Draggable = true
  39. screenGui.Selectable = true
  40.  
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement