codemen

Ragdoll gun script [roblox]

Nov 27th, 2017
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.21 KB | None | 0 0
  1. --By Rufus14
  2. mouse = game.Players.LocalPlayer:GetMouse()
  3. gun = Instance.new("Part", game.Players.LocalPlayer.Character)
  4. gun.Size = Vector3.new(0.5, 1, 2)
  5. gun.CanCollide = false
  6. gun:BreakJoints()
  7. swooshing = Instance.new("Sound", gun)
  8. swooshing.SoundId = "rbxassetid://280667448"
  9. swooshing.EmitterSize = 1
  10. swooshing.PlaybackSpeed = 0.9
  11. swooshing.Volume = 10
  12. pumpedupkickz = Instance.new("Sound", game.Players.LocalPlayer.Character.Head)
  13. pumpedupkickz.SoundId = "rbxassetid://"
  14. pumpedupkickz.Volume = 10
  15. pumpedupkickz.Looped = true
  16. pumpedupkickz:Play()
  17. weld = Instance.new("Weld", gun)
  18. weld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  19. weld.Part1 = gun
  20. weld.C0 = weld.C0 * CFrame.new(-0.2,-1.7,-0.25) * CFrame.Angles(0,1.6,-1.53)
  21. mesh = Instance.new("SpecialMesh", gun)
  22. mesh.MeshId = "rbxassetid://623102664"
  23. mesh.TextureId = "rbxassetid://623102879"
  24. mesh.Scale = Vector3.new(0.01,0.01,0.01)
  25. local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  26. rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  27. rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
  28. rhandweld.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  29. rhandweld.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  30. shooting = false
  31. for i = 1,2 do
  32. wait()
  33. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.03)
  34. end
  35. for i = 1,2 do
  36. wait()
  37. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.07)
  38. end
  39. swooshing:Play()
  40. for i = 1,7 do
  41. wait()
  42. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.17)
  43. end
  44. for i = 1,2 do
  45. wait()
  46. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.07)
  47. end
  48. for i = 1,2 do
  49. wait()
  50. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.03)
  51. end
  52. function shoot()
  53. if not shooting then
  54. shooting = true
  55. local shotsound = Instance.new("Sound", gun)
  56. shotsound.EmitterSize = 1
  57. shotsound.SoundId = "rbxassetid://139593133"
  58. shotsound.Volume = 10
  59. shotsound:Play()
  60. local missle = Instance.new("Part", workspace)
  61. missle.Size = Vector3.new(0.05,0.05,0.05)
  62. missle.CanCollide = false
  63. missle.Shape = "Ball"
  64. missle.BrickColor = BrickColor.new("New Yeller")
  65. missle.CFrame = gun.CFrame * CFrame.new(0,0.5,0)
  66. missle:BreakJoints()
  67. local velo = Instance.new("BodyVelocity", missle)
  68. velo.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  69. velo.Velocity = mouse.Hit.lookVector * 180
  70. local ligh = Instance.new("PointLight", gun)
  71. local blast = Instance.new("Part", gun)
  72. blast.Size = Vector3.new(1,0.2,0.2)
  73. blast.BrickColor = BrickColor.new("New Yeller")
  74. blast.Material = "Neon"
  75. blast:BreakJoints()
  76. local weld1 = Instance.new("Weld", gun)
  77. weld1.Part0 = gun
  78. weld1.Part1 = blast
  79. weld1.C0 = weld1.C0 * CFrame.new(1.5,-1,0) * CFrame.Angles(0,0,-0.5)
  80. for i = 1,2 do
  81. weld.C0 = weld.C0 * CFrame.Angles(0,0,0.14)
  82. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.14)
  83. end
  84. for i = 1,1 do
  85. wait()
  86. weld.C0 = weld.C0 * CFrame.Angles(0,0,-0.07)
  87. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,-0.07)
  88. end
  89. blast:destroy()
  90. ligh:destroy()
  91. for i = 1,1 do
  92. wait()
  93. weld.C0 = weld.C0 * CFrame.Angles(0,0,-0.07)
  94. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,-0.07)
  95. end
  96. local function kill(part)
  97. local hum = part.Parent:findFirstChild("Humanoid")
  98. local torso = part.Parent:findFirstChild("Torso")
  99. local larm = part.Parent:findFirstChild("Left Arm")
  100. local rarm = part.Parent:findFirstChild("Right Arm")
  101. local lleg = part.Parent:findFirstChild("Left Leg")
  102. local rleg = part.Parent:findFirstChild("Right Leg")
  103. missle:destroy()
  104. if hum ~= nil then
  105. if torso then
  106. hum.Health = hum.Health - math.random(25,68)
  107. local shotsound1 = Instance.new("Sound", torso)
  108. shotsound1:Play()
  109. shotsound1.EmitterSize = 2
  110. shotsound1.SoundId = "rbxassetid://144884872"
  111. shotsound1.Volume = 8
  112. shotsound1:Play()
  113. local shotsound1 = Instance.new("Sound", torso)
  114. shotsound1:Play()
  115. shotsound1.EmitterSize = 2
  116. shotsound1.SoundId = "rbxassetid://175272131"
  117. shotsound1.Volume = 8
  118. shotsound1:Play()
  119. using = false
  120. hit = Instance.new("Sound", torso)
  121. hit.SoundId = "rbxassetid://260430060"
  122. hit.Volume = 5
  123. hit1 = Instance.new("Sound", torso)
  124. hit1.SoundId = "rbxassetid://138087186"
  125. hit1.Volume = 5
  126. hit2 = Instance.new("Sound", torso)
  127. hit2.SoundId = "rbxassetid://131237241"
  128. hit2.Volume = 5
  129. hit3 = Instance.new("Sound", torso)
  130. hit3.SoundId = "rbxassetid://278062209"
  131. hit3.Volume = 5
  132. hit3.TimePosition = 0.33
  133. print("You killed "..hum.Parent.Name)
  134. hum.PlatformStand = true
  135. ----------
  136. local lhip = torso:findFirstChild("Left Hip")
  137. if lhip then
  138. ---
  139. torso["Left Hip"]:destroy()
  140. local head = game.Players.LocalPlayer.Character.Head
  141. local glue = Instance.new("Glue", torso)
  142. glue.Part0 = torso
  143. glue.Part1 = torso.Parent["Left Leg"]
  144. glue.Name = "Left leg"
  145. local collider = Instance.new("Part", torso.Parent["Left Leg"])
  146. collider.Position = Vector3.new(0,999,0)
  147. collider.Size = Vector3.new(1.7, 1, 1)
  148. collider.Shape = "Cylinder"
  149. local weld = Instance.new("Weld", collider)
  150. weld.Part0 = torso.Parent["Left Leg"]
  151. weld.Part1 = collider
  152. weld.C0 = CFrame.Angles(0, 0, 80)
  153. collider.TopSurface = "Smooth"
  154. collider.BottomSurface = "Smooth"
  155. collider.formFactor = "Symmetric"
  156. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  157. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  158. collider.Transparency = 1
  159. end
  160. local rhip = torso:findFirstChild("Right Hip")
  161. if rhip then
  162. ------------
  163. torso["Right Hip"]:destroy()
  164. local glue1 = Instance.new("Glue", torso)
  165. glue1.Part0 = torso
  166. glue1.Part1 = torso.Parent["Right Leg"]
  167. glue1.Name = "Right leg"
  168. local collider1 = Instance.new("Part", torso.Parent["Right Leg"])
  169. collider1.Position = Vector3.new(0,9999,0)
  170. collider1.Size = Vector3.new(1.7, 1, 1)
  171. collider1.Shape = "Cylinder"
  172. local weld1 = Instance.new("Weld", collider1)
  173. weld1.Part0 = torso.Parent["Right Leg"]
  174. weld1.Part1 = collider1
  175. weld1.C0 = CFrame.Angles(0, 0, 80)
  176. collider1.TopSurface = "Smooth"
  177. collider1.BottomSurface = "Smooth"
  178. collider1.formFactor = "Symmetric"
  179. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  180. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  181. collider1.Transparency = 1
  182. end
  183. ------------
  184. local rshoulder = torso:findFirstChild("Right Shoulder")
  185. if rshoulder then
  186. torso["Right Shoulder"]:destroy()
  187. local glue11 = Instance.new("Glue", torso)
  188. glue11.Part0 = torso
  189. glue11.Part1 = torso.Parent["Right Arm"]
  190. glue11.Name = "Right shoulder"
  191. local collider11 = Instance.new("Part", torso.Parent["Right Arm"])
  192. collider11.Position = Vector3.new(0,9999,0)
  193. collider11.Size = Vector3.new(1.8,1,1)
  194. collider11.Shape = "Cylinder"
  195. local weld11 = Instance.new("Weld", collider11)
  196. weld11.Part0 = torso.Parent["Right Arm"]
  197. weld11.Part1 = collider11
  198. weld11.C0 = CFrame.Angles(0, 0, 80)
  199. collider11.TopSurface = "Smooth"
  200. collider11.BottomSurface = "Smooth"
  201. collider11.formFactor = "Symmetric"
  202. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  203. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  204. collider11.Transparency = 1
  205. end
  206. ------------
  207. local lshoulder = torso:findFirstChild("Left Shoulder")
  208. if lshoulder then
  209. torso["Left Shoulder"]:destroy()
  210. local glue111 = Instance.new("Glue", torso)
  211. glue111.Part0 = torso
  212. glue111.Part1 = torso.Parent["Left Arm"]
  213. glue111.Name = "Left shoulder"
  214. local collider111 = Instance.new("Part", torso.Parent["Left Arm"])
  215. collider111.Position = Vector3.new(0,9999,0)
  216. collider111.Size = Vector3.new(1.8,1,1)
  217. collider111.Shape = "Cylinder"
  218. local weld111 = Instance.new("Weld", collider111)
  219. weld111.Part0 = torso.Parent["Left Arm"]
  220. weld111.Part1 = collider111
  221. weld111.C0 = CFrame.Angles(0, 0, 80)
  222. collider111.TopSurface = "Smooth"
  223. collider111.BottomSurface = "Smooth"
  224. collider111.formFactor = "Symmetric"
  225. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  226. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  227. collider111.Transparency = 1
  228. end
  229. -----------------
  230. local sensoring = Instance.new("Part", torso)
  231. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  232. sensoring.CanCollide = false
  233. sensoring.Position = torso.Position
  234. local welder = Instance.new("Weld", sensoring)
  235. welder.Part0 = torso
  236. welder.Part1 = sensoring
  237. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  238. sensoring.Transparency = 1
  239. -----------------
  240. local sensoring1 = Instance.new("Part", torso)
  241. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  242. sensoring1.CanCollide = false
  243. sensoring1.Position = torso.Position
  244. local welder1 = Instance.new("Weld", sensoring)
  245. welder1.Part0 = torso
  246. welder1.Part1 = sensoring1
  247. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  248. sensoring1.Transparency = 1
  249. local function touch()
  250. if not using then
  251. using = true
  252. local Math = math.random(1,4)
  253. if Math == 1 then
  254. hit:Play()
  255. end
  256. if Math == 2 then
  257. hit1:Play()
  258. end
  259. if Math == 3 then
  260. hit2:Play()
  261. end
  262. if Math == 4 then
  263. hit3:Play()
  264. end
  265. wait(0.1)
  266. using = false
  267. end
  268. end
  269. sensoring.Touched:connect(touch)
  270. sensoring1.Touched:connect(touch)
  271. if part.Name == "Head" then
  272. local hed = Instance.new("Sound", torso)
  273. hed.SoundId = "rbxassetid://147936251"
  274. hed.Volume = 5
  275. hed:Play()
  276. hum.Health = 0.00001
  277. local UUUHUUH = Instance.new("Sound", torso)
  278. UUUHUUH.SoundId = "rbxassetid://666800317"
  279. UUUHUUH.Volume = 5
  280. UUUHUUH:Play()
  281. for i,v in pairs(torso.Parent:GetChildren()) do
  282. if v.ClassName == "Hat" or v.ClassName == "Accessory" then
  283. v:destroy()
  284. end
  285. end
  286. for i,v in pairs(torso.Parent.Head:GetChildren()) do
  287. if v.ClassName == "Decal" then
  288. v:destroy()
  289. end
  290. end
  291. torso.Parent.Head.Transparency = 1
  292. wait(4)
  293. hum.Health = 0
  294. end
  295. while true do
  296. wait(0.3)
  297. hum.PlatformStand = true
  298. end
  299.  
  300. --di ent
  301. end
  302. end
  303. end
  304. missle.Touched:connect(kill)
  305. for i = 1,2 do
  306. wait()
  307. weld.C0 = weld.C0 * CFrame.Angles(0,0,-0.07)
  308. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,-0.07)
  309. end
  310. shooting = false
  311. wait(3)
  312. shotsound:destroy()
  313. end
  314. end
  315. mouse.Button1Down:connect(shoot)
  316. --0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0
  317. --0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0
  318. --[[
  319. local vel = Instance.new("BodyVelocity", game.Players.LocalPlayer.Character.Torso)
  320. vel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * -5
  321. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  322. --]]
  323. --By Rufus14 (FINALLY I KNOW HOW TO MAKE A RAGDOLL :D)
  324. --die plz
  325. mouse = game.Players.LocalPlayer:GetMouse()
  326. function ragdoll()
  327. pumpedupkickz:Stop()
  328. game.Players.LocalPlayer.Character.Archivable = true
  329. clone = game.Players.LocalPlayer.Character:Clone()
  330. clone.Parent = workspace
  331. for i,v in pairs(clone:GetChildren()) do
  332. if v.ClassName == "Script" or v.ClassName == "LocalScript" then
  333. v:destroy()
  334. end
  335. for i,p in pairs(v:GetChildren()) do
  336. if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then
  337. p:destroy()
  338. end
  339. end
  340. end
  341. for i,t in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  342. if t.ClassName == "Accessory" or t.ClassName == "ForceField" then
  343. t:destroy()
  344. end
  345. end
  346. vel = Instance.new("BodyVelocity", clone.Torso)
  347. vel.Velocity = clone.Torso.CFrame.lookVector * -5
  348. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  349. clone.Head.face.Texture = "http://www.roblox.com/asset/?id=161061608"
  350. using = false
  351. hit = Instance.new("Sound", clone.Torso)
  352. hit.SoundId = "rbxassetid://260430060"
  353. hit.Volume = 5
  354. hit1 = Instance.new("Sound", clone.Torso)
  355. hit1.SoundId = "rbxassetid://138087186"
  356. hit1.Volume = 5
  357. hit2 = Instance.new("Sound", clone.Torso)
  358. hit2.SoundId = "rbxassetid://131237241"
  359. hit2.Volume = 5
  360. hit3 = Instance.new("Sound", clone.Torso)
  361. hit3.SoundId = "rbxassetid://278062209"
  362. hit3.Volume = 5
  363. hit3.TimePosition = 0.33
  364. ded = Instance.new("Sound", clone.Torso)
  365. ded.SoundId = "rbxassetid://418892870"
  366. ded.Volume = 5
  367. local leftarm = clone:findFirstChild("Left Arm")
  368. local rightrm = clone:findFirstChild("Right Arm")
  369. local leftleg = clone:findFirstChild("Left Leg")
  370. local rightleg = clone:findFirstChild("Right Leg")
  371. local head = clone:findFirstChild("Head")
  372. for i, g in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  373. if g.ClassName == "Part" then
  374. g:destroy()
  375. end
  376. end
  377. for i, h in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  378. if h.ClassName == "Accesory" then
  379. h:destroy()
  380. end
  381. end
  382. game.Workspace.CurrentCamera.CameraSubject = head
  383. if head ~= nil then
  384. local glue13 = Instance.new("Glue", clone.Torso)
  385. glue13.Part0 = clone.Torso
  386. glue13.Part1 = head
  387. glue13.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  388. glue13.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  389. local collider13 = Instance.new("Part", head)
  390. collider13.Position = Vector3.new(0,999,0)
  391. collider13.Size = Vector3.new(0.5, 0.9, 0.9)
  392. collider13.Shape = "Cylinder"
  393. collider13.Transparency = 1
  394. local weld = Instance.new("Weld", collider13)
  395. weld.Part0 = head
  396. weld.Part1 = collider13
  397. weld.C0 = weld.C0 * CFrame.new(0,0.2,0) * CFrame.Angles(0, 0, 80)
  398. collider13.TopSurface = "Smooth"
  399. collider13.BottomSurface = "Smooth"
  400. collider13.formFactor = "Symmetric"
  401. end
  402. if leftleg ~= nil then
  403. local glue = Instance.new("Glue", clone.Torso)
  404. glue.Part0 = clone.Torso
  405. glue.Part1 = leftleg
  406. glue.Name = "Left leg"
  407. local collider = Instance.new("Part", leftleg)
  408. collider.Position = Vector3.new(0,999,0)
  409. collider.Size = Vector3.new(1.7, 1, 1)
  410. collider.Shape = "Cylinder"
  411. local weld = Instance.new("Weld", collider)
  412. weld.Part0 = leftleg
  413. weld.Part1 = collider
  414. weld.C0 = CFrame.Angles(0, 0, 80)
  415. collider.TopSurface = "Smooth"
  416. collider.BottomSurface = "Smooth"
  417. collider.formFactor = "Symmetric"
  418. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  419. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  420. collider.Transparency = 1
  421. end
  422. ------------
  423. if rightleg ~= nil then
  424. local glue1 = Instance.new("Glue", clone.Torso)
  425. glue1.Part0 = clone.Torso
  426. glue1.Part1 = rightleg
  427. glue1.Name = "Right leg"
  428. local collider1 = Instance.new("Part", rightleg)
  429. collider1.Position = Vector3.new(0,999,0)
  430. collider1.Size = Vector3.new(1.7, 1, 1)
  431. collider1.Shape = "Cylinder"
  432. local weld1 = Instance.new("Weld", collider1)
  433. weld1.Part0 = rightleg
  434. weld1.Part1 = collider1
  435. weld1.C0 = CFrame.Angles(0, 0, 80)
  436. collider1.TopSurface = "Smooth"
  437. collider1.BottomSurface = "Smooth"
  438. collider1.formFactor = "Symmetric"
  439. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  440. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  441. collider1.Transparency = 1
  442. end
  443. ------------
  444. if rightrm ~= nil then
  445. local glue11 = Instance.new("Glue", clone.Torso)
  446. glue11.Part0 = clone.Torso
  447. glue11.Part1 = rightrm
  448. glue11.Name = "Right shoulder"
  449. local collider11 = Instance.new("Part", rightrm)
  450. collider11.Position = Vector3.new(0,9999,0)
  451. collider11.Size = Vector3.new(1.8,1,1)
  452. collider11.Shape = "Cylinder"
  453. local weld11 = Instance.new("Weld", collider11)
  454. weld11.Part0 = rightrm
  455. weld11.Part1 = collider11
  456. weld11.C0 = CFrame.Angles(0, 0, 80)
  457. collider11.TopSurface = "Smooth"
  458. collider11.BottomSurface = "Smooth"
  459. collider11.formFactor = "Symmetric"
  460. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  461. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  462. collider11.Transparency = 1
  463. end
  464. ------------
  465. if leftarm ~= nil then
  466. local glue111 = Instance.new("Glue", clone.Torso)
  467. glue111.Part0 = clone.Torso
  468. glue111.Part1 = leftarm
  469. glue111.Name = "Left shoulder"
  470. local collider111 = Instance.new("Part", leftarm)
  471. collider111.Position = Vector3.new(0,9999,0)
  472. collider111.Size = Vector3.new(1.8,1,1)
  473. collider111.Shape = "Cylinder"
  474. local weld111 = Instance.new("Weld", collider111)
  475. weld111.Part0 = leftarm
  476. weld111.Part1 = collider111
  477. weld111.C0 = CFrame.Angles(0, 0, 80)
  478. collider111.TopSurface = "Smooth"
  479. collider111.BottomSurface = "Smooth"
  480. collider111.formFactor = "Symmetric"
  481. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  482. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  483. collider111.Transparency = 1
  484. ----------------
  485. sensoring = Instance.new("Part", clone.Torso)
  486. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  487. sensoring.CanCollide = false
  488. sensoring.Position = clone.Torso.Position
  489. local welder = Instance.new("Weld", sensoring)
  490. welder.Part0 = clone.Torso
  491. welder.Part1 = sensoring
  492. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  493. sensoring.Transparency = 1
  494. -----------------
  495. sensoring1 = Instance.new("Part", clone.Torso)
  496. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  497. sensoring1.CanCollide = false
  498. sensoring1.Position = clone.Torso.Position
  499. local welder1 = Instance.new("Weld", sensoring)
  500. welder1.Part0 = clone.Torso
  501. welder1.Part1 = sensoring1
  502. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  503. sensoring1.Transparency = 1
  504. end
  505. clone.Name = game.Players.LocalPlayer.Character.Name.." (DEAD)"
  506. ded:Play()
  507. vel:destroy()
  508. wait(0.5)
  509. local function touch()
  510. if not using then
  511. using = true
  512. local Math = math.random(1,4)
  513. if Math == 1 then
  514. hit:Play()
  515. end
  516. if Math == 2 then
  517. hit1:Play()
  518. end
  519. if Math == 3 then
  520. hit2:Play()
  521. end
  522. if Math == 4 then
  523. hit3:Play()
  524. end
  525. wait(0.1)
  526. using = false
  527. end
  528. end
  529. sensoring.Touched:connect(touch)
  530. sensoring1.Touched:connect(touch)
  531. wait(4.47)
  532. hit1.Volume = 0
  533. hit2.Volume = 0
  534. hit3.Volume = 0
  535. hit.Volume = 0
  536. end
  537.  
  538. game.Players.LocalPlayer.Character.Humanoid.Died:connect(ragdoll)
  539.  
  540. --di ent
Add Comment
Please, Sign In to add comment