Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game:GetService("Players").LocalPlayer
- local char = plr.Character
- local hum = char.Humanoid
- local bot = false
- game:GetService("UserInputService").InputBegan:Connect(function(k,b)
- local key = k.KeyCode
- if b == true then
- if key == Enum.KeyCode.Z then
- bot = not bot
- end
- end
- end)
- game:GetService("RunService").Stepped:Connect(function()
- if bot == true then
- for i,v in pairs(char:GetChildren()) do
- if v:IsA"Part" or v:IsA"MeshPart" then
- v.CanCollide = false
- v.Massless = true
- end
- end
- hum:SetStateEnabled(Enum.HumanoidStateType.FallingDown,false)
- hum:SetStateEnabled(Enum.HumanoidStateType.Freefall,false)
- hum:SetStateEnabled(Enum.HumanoidStateType.Running,false)
- hum:ChangeState(Enum.HumanoidStateType.RunningNoPhysics)
- elseif bot == false then
- for i,v in pairs(char:GetChildren()) do
- if v:IsA"Part" or v:IsA"MeshPart" then
- v.CanCollide = true
- v.Massless = false
- end
- end
- hum:SetStateEnabled(Enum.HumanoidStateType.FallingDown,true)
- hum:SetStateEnabled(Enum.HumanoidStateType.Freefall,true)
- hum:SetStateEnabled(Enum.HumanoidStateType.Running,true)
- end
- end)
Add Comment
Please, Sign In to add comment