local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer --// Settings local spinning = false local direction = 1 -- 1 = clockwise, -1 = anti-clockwise local spinSpeed = 10 --// GUI local gui = Instance.new("ScreenGui") gui.Name = "SpinGUI" gui.ResetOnSpawn = false gui.Parent = player:WaitForChild("PlayerGui") local frame = Instance.new("Frame") frame.Size = UDim2.fromOffset(190, 175) frame.Position = UDim2.new(0.5, -95, 0.5, -87) frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0) frame.BorderColor3 = Color3.fromRGB(255, 255, 255) frame.BorderSizePixel = 2 frame.Active = true frame.Parent = gui --// Title local title = Instance.new("TextLabel") title.Size = UDim2.new(1, 0, 0, 30) title.BackgroundTransparency = 1 title.Text = "Spin" title.TextColor3 = Color3.fromRGB(255, 255, 255) title.TextSize = 18 title.Font = Enum.Font.SourceSansBold title.Parent = frame --// Speed Label local speedLabel = Instance.new("TextLabel") speedLabel.Position = UDim2.fromOffset(10, 35) speedLabel.Size = UDim2.fromOffset(80, 25) speedLabel.BackgroundTransparency = 1 speedLabel.Text = "Spin Speed:" speedLabel.TextColor3 = Color3.fromRGB(255, 255, 255) speedLabel.TextSize = 14 speedLabel.Font = Enum.Font.SourceSans speedLabel.TextXAlignment = Enum.TextXAlignment.Left speedLabel.Parent = frame --// Speed TextBox local speedBox = Instance.new("TextBox") speedBox.Position = UDim2.fromOffset(95, 35) speedBox.Size = UDim2.fromOffset(80, 25) speedBox.BackgroundColor3 = Color3.fromRGB(20, 20, 20) speedBox.BorderColor3 = Color3.fromRGB(255, 255, 255) speedBox.BorderSizePixel = 1 speedBox.Text = tostring(spinSpeed) speedBox.TextColor3 = Color3.fromRGB(255, 255, 255) speedBox.PlaceholderText = "Speed" speedBox.TextSize = 14 speedBox.ClearTextOnFocus = false speedBox.Font = Enum.Font.SourceSans speedBox.Parent = frame --// Button creator local function createButton(text, position) local button = Instance.new("TextButton") button.Position = position button.Size = UDim2.fromOffset(80, 30) button.BackgroundColor3 = Color3.fromRGB(20, 20, 20) button.BorderColor3 = Color3.fromRGB(255, 255, 255) button.BorderSizePixel = 1 button.Text = text button.TextColor3 = Color3.fromRGB(255, 255, 255) button.TextSize = 13 button.Font = Enum.Font.SourceSans button.Parent = frame return button end --// Buttons local spinButton = createButton("Spin: OFF", UDim2.fromOffset(55, 68)) local clockwiseButton = createButton("Clockwise", UDim2.fromOffset(10, 108)) local antiClockwiseButton = createButton("Anti-clockwise", UDim2.fromOffset(100, 108)) --// Spin toggle spinButton.MouseButton1Click:Connect(function() spinning = not spinning if spinning then spinButton.Text = "Spin: ON" local character = player.Character if character then local humanoid = character:FindFirstChildOfClass("Humanoid") if humanoid then humanoid.AutoRotate = false end end else spinButton.Text = "Spin: OFF" -- IMPORTANT: -- Give normal character rotation control back. local character = player.Character if character then local humanoid = character:FindFirstChildOfClass("Humanoid") if humanoid then humanoid.AutoRotate = true end end end end) --// Direction buttons clockwiseButton.MouseButton1Click:Connect(function() direction = 1 end) antiClockwiseButton.MouseButton1Click:Connect(function() direction = -1 end) --// Read speed speedBox.FocusLost:Connect(function() local value = tonumber(speedBox.Text) if value then spinSpeed = math.max(0, value) speedBox.Text = tostring(spinSpeed) else speedBox.Text = tostring(spinSpeed) end end) --// Spinning RunService.Heartbeat:Connect(function(deltaTime) if not spinning then return end local character = player.Character if not character then return end local root = character:FindFirstChild("HumanoidRootPart") local humanoid = character:FindFirstChildOfClass("Humanoid") if not root or not humanoid then return end -- Disable normal character rotation while spinning. humanoid.AutoRotate = false local rotation = math.rad(360) * spinSpeed * direction * deltaTime root.CFrame = root.CFrame * CFrame.Angles(0, rotation, 0) end) --// Character respawn handling player.CharacterAdded:Connect(function(character) local humanoid = character:WaitForChild("Humanoid") -- If the player isn't spinning, keep normal rotation enabled. if not spinning then humanoid.AutoRotate = true else humanoid.AutoRotate = false end end) --// Draggable GUI local dragging = false local dragStart local startPosition title.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPosition = frame.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) UserInputService.InputChanged:Connect(function(input) if not dragging then return end if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then local delta = input.Position - dragStart frame.Position = UDim2.new( startPosition.X.Scale, startPosition.X.Offset + delta.X, startPosition.Y.Scale, startPosition.Y.Offset + delta.Y ) end end)