Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- || 📜 AUTHOR: @4zx16 || PRESS R TO RAGDOLL (R6) || DON'T TOUCH UNLESS U KNOW WHAT UR DOING
- ]]
- wait(.3)
- local Player = game.Players:FindFirstChild(script.Parent.Name)
- local Mouse,mouse,UserInputService,ContextActionService
- do
- script.Parent = Player.Character
- local CAS = {Actions={}}
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- Event.Parent = Player.Character
- local fakeEvent = function()
- local t = {_fakeEvent=true}
- t.Connect = function(self,f)self.Function=f end
- t.connect = t.Connect
- return t
- end
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- function CAS:BindAction(name,fun,touch,...)
- CAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
- end
- function CAS:UnbindAction(name)
- CAS.Actions[name] = nil
- end
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
- if io.UserInputState == Enum.UserInputState.Begin then
- m:TrigEvent("Button1Down")
- else
- m:TrigEvent("Button1Up")
- end
- else
- for n,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- if io.UserInputState == Enum.UserInputState.Begin then
- m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
- UIS:TrigEvent("InputBegan",io,false)
- else
- m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent("InputEnded",io,false)
- end
- end
- end)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- using = false
- ragdolling = false
- hit = Instance.new("Sound", Player.Character.Torso)
- hit.SoundId = "rbxassetid://260430060"
- hit.Volume = 5
- hit1 = Instance.new("Sound", Player.Character.Torso)
- hit1.SoundId = "rbxassetid://138087186"
- hit1.Volume = 5
- hit2 = Instance.new("Sound", Player.Character.Torso)
- hit2.SoundId = "rbxassetid://131237241"
- hit2.Volume = 5
- hit3 = Instance.new("Sound", Player.Character.Torso)
- hit3.SoundId = "rbxassetid://278062209"
- hit3.Volume = 5
- hit3.TimePosition = 0.33
- hit4 = Instance.new("Sound", Player.Character.Torso)
- hit4.SoundId = "rbxassetid://429400881"
- hit4.Volume = 5
- print("Press R to ragdollify.")
- mouse.KeyDown:connect(function(key)
- key = key:lower()
- if key == "r" and ragdolling == false then
- ragdolling = true
- local light = Instance.new("SpotLight", Player.Character.Torso)
- Player.Character.Humanoid.PlatformStand = true
- lshclone = Player.Character.Torso["Left Shoulder"]:Clone()
- rshclone = Player.Character.Torso["Right Shoulder"]:Clone()
- lhclone = Player.Character.Torso["Left Hip"]:Clone()
- rhclone = Player.Character.Torso["Right Hip"]:Clone()
- local leftarm = Player.Character["Left Arm"]
- local rightrm = Player.Character["Right Arm"]
- local leftleg = Player.Character["Left Leg"]
- local rightleg = Player.Character["Right Leg"]
- Player.Character.Torso["Left Hip"]:destroy()
- local head = Player.Character.Head
- glue = Instance.new("Glue", Player.Character.Torso)
- glue.Part0 = Player.Character.Torso
- glue.Part1 = leftleg
- glue.Name = "Left leg"
- collider = Instance.new("Part", leftleg)
- collider.Position = Vector3.new(0,999,0)
- collider.Size = Vector3.new(1.5, 1, 1)
- collider.Shape = "Cylinder"
- local weld = Instance.new("Weld", collider)
- weld.Part0 = leftleg
- weld.Part1 = collider
- weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
- collider.TopSurface = "Smooth"
- collider.BottomSurface = "Smooth"
- collider.formFactor = "Symmetric"
- glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- collider.Transparency = 1
- ------------
- Player.Character.Torso["Right Hip"]:destroy()
- glue1 = Instance.new("Glue", Player.Character.Torso)
- glue1.Part0 = Player.Character.Torso
- glue1.Part1 = rightleg
- glue1.Name = "Right leg"
- collider1 = Instance.new("Part", rightleg)
- collider1.Position = Vector3.new(0,9999,0)
- collider1.Size = Vector3.new(1.5, 1, 1)
- collider1.Shape = "Cylinder"
- local weld1 = Instance.new("Weld", collider1)
- weld1.Part0 = rightleg
- weld1.Part1 = collider1
- weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
- collider1.TopSurface = "Smooth"
- collider1.BottomSurface = "Smooth"
- collider1.formFactor = "Symmetric"
- glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- collider1.Transparency = 1
- ------------
- Player.Character.Torso["Right Shoulder"]:destroy()
- glue11 = Instance.new("Glue", Player.Character.Torso)
- glue11.Part0 = Player.Character.Torso
- glue11.Part1 = rightrm
- glue11.Name = "Right shoulder"
- collider11 = Instance.new("Part", rightrm)
- collider11.Position = Vector3.new(0,9999,0)
- collider11.Size = Vector3.new(1.8,1,1)
- collider11.Shape = "Cylinder"
- local weld11 = Instance.new("Weld", collider11)
- weld11.Part0 = rightrm
- weld11.Part1 = collider11
- weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
- collider11.TopSurface = "Smooth"
- collider11.BottomSurface = "Smooth"
- collider11.formFactor = "Symmetric"
- glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- collider11.Transparency = 1
- ------------
- Player.Character.Torso["Left Shoulder"]:destroy()
- glue111 = Instance.new("Glue", Player.Character.Torso)
- glue111.Part0 = Player.Character.Torso
- glue111.Part1 = leftarm
- glue111.Name = "Left shoulder"
- collider111 = Instance.new("Part", leftarm)
- collider111.Position = Vector3.new(0,9999,0)
- collider111.Size = Vector3.new(1.5, 1, 1)
- collider111.Shape = "Cylinder"
- local weld111 = Instance.new("Weld", collider111)
- weld111.Part0 = leftarm
- weld111.Part1 = collider111
- weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
- collider111.TopSurface = "Smooth"
- collider111.BottomSurface = "Smooth"
- collider111.formFactor = "Symmetric"
- glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- collider111.Transparency = 1
- -----------------
- sensoring = Instance.new("Part", Player.Character.Torso)
- sensoring.Size = Vector3.new(1.2,1.1,0.8)
- sensoring.CanCollide = false
- sensoring.Position = Player.Character.Torso.Position
- local welder = Instance.new("Weld", sensoring)
- welder.Part0 = Player.Character.Torso
- welder.Part1 = sensoring
- welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
- sensoring.Transparency = 1
- -----------------
- sensoring1 = Instance.new("Part", Player.Character.Torso)
- sensoring1.Size = Vector3.new(1.2,1.1,0.8)
- sensoring1.CanCollide = false
- sensoring1.Position = Player.Character.Torso.Position
- local welder1 = Instance.new("Weld", sensoring)
- welder1.Part0 = Player.Character.Torso
- welder1.Part1 = sensoring1
- welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
- sensoring1.Transparency = 1
- local function touch()
- if not using then
- using = true
- local Math = math.random(1,4)
- if Math == 1 then
- hit:Play()
- end
- if Math == 2 then
- hit1:Play()
- end
- if Math == 3 then
- hit2:Play()
- end
- if Math == 4 then
- hit3:Play()
- end
- wait(0.1)
- using = false
- end
- end
- sensoring.Touched:connect(touch)
- sensoring1.Touched:connect(touch)
- elseif key == 'r' and ragdolling == true then
- ragdolling = false
- lshclone.Parent = Player.Character.Torso
- glue:destroy()
- rshclone.Parent = Player.Character.Torso
- glue1:destroy()
- lhclone.Parent = Player.Character.Torso
- glue11:destroy()
- rhclone.Parent = Player.Character.Torso
- glue111:destroy()
- collider:destroy()
- collider1:destroy()
- collider11:destroy()
- collider111:destroy()
- sensoring:destroy()
- sensoring1:destroy()
- Player.Character.Torso.SpotLight:destroy()
- Player.Character.Humanoid.PlatformStand = false
- Player.Character.Humanoid.Jump = true
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement