Advertisement
HenloMyDude

iCARL!!!y

Feb 21st, 2020
732
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.16 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. local RealPlayer = Player
  4. 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.'
  5.  
  6. plr = owner
  7. char = plr.Character
  8. tors = char.Torso
  9. ra = char["Right Arm"]
  10. la = char["Left Arm"]
  11. rl = char["Right Leg"]
  12. ll = char["Left Leg"]
  13. hed = char.Head
  14. root = char.HumanoidRootPart
  15. hum = char.Humanoid
  16.  
  17. function ragdoll(ch)
  18. ch.Humanoid.PlatformStand = true
  19. lshclone = ch.Torso["Left Shoulder"]
  20. rshclone = ch.Torso["Right Shoulder"]
  21. lhclone = ch.Torso["Left Hip"]
  22. rhclone = ch.Torso["Right Hip"]
  23. local leftarm = ch["Left Arm"]
  24. local rightrm = ch["Right Arm"]
  25. local leftleg = ch["Left Leg"]
  26. local rightleg = ch["Right Leg"]
  27. ch.Torso["Left Hip"].Parent = nil
  28. local head = ch.Head
  29. glue = Instance.new("Glue", ch.Torso)
  30. glue.Part0 = ch.Torso
  31. glue.Part1 = leftleg
  32. glue.Name = "Left leg"
  33. collider = Instance.new("Part", leftleg)
  34. collider.Position = Vector3.new(0,999,0)
  35. collider.Size = Vector3.new(1.5, 1, 1)
  36. collider.Shape = "Cylinder"
  37. local weld = Instance.new("Weld", collider)
  38. weld.Part0 = leftleg
  39. weld.Part1 = collider
  40. weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  41. collider.TopSurface = "Smooth"
  42. collider.BottomSurface = "Smooth"
  43. collider.formFactor = "Symmetric"
  44. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  45. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  46. collider.Transparency = 1
  47. ------------
  48. ch.Torso["Right Hip"].Parent = nil
  49. glue1 = Instance.new("Glue", ch.Torso)
  50. glue1.Part0 = ch.Torso
  51. glue1.Part1 = rightleg
  52. glue1.Name = "Right leg"
  53. collider1 = Instance.new("Part", rightleg)
  54. collider1.Position = Vector3.new(0,9999,0)
  55. collider1.Size = Vector3.new(1.5, 1, 1)
  56. collider1.Shape = "Cylinder"
  57. local weld1 = Instance.new("Weld", collider1)
  58. weld1.Part0 = rightleg
  59. weld1.Part1 = collider1
  60. weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  61. collider1.TopSurface = "Smooth"
  62. collider1.BottomSurface = "Smooth"
  63. collider1.formFactor = "Symmetric"
  64. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  65. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  66. collider1.Transparency = 1
  67. ------------
  68. ch.Torso["Right Shoulder"].Parent = nil
  69. glue11 = Instance.new("Glue", ch.Torso)
  70. glue11.Part0 = ch.Torso
  71. glue11.Part1 = rightrm
  72. glue11.Name = "Right shoulder"
  73. collider11 = Instance.new("Part", rightrm)
  74. collider11.Position = Vector3.new(0,9999,0)
  75. collider11.Size = Vector3.new(1.8,1,1)
  76. collider11.Shape = "Cylinder"
  77. local weld11 = Instance.new("Weld", collider11)
  78. weld11.Part0 = rightrm
  79. weld11.Part1 = collider11
  80. weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  81. collider11.TopSurface = "Smooth"
  82. collider11.BottomSurface = "Smooth"
  83. collider11.formFactor = "Symmetric"
  84. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  85. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  86. collider11.Transparency = 1
  87. ------------
  88. ch.Torso["Left Shoulder"].Parent = nil
  89. glue111 = Instance.new("Glue", ch.Torso)
  90. glue111.Part0 = ch.Torso
  91. glue111.Part1 = leftarm
  92. glue111.Name = "Left shoulder"
  93. collider111 = Instance.new("Part", leftarm)
  94. collider111.Position = Vector3.new(0,9999,0)
  95. collider111.Size = Vector3.new(1.5, 1, 1)
  96. collider111.Shape = "Cylinder"
  97. local weld111 = Instance.new("Weld", collider111)
  98. weld111.Part0 = leftarm
  99. weld111.Part1 = collider111
  100. weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  101. collider111.TopSurface = "Smooth"
  102. collider111.BottomSurface = "Smooth"
  103. collider111.formFactor = "Symmetric"
  104. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  105. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  106. collider111.Transparency = 1
  107. end
  108.  
  109. ragdoll(char)
  110.  
  111. mouse = plr:GetMouse()
  112.  
  113. ras = ra.Size
  114. las = la.Size
  115. rls = rl.Size
  116. lls = ll.Size
  117.  
  118. function WeldParts(A,B)
  119. local WLD = Instance.new("ManualWeld")
  120. WLD.Part0 = A
  121. WLD.Part1 = B
  122. WLD.C1 = B.CFrame:inverse() * A.CFrame
  123. WLD.Parent = A
  124. return WLD
  125. end
  126.  
  127. function wee(part)
  128. if mouse.Target then
  129. if climb == true then
  130. for i,v in pairs (char:GetDescendants()) do
  131. if v:IsA("BallSocketConstraint") then
  132. v:remove()
  133. --glue11.C0 = CFrame.new(1.5, 0, 0) * CFrame.Angles(0, math.rad(90), 0)
  134. --glue111.C0 = CFrame.new(1.5, 0, 0) * CFrame.Angles(0, math.rad(-90), 0)
  135. end
  136. end
  137. end
  138. local DIST = (hed.Position - mouse.Hit.p).Magnitude
  139. --ra.Size = Vector3.new(ras.x, DIST, ras.z)
  140. local e = Instance.new("Part", char)
  141. e.Size = Vector3.new(0.1, 0.1, 0.1)
  142. e.Position = mouse.Hit.p
  143. e.Anchored = false
  144. e.CanCollide = false
  145. e.Transparency = 1
  146. e.Locked = true
  147. WeldParts(e, mouse.Target)
  148. --glue11.C0 = CFrame.new(0, -DIST / 2, 1.5) * CFrame.Angles(0, math.rad(90), 0)
  149. local at0 = Instance.new("Attachment", part)
  150. at0.Position = Vector3.new(0, -part.Size.y / 2, 0)
  151. local at1 = Instance.new("Attachment", e)
  152. local b = Instance.new("BallSocketConstraint", part)
  153. b.Attachment0 = at0
  154. b.Attachment1 = at1
  155. end
  156. end
  157.  
  158. climb = false
  159.  
  160. plr.Chatted:connect(function(msg)
  161. if msg == "/climb" then
  162. if climb then
  163. climb = false
  164. else
  165. climb = true
  166. end
  167. end
  168. end)
  169.  
  170. local remote = Instance.new("RemoteEvent",char)
  171. remote.Name = "remotey"
  172.  
  173. function aah(name)
  174. if name == "ra" then
  175. wee(ra)
  176. end
  177. if name == "la" then
  178. wee(la)
  179. end
  180. if name == "rl" then
  181. wee(rl)
  182. end
  183. if name == "ll" then
  184. wee(ll)
  185. end
  186. if name == "tors" then
  187. wee(tors)
  188. end
  189. end
  190.  
  191. NLS([[
  192.  
  193. local plr = owner
  194. local char = plr.Character
  195. local mouse = plr:GetMouse()
  196. local remote = char.remotey
  197.  
  198. mouse.KeyDown:connect(function(key)
  199. if key == "1" then
  200. remote:FireServer("ra")
  201. end
  202. if key == "2" then
  203. remote:FireServer("la")
  204. end
  205. if key == "3" then
  206. remote:FireServer("rl")
  207. end
  208. if key == "4" then
  209. remote:FireServer("ll")
  210. end
  211. if key == "5" then
  212. remote:FireServer("tors")
  213. end
  214. end)
  215.  
  216. ]], char)
  217.  
  218. remote.OnServerEvent:Connect(function(PlayerSendit,Button) aah(Button) end)
  219.  
  220. mouse.Button1Down:connect(function()
  221. --wee()
  222. end)
  223.  
  224. mouse.KeyDown:connect(function(key)
  225. if key == "e" then
  226. for i,v in pairs (char:GetDescendants()) do
  227. if v:IsA("BallSocketConstraint") then
  228. v:remove()
  229. end
  230. end
  231. end
  232. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement