Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --made by Muscle_legends2021
- local PsychoButton = Instance.new("TextButton")
- PsychoButton.Name = "PsychoAnim"
- PsychoButton.Text = "Psycho Anim"
- PsychoButton.Size = UDim2.new(0, 200, 0, 50)
- PsychoButton.Position = UDim2.new(0.5, -100, 0.5, -25)
- PsychoButton.BackgroundColor3 = Color3.fromRGB(139, 0, 0) -- Dark red when toggled off
- PsychoButton.TextColor3 = Color3.new(1, 1, 1)
- PsychoButton.Font = Enum.Font.Arcade -- Scarier font
- PsychoButton.TextSize = 24
- PsychoButton.BorderSizePixel = 2
- PsychoButton.BorderColor3 = Color3.new(0, 0, 0)
- PsychoButton.Draggable = true
- local UICorner = Instance.new("UICorner")
- UICorner.CornerRadius = UDim.new(0, 10)
- UICorner.Parent = PsychoButton
- local UIStroke = Instance.new("UIStroke")
- UIStroke.Thickness = 2
- UIStroke.Color = Color3.new(0, 0, 0)
- UIStroke.Parent = PsychoButton
- local player = game.Players.LocalPlayer
- local screenGui = Instance.new("ScreenGui")
- screenGui.ResetOnSpawn = false -- Prevent GUI from disappearing on respawn
- screenGui.Parent = player:WaitForChild("PlayerGui")
- PsychoButton.Parent = screenGui
- local animation1 = Instance.new("Animation")
- animation1.AnimationId = "rbxassetid://33796059"
- local animation2 = Instance.new("Animation")
- animation2.AnimationId = "rbxassetid://184574340"
- local humanoid = player.Character:WaitForChild("Humanoid")
- local idleTrack = humanoid:LoadAnimation(animation1)
- local walkTrack = humanoid:LoadAnimation(animation2)
- local psychoActive = false
- local runningConnection
- PsychoButton.MouseButton1Click:Connect(function()
- psychoActive = not psychoActive
- if psychoActive then
- PsychoButton.BackgroundColor3 = Color3.fromRGB(0, 100, 0) -- Dark green when toggled on
- -- Idle Animation Loop
- task.spawn(function()
- while psychoActive do
- if humanoid.MoveDirection.Magnitude == 0 then
- idleTrack:Play(0.1, 1, 1e8)
- task.wait(0.2)
- idleTrack:Stop()
- task.wait(1.2)
- else
- task.wait(0.1)
- end
- end
- end)
- if runningConnection then runningConnection:Disconnect() end
- runningConnection = humanoid:GetPropertyChangedSignal("MoveDirection"):Connect(function()
- if psychoActive and humanoid.MoveDirection.Magnitude > 0 then
- if not walkTrack.IsPlaying then
- walkTrack:Play(0.1, 0.5, 40)
- walkTrack.Looped = true
- end
- else
- walkTrack:Stop()
- end
- end)
- else
- PsychoButton.BackgroundColor3 = Color3.fromRGB(139, 0, 0) -- Dark red when toggled off
- idleTrack:Stop()
- walkTrack:Stop()
- if runningConnection then runningConnection:Disconnect() end
- end
- end)
- game.Players.LocalPlayer.CharacterAdded:Connect(function(character)
- humanoid = character:WaitForChild("Humanoid")
- idleTrack = humanoid:LoadAnimation(animation1)
- walkTrack = humanoid:LoadAnimation(animation2)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement