Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- local RealPlayer = Player
- local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="E"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("E")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer warn'youngmacka123s script switcher. had fun doing the challenge that gave me this idea.'
- plr = owner
- char = plr.Character
- tors = char.Torso
- ra = char["Right Arm"]
- la = char["Left Arm"]
- rl = char["Right Leg"]
- ll = char["Left Leg"]
- hed = char.Head
- root = char.HumanoidRootPart
- hum = char.Humanoid
- function ragdoll(ch)
- ch.Humanoid.PlatformStand = true
- lshclone = ch.Torso["Left Shoulder"]
- rshclone = ch.Torso["Right Shoulder"]
- lhclone = ch.Torso["Left Hip"]
- rhclone = ch.Torso["Right Hip"]
- local leftarm = ch["Left Arm"]
- local rightrm = ch["Right Arm"]
- local leftleg = ch["Left Leg"]
- local rightleg = ch["Right Leg"]
- ch.Torso["Left Hip"].Parent = nil
- local head = ch.Head
- glue = Instance.new("Glue", ch.Torso)
- glue.Part0 = ch.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
- ------------
- ch.Torso["Right Hip"].Parent = nil
- glue1 = Instance.new("Glue", ch.Torso)
- glue1.Part0 = ch.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
- ------------
- ch.Torso["Right Shoulder"].Parent = nil
- glue11 = Instance.new("Glue", ch.Torso)
- glue11.Part0 = ch.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
- ------------
- ch.Torso["Left Shoulder"].Parent = nil
- glue111 = Instance.new("Glue", ch.Torso)
- glue111.Part0 = ch.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
- end
- ragdoll(char)
- mouse = plr:GetMouse()
- ras = ra.Size
- las = la.Size
- rls = rl.Size
- lls = ll.Size
- function WeldParts(A,B)
- local WLD = Instance.new("ManualWeld")
- WLD.Part0 = A
- WLD.Part1 = B
- WLD.C1 = B.CFrame:inverse() * A.CFrame
- WLD.Parent = A
- return WLD
- end
- function wee(part)
- if mouse.Target then
- if climb == true then
- for i,v in pairs (char:GetDescendants()) do
- if v:IsA("BallSocketConstraint") then
- v:remove()
- --glue11.C0 = CFrame.new(1.5, 0, 0) * CFrame.Angles(0, math.rad(90), 0)
- --glue111.C0 = CFrame.new(1.5, 0, 0) * CFrame.Angles(0, math.rad(-90), 0)
- end
- end
- end
- local DIST = (hed.Position - mouse.Hit.p).Magnitude
- --ra.Size = Vector3.new(ras.x, DIST, ras.z)
- local e = Instance.new("Part", char)
- e.Size = Vector3.new(0.1, 0.1, 0.1)
- e.Position = mouse.Hit.p
- e.Anchored = false
- e.CanCollide = false
- e.Transparency = 1
- e.Locked = true
- WeldParts(e, mouse.Target)
- --glue11.C0 = CFrame.new(0, -DIST / 2, 1.5) * CFrame.Angles(0, math.rad(90), 0)
- local at0 = Instance.new("Attachment", part)
- at0.Position = Vector3.new(0, -part.Size.y / 2, 0)
- local at1 = Instance.new("Attachment", e)
- local b = Instance.new("BallSocketConstraint", part)
- b.Attachment0 = at0
- b.Attachment1 = at1
- end
- end
- climb = false
- plr.Chatted:connect(function(msg)
- if msg == "/climb" then
- if climb then
- climb = false
- else
- climb = true
- end
- end
- end)
- local remote = Instance.new("RemoteEvent",char)
- remote.Name = "remotey"
- function aah(name)
- if name == "ra" then
- wee(ra)
- end
- if name == "la" then
- wee(la)
- end
- if name == "rl" then
- wee(rl)
- end
- if name == "ll" then
- wee(ll)
- end
- if name == "tors" then
- wee(tors)
- end
- end
- NLS([[
- local plr = owner
- local char = plr.Character
- local mouse = plr:GetMouse()
- local remote = char.remotey
- mouse.KeyDown:connect(function(key)
- if key == "1" then
- remote:FireServer("ra")
- end
- if key == "2" then
- remote:FireServer("la")
- end
- if key == "3" then
- remote:FireServer("rl")
- end
- if key == "4" then
- remote:FireServer("ll")
- end
- if key == "5" then
- remote:FireServer("tors")
- end
- end)
- ]], char)
- remote.OnServerEvent:Connect(function(PlayerSendit,Button) aah(Button) end)
- mouse.Button1Down:connect(function()
- --wee()
- end)
- mouse.KeyDown:connect(function(key)
- if key == "e" then
- for i,v in pairs (char:GetDescendants()) do
- if v:IsA("BallSocketConstraint") then
- v:remove()
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement