Advertisement
Animescapetower

r15 ragdoll gun

Apr 16th, 2018
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.29 KB | None | 0 0
  1. --funny ragdoll
  2. --[[This ragdoll mostly for r15 is actually cool tho]]
  3.  
  4. --By Rufus14
  5.  
  6.  
  7. mouse = game.Players.LocalPlayer:GetMouse()
  8. hum = game.Players.LocalPlayer.Character.Humanoid
  9.  
  10. gun = Instance.new("Part", game.Players.LocalPlayer.Character)
  11. gun.BrickColor = BrickColor.Black()
  12. gun.BrickColor = BrickColor.Black()
  13. gun.BrickColor = BrickColor.Black()
  14. gun.Size = Vector3.new(0.5, 1, 2)
  15. gun.CanCollide = true
  16. gun:BreakJoints()
  17.  
  18.  
  19. swooshing = Instance.new("Sound", gun)
  20. swooshing.SoundId = "rbxassetid://301184111"
  21. swooshing.EmitterSize = 1
  22. swooshing.PlaybackSpeed = 0.9
  23. swooshing.Volume = 10
  24. weld = Instance.new("Weld", gun)
  25. weld.Part0 = game.Players.LocalPlayer.Character["RightUpperArm"]
  26. weld.Part1 = gun
  27. weld.C0 = weld.C0 * CFrame.new(-0.2,-1.7,-0.25) * CFrame.Angles(0,1.6,-1.53)
  28. mesh = Instance.new("SpecialMesh", gun)
  29. mesh.MeshId = "rbxassetid://623102664"
  30. mesh.Scale = Vector3.new(0.01,0.01,0.01)
  31. local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.UpperTorso)
  32.  
  33. shooting = false
  34.  
  35. for i = 1,2 do
  36. wait()
  37. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.03)
  38. end
  39. for i = 1,2 do
  40. wait()
  41. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.07)
  42. end
  43. swooshing:Play()
  44. for i = 1,7 do
  45. wait()
  46. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.17)
  47. end
  48. for i = 1,2 do
  49. wait()
  50. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.07)
  51. end
  52. for i = 1,2 do
  53. wait()
  54. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.03)
  55. end
  56. function shoot()
  57. if not shooting then
  58.  
  59. shooting = true
  60.  
  61.  
  62. local shotsound = Instance.new("Sound", gun)
  63. shotsound.EmitterSize = 1
  64. shotsound.SoundId = "rbxassetid://131070686"
  65. shotsound.Volume = 10
  66. shotsound:Play()
  67.  
  68.  
  69.  
  70. local blast = Instance.new("Part", gun)
  71. blast.Size = Vector3.new(1,1.6,1.6)
  72. blast.BrickColor = BrickColor.White()
  73. blast.Shape = 1
  74. blast.Material = "Neon"
  75. blast.CanCollide = false
  76. blast:BreakJoints()
  77. local missle = Instance.new("Part", workspace)
  78. missle.Size = Vector3.new(0.2,0.2,0.2)
  79. missle.CanCollide = false
  80. missle.Material = "Neon"
  81. missle.Shape = "Ball"
  82. missle.BrickColor = BrickColor.new("New Yeller")
  83. missle.Transparency = 0.2
  84. missle.CFrame = gun.CFrame * CFrame.new(0,5.5,0)
  85. missle:BreakJoints()
  86. local ligh = Instance.new("PointLight", gun)
  87. ligh.Range = 10
  88. ligh.Color = missle.Color
  89. ligh.Enabled = true
  90. local velo = Instance.new("BodyVelocity", missle)
  91. velo.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  92. velo.Velocity = mouse.Hit.lookVector * 180
  93. local weld1 = Instance.new("Weld", gun)
  94. weld1.Part0 = gun
  95. weld1.Part1 = blast
  96. weld1.C0 = weld1.C0 * CFrame.new(1.5,-1,0) * CFrame.Angles(0,0,-0.5)
  97. for i = 1,2 do
  98. weld.C0 = weld.C0 * CFrame.Angles(0,0,0.14)
  99. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.14)
  100. end
  101. for i = 1,1 do
  102. wait()
  103. weld.C0 = weld.C0 * CFrame.Angles(0,0,-0.07)
  104. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,-0.07)
  105. end
  106. blast:destroy()
  107. ligh:destroy()
  108. for i = 1,1 do
  109. wait()
  110. weld.C0 = weld.C0 * CFrame.Angles(0,0,-0.07)
  111. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,-0.07)
  112. end
  113. local function kill(part)
  114. local hum = part.Parent:findFirstChild("Humanoid")
  115. local UpperTorso = part.Parent:findFirstChild("UpperTorso")
  116. local larm = part.Parent:findFirstChild("LeftUpperArm")
  117. local rarm = part.Parent:findFirstChild("RightUpperArm")
  118. local lleg = part.Parent:findFirstChild("LeftUpperLeg")
  119. local rleg = part.Parent:findFirstChild("RightUpperLeg")
  120. missle:destroy()
  121.  
  122. if hum ~= nil then
  123. if UpperTorso then
  124. HumanoidDMG = {12,23,21,14,16,30,9}
  125. DMG = HumanoidDMG[math.random(1,#HumanoidDMG)]
  126.  
  127. hum.Health = hum.Health - DMG
  128. local shotsound1 = Instance.new("Sound", UpperTorso)
  129. shotsound1:Play()
  130. shotsound1.EmitterSize = 2
  131. shotsound1.SoundId = "rbxassetid://131070686"
  132. shotsound1.Volume = 8
  133. shotsound1:Play()
  134. local shotsound1 = Instance.new("Sound", UpperTorso)
  135. shotsound1:Play()
  136. shotsound1.EmitterSize = 2
  137. shotsound1.SoundId = "rbxassetid://131070686"
  138. shotsound1.Volume = 8
  139. shotsound1:Play()
  140. using = false
  141. hit = Instance.new("Sound", UpperTorso)
  142. hit.SoundId = "rbxassetid://173137001"
  143. hit.Volume = 5
  144. hit1 = Instance.new("Sound", UpperTorso)
  145. hit1.SoundId = "rbxassetid://132236830"
  146. hit1.Volume = 5
  147. hit2 = Instance.new("Sound", UpperTorso)
  148. hit2.SoundId = "rbxassetid://899623922"
  149. hit2.Volume = 5
  150. hit3 = Instance.new("Sound", UpperTorso)
  151. hit3.SoundId = "rbxassetid://278062209"
  152. hit3.Volume = 5
  153. hit3.TimePosition = 0.33
  154. print("You killed "..hum.Parent.Name)
  155. hum.PlatformStand = true
  156. ----------
  157. local lhip = UpperTorso:findFirstChild("Left Hip")
  158. if lhip then
  159. ---
  160. UpperTorso["Left Hip"]:destroy()
  161. local head = game.Players.LocalPlayer.Character.Head
  162. local glue = Instance.new("Glue", UpperTorso)
  163. glue.Part0 = UpperTorso
  164. glue.Part1 = UpperTorso.Parent["LeftUpperLeg"]
  165. glue.Name = "LeftUpperLeg"
  166. local collider = Instance.new("Part", UpperTorso.Parent["LeftUpperLeg"])
  167. collider.Position = Vector3.new(0,999,0)
  168. collider.Size = Vector3.new(1.7, 1, 1)
  169. collider.Shape = "Cylinder"
  170. local weld = Instance.new("Weld", collider)
  171. weld.Part0 = UpperTorso.Parent["LeftUpperLeg"]
  172. weld.Part1 = collider
  173. weld.C0 = CFrame.Angles(0, 0, 80)
  174. collider.TopSurface = "Smooth"
  175. collider.BottomSurface = "Smooth"
  176. collider.formFactor = "Symmetric"
  177. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  178. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  179. collider.Transparency = 1
  180. end
  181. local rhip = UpperTorso:findFirstChild("Right Hip")
  182. if rhip then
  183. ------------
  184. UpperTorso["Right Hip"]:destroy()
  185. local glue1 = Instance.new("Glue", UpperTorso)
  186. glue1.Part0 = UpperTorso
  187. glue1.Part1 = UpperTorso.Parent["RightUpperLeg"]
  188. glue1.Name = "RightUpperLeg"
  189. local collider1 = Instance.new("Part", UpperTorso.Parent["RightUpperLeg"])
  190. collider1.Position = Vector3.new(0,9999,0)
  191. collider1.Size = Vector3.new(1.7, 1, 1)
  192. collider1.Shape = "Cylinder"
  193. local weld1 = Instance.new("Weld", collider1)
  194. weld1.Part0 = UpperTorso.Parent["RightUpperLeg"]
  195. weld1.Part1 = collider1
  196. weld1.C0 = CFrame.Angles(0, 0, 80)
  197. collider1.TopSurface = "Smooth"
  198. collider1.BottomSurface = "Smooth"
  199. collider1.formFactor = "Symmetric"
  200. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  201. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  202. collider1.Transparency = 1
  203. end
  204. ------------
  205. local rshoulder = UpperTorso:findFirstChild("Right Shoulder")
  206. if rshoulder then
  207. UpperTorso["Right Shoulder"]:destroy()
  208. local glue11 = Instance.new("Glue", UpperTorso)
  209. glue11.Part0 = UpperTorso
  210. glue11.Part1 = UpperTorso.Parent["RightUpperArm"]
  211. glue11.Name = "Right shoulder"
  212. local collider11 = Instance.new("Part", UpperTorso.Parent["RightUpperArm"])
  213. collider11.Position = Vector3.new(0,9999,0)
  214. collider11.Size = Vector3.new(1.8,1,1)
  215. collider11.Shape = "Cylinder"
  216. local weld11 = Instance.new("Weld", collider11)
  217. weld11.Part0 = UpperTorso.Parent["RightUpperArm"]
  218. weld11.Part1 = collider11
  219. weld11.C0 = CFrame.Angles(0, 0, 80)
  220. collider11.TopSurface = "Smooth"
  221. collider11.BottomSurface = "Smooth"
  222. collider11.formFactor = "Symmetric"
  223. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  224. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  225. collider11.Transparency = 1
  226. end
  227. ------------
  228. local lshoulder = UpperTorso:findFirstChild("Left Shoulder")
  229. if lshoulder then
  230. UpperTorso["Left Shoulder"]:destroy()
  231. local glue111 = Instance.new("Glue", UpperTorso)
  232. glue111.Part0 = UpperTorso
  233. glue111.Part1 = UpperTorso.Parent["LeftUpperArm"]
  234. glue111.Name = "Left shoulder"
  235. local collider111 = Instance.new("Part", UpperTorso.Parent["LeftUpperArm"])
  236. collider111.Position = Vector3.new(0,9999,0)
  237. collider111.Size = Vector3.new(1.8,1,1)
  238. collider111.Shape = "Cylinder"
  239. local weld111 = Instance.new("Weld", collider111)
  240. weld111.Part0 = UpperTorso.Parent["LeftUpperArm"]
  241. weld111.Part1 = collider111
  242. weld111.C0 = CFrame.Angles(0, 0, 80)
  243. collider111.TopSurface = "Smooth"
  244. collider111.BottomSurface = "Smooth"
  245. collider111.formFactor = "Symmetric"
  246. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  247. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  248. collider111.Transparency = 1
  249. end
  250. -----------------
  251. local sensoring = Instance.new("Part", UpperTorso)
  252. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  253. sensoring.CanCollide = false
  254. sensoring.Position = UpperTorso.Position
  255. local welder = Instance.new("Weld", sensoring)
  256. welder.Part0 = UpperTorso
  257. welder.Part1 = sensoring
  258. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  259. sensoring.Transparency = 1
  260. -----------------
  261. local sensoring1 = Instance.new("Part", UpperTorso)
  262. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  263. sensoring1.CanCollide = false
  264. sensoring1.Position = UpperTorso.Position
  265. local welder1 = Instance.new("Weld", sensoring)
  266. welder1.Part0 = UpperTorso
  267. welder1.Part1 = sensoring1
  268. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  269. sensoring1.Transparency = 1
  270. local function touch()
  271. if not using then
  272. using = true
  273. local Math = math.random(1,4)
  274. if Math == 1 then
  275. hit:Play()
  276. end
  277. if Math == 2 then
  278. hit1:Play()
  279. end
  280. if Math == 3 then
  281. hit2:Play()
  282. end
  283. if Math == 4 then
  284. hit3:Play()
  285. end
  286. wait(0.1)
  287. using = false
  288. end
  289. end
  290. sensoring.Touched:connect(touch)
  291. sensoring1.Touched:connect(touch)
  292. if part.Name == "Head" then
  293. local hed = Instance.new("Sound", UpperTorso)
  294. hed.SoundId = "rbxassetid://147936251"
  295. hed.Volume = 5
  296. hed:Play()
  297. hum.Health = 555
  298. local UUUHUUH = Instance.new("Sound", UpperTorso)
  299. UUUHUUH.SoundId = "rbxassetid://666800317"
  300. UUUHUUH.Volume = 5
  301. UUUHUUH:Play()
  302. for i,v in pairs(UpperTorso.Parent:GetChildren()) do
  303. if v.ClassName == "Hat" or v.ClassName == "Accessory" then
  304. v:destroy()
  305. end
  306. end
  307. for i,v in pairs(UpperTorso.Parent.Head:GetChildren()) do
  308. if v.ClassName == "Decal" then
  309. v:destroy()
  310. end
  311. end
  312. UpperTorso.Parent.Head.Transparency = 1
  313. wait(4)
  314. hum.Health = hum.Health - 12
  315. end
  316. while true do
  317. wait(0.3)
  318. hum.PlatformStand = true
  319. end
  320.  
  321. --di ent
  322. end
  323. end
  324. end
  325. missle.Touched:connect(kill)
  326. for i = 1,2 do
  327. wait()
  328. weld.C0 = weld.C0 * CFrame.Angles(0,0,-0.07)
  329. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,-0.07)
  330. end
  331. shooting = false
  332. wait(3)
  333. shotsound:destroy()
  334. end
  335. end
  336. mouse.Button1Down:connect(shoot)
  337. --0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0
  338. --0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0
  339. --[[
  340. local vel = Instance.new("BodyVelocity", game.Players.LocalPlayer.Character.UpperTorso)
  341. vel.Velocity = game.Players.LocalPlayer.Character.UpperTorso.CFrame.lookVector * -5
  342. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  343. --]]
  344. --By Rufus14 (FINALLY I KNOW HOW TO MAKE A RAGDOLL :D)
  345. --die plz
  346. mouse = game.Players.LocalPlayer:GetMouse()
  347. function ragdoll()
  348.  
  349. game.Players.LocalPlayer.Character.Archivable = true
  350. clone = game.Players.LocalPlayer.Character:Clone()
  351. clone.Parent = workspace
  352. for i,v in pairs(clone:GetChildren()) do
  353. if v.ClassName == "Script" or v.ClassName == "LocalScript" then
  354. v:destroy()
  355. end
  356. for i,p in pairs(v:GetChildren()) do
  357. if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then
  358. p:destroy()
  359. end
  360. end
  361. end
  362. for i,t in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  363. if t.ClassName == "Accessory" or t.ClassName == "ForceField" then
  364. t:destroy()
  365. end
  366. end
  367. vel = Instance.new("BodyVelocity", clone.UpperTorso)
  368. vel.Velocity = clone.UpperTorso.CFrame.lookVector * -5
  369. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  370. clone.Head.face.Texture = "http://www.roblox.com/asset/?id=161061608"
  371. using = false
  372. hit = Instance.new("Sound", clone.UpperTorso)
  373. hit.SoundId = "rbxassetid://260430060"
  374. hit.Volume = 5
  375. hit1 = Instance.new("Sound", clone.UpperTorso)
  376. hit1.SoundId = "rbxassetid://138087186"
  377. hit1.Volume = 5
  378. hit2 = Instance.new("Sound", clone.UpperTorso)
  379. hit2.SoundId = "rbxassetid://131237241"
  380. hit2.Volume = 5
  381. hit3 = Instance.new("Sound", clone.UpperTorso)
  382. hit3.SoundId = "rbxassetid://278062209"
  383. hit3.Volume = 5
  384. hit3.TimePosition = 0.33
  385. ded = Instance.new("Sound", clone.UpperTorso)
  386. ded.SoundId = "rbxassetid://418892870"
  387. ded.Volume = 5
  388. local leftarm = clone:findFirstChild("LeftUpperArm")
  389. local rightrm = clone:findFirstChild("RightUpperArm")
  390. local leftleg = clone:findFirstChild("LeftUpperLeg")
  391. local rightleg = clone:findFirstChild("RightUpperLeg")
  392. local head = clone:findFirstChild("Head")
  393. for i, g in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  394. if g.ClassName == "Part" then
  395. g:destroy()
  396. end
  397. end
  398. for i, h in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  399. if h.ClassName == "Accesory" then
  400. h:destroy()
  401. end
  402. end
  403. game.Workspace.CurrentCamera.CameraSubject = head
  404. if head ~= nil then
  405. local glue13 = Instance.new("Glue", clone.UpperTorso)
  406. glue13.Part0 = clone.UpperTorso
  407. glue13.Part1 = head
  408. glue13.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  409. glue13.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  410. local collider13 = Instance.new("Part", head)
  411. collider13.Position = Vector3.new(0,999,0)
  412. collider13.Size = Vector3.new(0.5, 0.9, 0.9)
  413. collider13.Shape = "Cylinder"
  414. collider13.Transparency = 1
  415. local weld = Instance.new("Weld", collider13)
  416. weld.Part0 = head
  417. weld.Part1 = collider13
  418. weld.C0 = weld.C0 * CFrame.new(0,0.2,0) * CFrame.Angles(0, 0, 80)
  419. collider13.TopSurface = "Smooth"
  420. collider13.BottomSurface = "Smooth"
  421. collider13.formFactor = "Symmetric"
  422. end
  423. if leftleg ~= nil then
  424. local glue = Instance.new("Glue", clone.UpperTorso)
  425. glue.Part0 = clone.UpperTorso
  426. glue.Part1 = leftleg
  427. glue.Name = "LeftUpperLeg"
  428. local collider = Instance.new("Part", leftleg)
  429. collider.Position = Vector3.new(0,999,0)
  430. collider.Size = Vector3.new(1.7, 1, 1)
  431. collider.Shape = "Cylinder"
  432. local weld = Instance.new("Weld", collider)
  433. weld.Part0 = leftleg
  434. weld.Part1 = collider
  435. weld.C0 = CFrame.Angles(0, 0, 80)
  436. collider.TopSurface = "Smooth"
  437. collider.BottomSurface = "Smooth"
  438. collider.formFactor = "Symmetric"
  439. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  440. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  441. collider.Transparency = 1
  442. end
  443. ------------
  444. if rightleg ~= nil then
  445. local glue1 = Instance.new("Glue", clone.UpperTorso)
  446. glue1.Part0 = clone.UpperTorso
  447. glue1.Part1 = rightleg
  448. glue1.Name = "RightUpperLeg"
  449. local collider1 = Instance.new("Part", rightleg)
  450. collider1.Position = Vector3.new(0,999,0)
  451. collider1.Size = Vector3.new(1.7, 1, 1)
  452. collider1.Shape = "Cylinder"
  453. local weld1 = Instance.new("Weld", collider1)
  454. weld1.Part0 = rightleg
  455. weld1.Part1 = collider1
  456. weld1.C0 = CFrame.Angles(0, 0, 80)
  457. collider1.TopSurface = "Smooth"
  458. collider1.BottomSurface = "Smooth"
  459. collider1.formFactor = "Symmetric"
  460. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  461. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  462. collider1.Transparency = 1
  463. end
  464. ------------
  465. if rightrm ~= nil then
  466. local glue11 = Instance.new("Glue", clone.UpperTorso)
  467. glue11.Part0 = clone.UpperTorso
  468. glue11.Part1 = rightrm
  469. glue11.Name = "Right shoulder"
  470. local collider11 = Instance.new("Part", rightrm)
  471. collider11.Position = Vector3.new(0,9999,0)
  472. collider11.Size = Vector3.new(1.8,1,1)
  473. collider11.Shape = "Cylinder"
  474. local weld11 = Instance.new("Weld", collider11)
  475. weld11.Part0 = rightrm
  476. weld11.Part1 = collider11
  477. weld11.C0 = CFrame.Angles(0, 0, 80)
  478. collider11.TopSurface = "Smooth"
  479. collider11.BottomSurface = "Smooth"
  480. collider11.formFactor = "Symmetric"
  481. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  482. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  483. collider11.Transparency = 1
  484. end
  485. ------------
  486. if leftarm ~= nil then
  487. local glue111 = Instance.new("Glue", clone.UpperTorso)
  488. glue111.Part0 = clone.UpperTorso
  489. glue111.Part1 = leftarm
  490. glue111.Name = "Left shoulder"
  491. local collider111 = Instance.new("Part", leftarm)
  492. collider111.Position = Vector3.new(0,9999,0)
  493. collider111.Size = Vector3.new(1.8,1,1)
  494. collider111.Shape = "Cylinder"
  495. local weld111 = Instance.new("Weld", collider111)
  496. weld111.Part0 = leftarm
  497. weld111.Part1 = collider111
  498. weld111.C0 = CFrame.Angles(0, 0, 80)
  499. collider111.TopSurface = "Smooth"
  500. collider111.BottomSurface = "Smooth"
  501. collider111.formFactor = "Symmetric"
  502. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  503. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  504. collider111.Transparency = 1
  505. ----------------
  506. sensoring = Instance.new("Part", clone.UpperTorso)
  507. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  508. sensoring.CanCollide = false
  509. sensoring.Position = clone.UpperTorso.Position
  510. local welder = Instance.new("Weld", sensoring)
  511. welder.Part0 = clone.UpperTorso
  512. welder.Part1 = sensoring
  513. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  514. sensoring.Transparency = 1
  515. -----------------
  516. sensoring1 = Instance.new("Part", clone.UpperTorso)
  517. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  518. sensoring1.CanCollide = false
  519. sensoring1.Position = clone.UpperTorso.Position
  520. local welder1 = Instance.new("Weld", sensoring)
  521. welder1.Part0 = clone.UpperTorso
  522. welder1.Part1 = sensoring1
  523. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  524. sensoring1.Transparency = 1
  525. end
  526.  
  527.  
  528. clone.Name = game.Players.LocalPlayer.Character.Name.."Got Dominated","Got Killed","Got Memed","Got Ded","Got RIPPED apart","Got OOFED Apart ","Got Trolled","Got? Who died","Got destroyed "
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536. ded:Play()
  537. vel:destroy()
  538. wait(0.5)
  539. local function touch()
  540. if not using then
  541. using = true
  542. local Math = math.random(1,4)
  543. if Math == 1 then
  544. hit:Play()
  545. end
  546. if Math == 2 then
  547. hit1:Play()
  548. end
  549. if Math == 3 then
  550. hit2:Play()
  551. end
  552. if Math == 4 then
  553. hit3:Play()
  554. end
  555. wait(0.1)
  556. using = false
  557. end
  558. end
  559. sensoring.Touched:connect(touch)
  560. sensoring1.Touched:connect(touch)
  561. wait(4.47)
  562. hit1.Volume = 0
  563. hit2.Volume = 0
  564. hit3.Volume = 0
  565. hit.Volume = 0
  566. end
  567.  
  568. game.Players.LocalPlayer.Character.Humanoid.Died:connect(ragdoll)
  569. while true do
  570. wait(0.01)
  571. gun.BrickColor = BrickColor.Black()
  572.  
  573. end
  574.  
  575. --di ent
  576.  
  577. HUMANOID = game.Players.LocalPlayer.Character.Humanoid
  578. wait()
  579. if HUMANOID.RigType ~= Enum.HumanoidRigType.R15 then
  580. game.Debris:AddItem(script,1)
  581. else
  582.  
  583. local character = game.Players.LocalPlayer.Character
  584.  
  585. function recurse(root,callback,i)
  586. i= i or 0
  587. for _,v in pairs(root:GetChildren()) do
  588. i = i + 1
  589. callback(i,v)
  590.  
  591. if #v:GetChildren() > 0 then
  592. i = recurse(v,callback,i)
  593. end
  594. end
  595.  
  596. return i
  597. end
  598.  
  599. function ragdollJoint(part0, part1, attachmentName, className, properties)
  600. attachmentName = attachmentName.."RigAttachment"
  601. local constraint = Instance.new(className.."Constraint")
  602. constraint.Attachment0 = part0:FindFirstChild(attachmentName)
  603. constraint.Attachment1 = part1:FindFirstChild(attachmentName)
  604. constraint.Name = "RagdollConstraint"..part1.Name
  605.  
  606. for _,propertyData in next,properties or {} do
  607. constraint[propertyData[1]] = propertyData[2]
  608. end
  609.  
  610. constraint.Parent = character
  611. end
  612.  
  613. function getAttachment0(attachmentName)
  614. for _,child in next,character:GetChildren() do
  615. local attachment = child:FindFirstChild(attachmentName)
  616. if attachment then
  617. return attachment
  618. end
  619. end
  620. end
  621.  
  622. HUMANOID.Died:connect(function()
  623. local camera = workspace.CurrentCamera
  624. if camera.CameraSubject == character.Humanoid then--If developer isn't controlling camera
  625. camera.CameraSubject = character.UpperTorso
  626. end
  627. --Make it so ragdoll can't collide with invisible HRP, but don't let HRP fall through map and be destroyed in process
  628. character.HumanoidRootPart.Anchored = true
  629. character.HumanoidRootPart.CanCollide = false
  630.  
  631. --Helps to fix constraint spasms
  632. recurse(character, function(_,v)
  633. if v:IsA("Attachment") then
  634. v.Axis = Vector3.new(0, 1, 0)
  635. v.SecondaryAxis = Vector3.new(0, 0, 1)
  636. v.Rotation = Vector3.new(0, 0, 0)
  637. end
  638. end)
  639.  
  640. for _,child in next,character:GetChildren() do
  641. if child:IsA("Accoutrement") then
  642. for _,part in next,child:GetChildren() do
  643. if part:IsA("BasePart") then
  644. part.Parent = character
  645. child:remove()
  646. local attachment1 = part:FindFirstChildOfClass("Attachment")
  647. local attachment0 = getAttachment0(attachment1.Name)
  648. if attachment0 and attachment1 then
  649. local constraint = Instance.new("HingeConstraint")
  650. constraint.Attachment0 = attachment0
  651. constraint.Attachment1 = attachment1
  652. constraint.LimitsEnabled = true
  653. constraint.UpperAngle = 0
  654. constraint.LowerAngle = 0
  655. constraint.Parent = character
  656. end
  657. end
  658. end
  659. end
  660. end
  661.  
  662. ragdollJoint(character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
  663. {"LimitsEnabled",true};
  664. {"UpperAngle",5};
  665. })
  666. ragdollJoint(character.UpperTorso, character.Head, "Neck", "BallSocket", {
  667. {"LimitsEnabled",true};
  668. {"UpperAngle",15};
  669. })
  670.  
  671. local handProperties = {
  672. {"LimitsEnabled", true};
  673. {"UpperAngle",0};
  674. {"LowerAngle",0};
  675. }
  676. ragdollJoint(character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
  677. ragdollJoint(character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
  678.  
  679. local shinProperties = {
  680. {"LimitsEnabled", true};
  681. {"UpperAngle", 0};
  682. {"LowerAngle", -75};
  683. }
  684. ragdollJoint(character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
  685. ragdollJoint(character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
  686.  
  687. local footProperties = {
  688. {"LimitsEnabled", true};
  689. {"UpperAngle", 15};
  690. {"LowerAngle", -45};
  691. }
  692. ragdollJoint(character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
  693. ragdollJoint(character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
  694.  
  695. --TODO fix ability for socket to turn backwards whenn ConeConstraints are shipped
  696. ragdollJoint(character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
  697. ragdollJoint(character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
  698. ragdollJoint(character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
  699. ragdollJoint(character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
  700. ragdollJoint(character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
  701. ragdollJoint(character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
  702. end)
  703. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement