Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local RS = game:GetService("RunService")
- local Plrs = game:GetService("Players")
- local Gui = game:GetService("GuiService")
- local LP = Plrs.LocalPlayer
- local Scripts = LP:WaitForChild("PlayerScripts")
- local Module = require(Scripts:WaitForChild("PlayerModule"))
- local Controls = Module:GetControls()
- local Banned = {"BallSocketConstraint", "HingeConstraint", "NoCollisionConstraint"}
- local function FixControls()
- Controls:Enable()
- if LP.DevTouchMovementMode == Enum.DevTouchMovementMode.Scriptable then
- LP.DevTouchMovementMode = Enum.DevTouchMovementMode.UserChoice
- end
- if LP.DevComputerMovementMode == Enum.DevComputerMovementMode.Scriptable then
- LP.DevComputerMovementMode = Enum.DevComputerMovementMode.UserChoice
- end
- if not Gui.TouchControlsEnabled then
- Gui.TouchControlsEnabled = true
- end
- end
- local function Clean(char)
- if not char then return end
- local hum = char:FindFirstChildOfClass("Humanoid")
- if not hum then return end
- if hum.PlatformStand then hum.PlatformStand = false end
- if hum.Sit then hum.Sit = false end
- local state = hum:GetState()
- if state == Enum.HumanoidStateType.Physics or state == Enum.HumanoidStateType.Dead then
- hum:ChangeState(Enum.HumanoidStateType.Running)
- end
- if hum.WalkSpeed < 16 then hum.WalkSpeed = 16 end
- for _, v in ipairs(char:GetDescendants()) do
- if table.find(Banned, v.ClassName) then
- v:Destroy()
- elseif v:IsA("Motor6D") and not v.Enabled then
- v.Enabled = true
- elseif v:IsA("Attachment") and (v.Name == "Attachment" or v.Name == "Attachment 6") then
- if v.Parent and v.Parent:IsA("BasePart") and not v.Parent.Parent:IsA("Accessory") then
- v:Destroy()
- end
- end
- end
- end
- RS:BindToRenderStep("AntiRagdoll", Enum.RenderPriority.Last.Value + 1, function()
- FixControls()
- if LP.Character then
- Clean(LP.Character)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment