Advertisement
zXzGamePROzXz

idk just trying make a hotline miami

Oct 20th, 2019
690
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 38.03 KB | None | 0 0
  1. mouse = game.Players.LocalPlayer:GetMouse()
  2. local rhandclone = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
  3. local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  4. rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  5. rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
  6. rhandweld.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  7. local lhandclone = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
  8. local lhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  9. lhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  10. lhandweld.Part1 = game.Players.LocalPlayer.Character["Left Arm"]
  11. lhandweld.C0 = CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  12. local rootjointclone = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
  13. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Remove()
  14. local humanoidrootpart = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  15. humanoidrootpart.Part0 = game.Players.LocalPlayer.Character.HumanoidRootPart
  16. humanoidrootpart.Part1 = game.Players.LocalPlayer.Character.Torso
  17. local heed = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
  18. local headweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  19. headweld.Part0 = game.Players.LocalPlayer.Character.Torso
  20. headweld.Part1 = game.Players.LocalPlayer.Character.Head
  21. headweld.C0 = headweld.C0 * CFrame.new(0,1.5,0)
  22. game.Players.LocalPlayer.Character.Torso.Neck:Remove()
  23. using = false
  24. --Converted with ttyyuu12345's model to script plugin v4
  25. function sandbox(var,func)
  26. local env = getfenv(func)
  27. local newenv = setmetatable({},{
  28. __index = function(self,k)
  29. if k=="script" then
  30. return var
  31. else
  32. return env[k]
  33. end
  34. end,
  35. })
  36. setfenv(func,newenv)
  37. return func
  38. end
  39. cors = {}
  40. mas = Instance.new("Model",game:GetService("Lighting"))
  41. Part0 = Instance.new("Part")
  42. SpecialMesh1 = Instance.new("SpecialMesh")
  43. Part0.Parent = mas
  44. Part0.Rotation = Vector3.new(-17.039999, 72.0800018, -73.7399979)
  45. Part0.Size = Vector3.new(0.48999998, 2.96999931, 1.94999981)
  46. Part0.CFrame = CFrame.new(1.99671245, 4.08856773, -0.616976917, 0.0861581191, 0.29545939, 0.95146209, -0.99592489, 0, 0.090184398, 0.0266458243, -0.955355108, 0.294255406)
  47. Part0.BottomSurface = Enum.SurfaceType.Smooth
  48. Part0.TopSurface = Enum.SurfaceType.Smooth
  49. Part0.Position = Vector3.new(1.99671245, 4.08856773, -0.616976917)
  50. Part0.Orientation = Vector3.new(-5.17000008, 72.8099976, -90)
  51. Part0.CanCollide = false
  52. SpecialMesh1.Parent = Part0
  53. SpecialMesh1.MeshId = "rbxassetid://54983181"
  54. SpecialMesh1.Scale = Vector3.new(0.0209999997, 0.0209999997, 0.0209999997)
  55. SpecialMesh1.TextureId = "rbxassetid://54983107"
  56. SpecialMesh1.MeshType = Enum.MeshType.FileMesh
  57. SpecialMesh1.Scale = Vector3.new(0.0209999997, 0.0209999997, 0.0209999997)
  58. for i,v in pairs(mas:GetChildren()) do
  59. v.Parent = game:GetService("Players").LocalPlayer.Character
  60. pcall(function() v:MakeJoints() end)
  61. end
  62. mas:Destroy()
  63. for i,v in pairs(cors) do
  64. spawn(function()
  65. pcall(v)
  66. end)
  67. end
  68. Part0:BreakJoints()
  69. cananimate = true
  70. canhit = false
  71. local weld = Instance.new("Weld", game.Players.LocalPlayer.Character["Right Arm"])
  72. weld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  73. weld.Part1 = Part0
  74. weld.C0 = CFrame.new(0.0769970417, -1.17027426, -1.17937994, 0, 0, 1, -0.999999881, 0, 0, 0, -1, 0)
  75. for i = 0,1 , 0.03 do
  76. headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 0.962374032, 0, 0.271727562, 0, 1, 0, -0.271727562, 0, 0.962374032),i)
  77. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 0.955355227, 0, -0.295459419, 0, 1, 0, 0.295459419, 0, 0.955355227),i)
  78. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53559077, 0.0383267403, 0, 0.997264206, 0.0739177391, 0, -0.0739177391, 0.997264266, 0, 2.98023224e-08, 1.86264515e-09, 0.999999881),i)
  79. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54305458, 0.047129631, 2.98023224e-08, 0.99592495, -0.0901843905, 0, 0.090184398, 0.995925009, 0, 0, 0, 0.999999881),i)
  80. game:GetService("RunService").RenderStepped:wait()
  81. end
  82. function swing()
  83. if not using then
  84. using = true
  85. cananimate = false
  86. for i = 0,1 , 0.045 do
  87. weld.C0 = weld.C0:lerp(CFrame.new(0.958130836, -0.815908253, -0.0419664383, 0.379335552, 0.92491132, -0.0253674984, -0.913223445, 0.378668189, 0.150445476, 0.148754537, -0.0339030921, 0.988292694),i)
  88. headweld.C0 = headweld.C0:lerp(CFrame.new(-4.65661287e-10, 1.49999952, 0, 0.601507425, -2.32830644e-10, 0.798867226, 3.0559022e-10, 1, 0, -0.798867226, -4.65661287e-10, 0.601507425),i)
  89. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 0.63088727, -0.00573391188, -0.775853336, 0, 0.999972701, -0.00739025697, 0.775874496, 0.00466241874, 0.630870044),i)
  90. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(0.0363237262, 0.350219727, -1.1563791, 0.495106995, -0.857149601, 0.1419992, 0.110766649, -0.0998312235, -0.988819599, 0.861742377, 0.505300522, 0.0455164276),i)
  91. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.50056481, 0.516354084, -0.499166548, 0.995925009, -0.00520473719, 0.09003409, 0.0901844054, 0.0574772507, -0.994265079, -2.98023224e-08, 0.998333335, 0.057712432),i)
  92. game:GetService("RunService").RenderStepped:wait()
  93. end
  94. canhit = true
  95. for i = 0,1 , 0.08 do
  96. weld.C0 = weld.C0:lerp(CFrame.new(0.968596578, -1.15575922, 0.178524971, 0.0531506836, 0.988890588, -0.13881819, -0.988834679, 0.0327400565, -0.145376131, -0.13921617, 0.144995078, 0.979589343),i)
  97. headweld.C0 = headweld.C0:lerp(CFrame.new(-0.0249017328, 1.48724031, 2.04332173e-06, 0.499998868, 0, -0.866026163, 0, 1, 0, 0.866026163, 0, 0.499998868),i)
  98. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 0.305942208, 0, -0.952050149, 0, 1, 0, 0.952050149, 0, 0.305942208):inverse(),i)
  99. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.07653618, 0.305679321, -0.818206966, 0.707105398, -0.707108259, 4.32133675e-07, 0.122787982, 0.122786887, -0.984807909, 0.696365714, 0.696363032, 0.173647687),i)
  100. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(0.74788636, 0.363031864, -0.7663396, 0.70710665, 0.707106948, -2.23517418e-08, -0.0616280138, 0.061627958, -0.99619478, -0.704416275, 0.704416037, 0.0871551335),i)
  101. game:GetService("RunService").RenderStepped:wait()
  102. end
  103. canhit = false
  104. using = false
  105. cananimate = true
  106. end
  107. end
  108. mouse.Button1Down:connect(swing)
  109. function hittie(part)
  110. if canhit then
  111. local humanoid = part.Parent:findFirstChildOfClass("Humanoid")
  112. if humanoid then
  113. canhit = false
  114. using = false
  115. local uptor = humanoid.Parent:findFirstChild("UpperTorso")
  116. if uptor and uptor.Parent.Name ~= game.Players.LocalPlayer.Name then
  117. humanoid.Parent:BreakJoints()
  118. while humanoid.Health >= 0.001 do
  119. game:GetService("RunService").RenderStepped:wait()
  120. end
  121. if humanoid.Parent:findFirstChild("HumanoidRootPart") then
  122. humanoid.Parent.HumanoidRootPart.CanCollide = false
  123. end
  124. local function makeballlimb(attachone, attachtwo, upperang, lowang, twist)
  125. local constraint = Instance.new("BallSocketConstraint", humanoid.Parent)
  126. constraint.Attachment0 = attachone
  127. constraint.Attachment1 = attachtwo
  128. constraint.LimitsEnabled = true
  129. constraint.TwistLimitsEnabled = true
  130. constraint.TwistLowerAngle = lowang
  131. constraint.TwistUpperAngle = upperang
  132. constraint.UpperAngle = twist
  133. end
  134. local function makehingelimb(attachone, attachtwo, upperang, lowang)
  135. local constraint = Instance.new("HingeConstraint", humanoid.Parent)
  136. constraint.Attachment0 = attachone
  137. constraint.Attachment1 = attachtwo
  138. constraint.LimitsEnabled = true
  139. constraint.LowerAngle = lowang
  140. constraint.UpperAngle = upperang
  141. end
  142. for i,v in pairs(humanoid.Parent:GetChildren()) do --scan player
  143. if v.ClassName == "Accessory" then
  144. local findhandle = v:findFirstChild("Handle") --finding handle in accesorry
  145. if findhandle then
  146. local attach = findhandle:findFirstChildOfClass("Attachment")
  147. for q,w in pairs(humanoid.Parent:GetChildren()) do --scan player
  148. if w.Name == "UpperTorso" or w.Name == "Head" then
  149. attach1 = w:findFirstChild(attach.Name) --finding attachment in head/uppertorso
  150. end
  151. end
  152. if attach and attach1 then
  153. local constraint = Instance.new("HingeConstraint", humanoid.Parent) --making fake weld
  154. constraint.Attachment0 = attach
  155. constraint.Attachment1 = attach1
  156. constraint.LimitsEnabled = true
  157. constraint.LowerAngle = 0
  158. constraint.UpperAngle = 0
  159. end
  160. end
  161. end
  162. end
  163. if humanoid.Parent:findFirstChild("Head") and humanoid.Parent:findFirstChild("UpperTorso") then
  164. local attachment = Instance.new("Attachment", humanoid.Parent.Head)
  165. attachment.Position = Vector3.new(0, -0.5, 0)
  166. attachment.Name = "lol"
  167. attachment.Visible = false
  168. humanoid.Parent.UpperTorso.NeckAttachment.Visible = false
  169. humanoid.Parent.UpperTorso.NeckAttachment.Position = humanoid.Parent.UpperTorso.NeckAttachment.Position + Vector3.new(0,0,0)
  170. local ball = Instance.new("BallSocketConstraint", humanoid.Parent)
  171. ball.Attachment0 = humanoid.Parent.UpperTorso.NeckAttachment
  172. ball.Attachment1 = attachment
  173. ball.LimitsEnabled = true
  174. ball.TwistLimitsEnabled = true
  175. ball.UpperAngle = 40
  176. ball.Restitution = 0.5
  177. ball.TwistUpperAngle = 40
  178. ball.TwistLowerAngle = -40
  179. local collidepartofleftleg = Instance.new("Part", humanoid.Parent.UpperTorso)
  180. collidepartofleftleg.Name = "Bone"
  181. collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
  182. collidepartofleftleg.Transparency = 1
  183. collidepartofleftleg:BreakJoints()
  184. local weeld = Instance.new("Weld", collidepartofleftleg)
  185. weeld.Part0 = collidepartofleftleg
  186. weeld.Part1 = humanoid.Parent["Head"]
  187. if humanoid.Parent.Head:findFirstChild("Neck") then
  188. humanoid.Parent.Head.Neck:destroy()
  189. end
  190. if humanoid.Parent.Head:findFirstChild("face") then
  191. humanoid.Parent.Head.face.Texture = "http://www.roblox.com/asset/?id=810245460"
  192. end
  193. end
  194. local LeftUpperLeg = humanoid.Parent:findFirstChild("LeftUpperLeg")
  195. local LeftLowerLeg = humanoid.Parent:findFirstChild("LeftLowerLeg")
  196. --
  197. local RightUpperLeg = humanoid.Parent:findFirstChild("RightUpperLeg")
  198. local RightLowerLeg = humanoid.Parent:findFirstChild("RightLowerLeg")
  199. --
  200. local RightUpperArm = humanoid.Parent:findFirstChild("RightUpperArm")
  201. local RightLowerArm = humanoid.Parent:findFirstChild("RightLowerArm")
  202. --
  203. local LeftUpperArm = humanoid.Parent:findFirstChild("LeftUpperArm")
  204. local LeftLowerArm = humanoid.Parent:findFirstChild("LeftLowerArm")
  205. --Foot & Hands--
  206.  
  207. local LeftFoot = humanoid.Parent:findFirstChild("LeftFoot")
  208. local RightFoot = humanoid.Parent:findFirstChild("RightFoot")
  209. --
  210. local LeftHand = humanoid.Parent:findFirstChild("LeftHand")
  211. local RightHand = humanoid.Parent:findFirstChild("RightHand")
  212.  
  213. --END--
  214. --TORSOS--
  215.  
  216. local UpperTorso = humanoid.Parent:findFirstChild("UpperTorso")
  217. local LowerTorso = humanoid.Parent:findFirstChild("LowerTorso")
  218.  
  219. --END--
  220. if LowerTorso then
  221. if LeftUpperLeg then
  222. makeballlimb(LowerTorso["LeftHipRigAttachment"], LeftUpperLeg["LeftHipRigAttachment"], 50,-50, 90)
  223. end
  224. if RightUpperLeg then
  225. makeballlimb(LowerTorso["RightHipRigAttachment"], RightUpperLeg["RightHipRigAttachment"], 50,-50, 90)
  226. end
  227. if LeftLowerLeg then
  228. makehingelimb(LeftUpperLeg["LeftKneeRigAttachment"], LeftLowerLeg["LeftKneeRigAttachment"], 0,-90)
  229. end
  230. if RightLowerLeg then
  231. makehingelimb(RightUpperLeg["RightKneeRigAttachment"], RightLowerLeg["RightKneeRigAttachment"], 0,-90)
  232. end
  233. if LeftFoot then
  234. makehingelimb(LeftLowerLeg["LeftAnkleRigAttachment"], LeftFoot["LeftAnkleRigAttachment"], 30, -30)
  235. end
  236. if RightFoot then
  237. makehingelimb(RightLowerLeg["RightAnkleRigAttachment"], RightFoot["RightAnkleRigAttachment"], 30, -30)
  238. end
  239. if UpperTorso then
  240. makehingelimb(UpperTorso["WaistRigAttachment"], LowerTorso["WaistRigAttachment"], 30, -30)
  241. end
  242. end
  243. if UpperTorso then
  244. local vel = Instance.new("BodyVelocity", UpperTorso)
  245. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  246. vel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 10
  247. game.Debris:AddItem(vel, 0.1)
  248. local hitsound = Instance.new("Sound", UpperTorso)
  249. hitsound.SoundId = "http://www.roblox.com/asset/?id=148862502"
  250. hitsound:Play()
  251. hitsound.Volume = math.random(5,10)
  252. local canhit = true
  253. local hitval = 15
  254. local uptor = humanoid.Parent.UpperTorso
  255. if RightUpperArm then
  256. makeballlimb(RightUpperArm["RightShoulderRigAttachment"], UpperTorso["RightShoulderRigAttachment"], 90,-50, 180)
  257. end
  258. if RightLowerArm then
  259. makehingelimb(RightLowerArm["RightElbowRigAttachment"], RightUpperArm["RightElbowRigAttachment"], 0,-90)
  260. end
  261. if RightHand then
  262. makehingelimb(RightHand["RightWristRigAttachment"], RightLowerArm["RightWristRigAttachment"], 30,30)
  263. end
  264. if LeftUpperArm then
  265. makeballlimb(LeftUpperArm["LeftShoulderRigAttachment"], UpperTorso["LeftShoulderRigAttachment"], 90,-50, 180)
  266. end
  267. if LeftLowerArm then
  268. makehingelimb(LeftLowerArm["LeftElbowRigAttachment"], LeftUpperArm["LeftElbowRigAttachment"], 0,-90)
  269. end
  270. if LeftHand then
  271. makehingelimb(LeftHand["LeftWristRigAttachment"], LeftLowerArm["LeftWristRigAttachment"], 30,30)
  272. end
  273. end
  274. else
  275. humanoid.Parent.Archivable = true
  276. humanoid.PlatformStand = true
  277. local clone = humanoid.Parent:Clone()
  278. clone.Parent = workspace
  279. game.Debris:AddItem(clone, 60)
  280. for i,v in pairs(clone:GetChildren()) do
  281. if v.ClassName == "Script" or v.ClassName == "LocalScript" then
  282. v:Remove()
  283. end
  284. for i,p in pairs(v:GetChildren()) do
  285. if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then
  286. p:Remove()
  287. end
  288. end
  289. end
  290. for i,t in pairs(humanoid.Parent:GetChildren()) do
  291. if t.ClassName == "Accessory" or t.ClassName == "ForceField" then
  292. t:Remove()
  293. end
  294. end
  295. local vel = Instance.new("BodyVelocity", clone.Torso)
  296. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  297. vel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 15
  298. game.Debris:AddItem(vel, 0.1)
  299. local hitsound = Instance.new("Sound", clone.Torso)
  300. hitsound.SoundId = "http://www.roblox.com/asset/?id=148862502"
  301. hitsound:Play()
  302. hitsound.Volume = math.random(5,10)
  303. vel = Instance.new("BodyVelocity", clone.Torso)
  304. vel.Velocity = clone.Torso.CFrame.lookVector * -5
  305. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  306. using = false
  307. hit = Instance.new("Sound", clone.Torso)
  308. hit.SoundId = "rbxassetid://260430060"
  309. hit.Volume = 0
  310. hit1 = Instance.new("Sound", clone.Torso)
  311. hit1.SoundId = "rbxassetid://138087186"
  312. hit1.Volume = 0
  313. hit2 = Instance.new("Sound", clone.Torso)
  314. hit2.SoundId = "rbxassetid://131237241"
  315. hit2.Volume = 0
  316. hit3 = Instance.new("Sound", clone.Torso)
  317. hit3.SoundId = "rbxassetid://278062209"
  318. hit3.Volume = 0
  319. hit3.TimePosition = 0.33
  320. ded = Instance.new("Sound", clone.Torso)
  321. ded.SoundId = "rbxassetid://418892870"
  322. ded.Volume = 0
  323. local leftarm = clone:findFirstChild("Left Arm")
  324. local rightrm = clone:findFirstChild("Right Arm")
  325. local leftleg = clone:findFirstChild("Left Leg")
  326. local rightleg = clone:findFirstChild("Right Leg")
  327. local head = clone:findFirstChild("Head")
  328. for i, g in pairs(humanoid.Parent:GetChildren()) do
  329. if g.ClassName == "Part" then
  330. g:destroy()
  331. end
  332. end
  333. for i, h in pairs(humanoid.Parent:GetChildren()) do
  334. if h.ClassName == "Accesory" then
  335. h:destroy()
  336. end
  337. end
  338. for z,x in pairs(clone:GetChildren()) do
  339. if x.ClassName == "Accessory" then
  340. local handle = x:findFirstChild("Handle")
  341. if handle then
  342. local attachment = handle:findFirstChildOfClass("Attachment")
  343. if attachment then
  344. for q,w in pairs(clone:GetChildren()) do
  345. if w.Name == "Torso" or w.Name == "Head" then
  346. local anotherone = w:findFirstChild(attachment.Name)
  347. if attachment and anotherone then
  348. local constraint = Instance.new("HingeConstraint", clone) --making fake weld
  349. constraint.Attachment0 = attachment
  350. constraint.Attachment1 = anotherone
  351. constraint.LimitsEnabled = true
  352. constraint.LowerAngle = 0
  353. constraint.UpperAngle = 0
  354. end
  355. end
  356. end
  357. end
  358. end
  359. end
  360. end
  361. if head and clone.Torso:findFirstChild("NeckAttachment") then
  362. local attachment = Instance.new("Attachment", clone.Head)
  363. attachment.Position = Vector3.new(0, -0.5, 0)
  364. attachment.Name = "lol"
  365. attachment.Visible = false
  366. clone.Torso.NeckAttachment.Visible = false
  367. clone.Torso.NeckAttachment.Position = clone.Torso.NeckAttachment.Position + Vector3.new(0,0,0)
  368. local ball = Instance.new("BallSocketConstraint", clone)
  369. ball.Attachment0 = clone.Torso.NeckAttachment
  370. ball.Attachment1 = attachment
  371. ball.LimitsEnabled = true
  372. ball.TwistLimitsEnabled = true
  373. ball.UpperAngle = 90
  374. ball.Restitution = 0.5
  375. ball.TwistUpperAngle = 90
  376. ball.TwistLowerAngle = -90
  377. local collidepartofleftleg = Instance.new("Part", clone.Torso)
  378. collidepartofleftleg.Name = "Bone"
  379. collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
  380. collidepartofleftleg.Transparency = 1
  381. collidepartofleftleg:BreakJoints()
  382. local weeld = Instance.new("Weld", collidepartofleftleg)
  383. weeld.Part0 = collidepartofleftleg
  384. weeld.Part1 = clone["Head"]
  385. end
  386. if leftleg ~= nil then
  387. leftleg:BreakJoints()
  388. local glue = Instance.new("Glue", clone.Torso)
  389. glue.Part0 = clone.Torso
  390. glue.Part1 = leftleg
  391. glue.Name = "Left leg"
  392. local collider = Instance.new("Part", leftleg)
  393. collider.Position = Vector3.new(0,999,0)
  394. collider.Size = Vector3.new(1.5, 1, 1)
  395. collider.Shape = "Cylinder"
  396. local weld = Instance.new("Weld", collider)
  397. weld.Part0 = leftleg
  398. weld.Part1 = collider
  399. weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  400. collider.TopSurface = "Smooth"
  401. collider.BottomSurface = "Smooth"
  402. collider.formFactor = "Symmetric"
  403. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  404. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  405. collider.Transparency = 1
  406. end
  407. ------------
  408. if rightleg ~= nil then
  409. rightleg:BreakJoints()
  410. local glue1 = Instance.new("Glue", clone.Torso)
  411. glue1.Part0 = clone.Torso
  412. glue1.Part1 = rightleg
  413. glue1.Name = "Right leg"
  414. local collider1 = Instance.new("Part", rightleg)
  415. collider1.Position = Vector3.new(0,999,0)
  416. collider1.Size = Vector3.new(1.5, 1, 1)
  417. collider1.Shape = "Cylinder"
  418. local weld1 = Instance.new("Weld", collider1)
  419. weld1.Part0 = rightleg
  420. weld1.Part1 = collider1
  421. weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  422. collider1.TopSurface = "Smooth"
  423. collider1.BottomSurface = "Smooth"
  424. collider1.formFactor = "Symmetric"
  425. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  426. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  427. collider1.Transparency = 1
  428. end
  429. ------------
  430. if rightrm ~= nil then
  431. rightrm:BreakJoints()
  432. rightrm.CFrame = clone.Torso.CFrame * CFrame.new(1.7,0,0)
  433. local glue11 = Instance.new("Glue", clone.Torso)
  434. glue11.Part0 = clone.Torso
  435. glue11.Part1 = rightrm
  436. glue11.Name = "Right shoulder"
  437. local collider11 = Instance.new("Part", rightrm)
  438. collider11.Position = Vector3.new(0,9999,0)
  439. collider11.Size = Vector3.new(1.5,1,1)
  440. collider11.Shape = "Cylinder"
  441. local weld11 = Instance.new("Weld", collider11)
  442. weld11.Part0 = rightrm
  443. weld11.Part1 = collider11
  444. weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  445. collider11.TopSurface = "Smooth"
  446. collider11.BottomSurface = "Smooth"
  447. collider11.formFactor = "Symmetric"
  448. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  449. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  450. collider11.Transparency = 1
  451. end
  452. ------------
  453. if leftarm ~= nil then
  454. leftarm.CFrame = clone.Torso.CFrame * CFrame.new(-1.7,0,0)
  455. leftarm:BreakJoints()
  456. local glue111 = Instance.new("Glue", clone.Torso)
  457. glue111.Part0 = clone.Torso
  458. glue111.Part1 = leftarm
  459. glue111.Name = "Left shoulder"
  460. local collider111 = Instance.new("Part", leftarm)
  461. collider111.Position = Vector3.new(0,9999,0)
  462. collider111.Size = Vector3.new(1.5,1,1)
  463. collider111.Shape = "Cylinder"
  464. local weld111 = Instance.new("Weld", collider111)
  465. weld111.Part0 = leftarm
  466. weld111.Part1 = collider111
  467. weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  468. collider111.TopSurface = "Smooth"
  469. collider111.BottomSurface = "Smooth"
  470. collider111.formFactor = "Symmetric"
  471. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  472. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  473. collider111.Transparency = 1
  474. ----------------
  475. sensoring = Instance.new("Part", clone.Torso)
  476. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  477. sensoring.CanCollide = false
  478. sensoring.Position = clone.Torso.Position
  479. local welder = Instance.new("Weld", sensoring)
  480. welder.Part0 = clone.Torso
  481. welder.Part1 = sensoring
  482. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  483. sensoring.Transparency = 1
  484. -----------------
  485. sensoring1 = Instance.new("Part", clone.Torso)
  486. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  487. sensoring1.CanCollide = false
  488. sensoring1.Position = clone.Torso.Position
  489. local welder1 = Instance.new("Weld", sensoring)
  490. welder1.Part0 = clone.Torso
  491. welder1.Part1 = sensoring1
  492. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  493. sensoring1.Transparency = 1
  494. end
  495. clone.Name = humanoid.Parent.Name.." (DEAD!)"
  496. ded:Play()
  497. vel:destroy()
  498. wait(0.5)
  499. local function touch()
  500. if not using then
  501. using = true
  502. local Math = math.random(1,4)
  503. if Math == 1 then
  504. hit:Play()
  505. end
  506. if Math == 2 then
  507. hit1:Play()
  508. end
  509. if Math == 3 then
  510. hit2:Play()
  511. end
  512. if Math == 4 then
  513. hit3:Play()
  514. end
  515. wait(0.1)
  516. using = false
  517. end
  518. end
  519. sensoring.Touched:connect(touch)
  520. sensoring1.Touched:connect(touch)
  521. while true do
  522. if clone:findFirstChild("Head") then
  523. clone.Head.CanCollide = false
  524. end
  525. game:GetService("RunService").Stepped:wait()
  526. end
  527. end
  528. end
  529. end
  530. end
  531. Part0.Touched:connect(hittie)
  532. function ragdoll()
  533. game.Players.LocalPlayer.Character.Archivable = true
  534. clone = game.Players.LocalPlayer.Character:Clone()
  535. clone.Parent = workspace
  536. for i,v in pairs(clone:GetChildren()) do
  537. if v.ClassName == "Script" or v.ClassName == "LocalScript" then
  538. v:Remove()
  539. end
  540. for i,p in pairs(v:GetChildren()) do
  541. if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then
  542. p:Remove()
  543. end
  544. end
  545. end
  546. for i,t in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  547. if t.ClassName == "Accessory" or t.ClassName == "ForceField" then
  548. t:Remove()
  549. end
  550. end
  551. vel = Instance.new("BodyVelocity", clone.Torso)
  552. vel.Velocity = clone.Torso.CFrame.lookVector * -5
  553. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  554. clone.Head.face.Texture = "http://www.roblox.com/asset/?id=161061608"
  555. using = false
  556. hit = Instance.new("Sound", clone.Torso)
  557. hit.SoundId = "rbxassetid://260430060"
  558. hit.Volume = 0
  559. hit1 = Instance.new("Sound", clone.Torso)
  560. hit1.SoundId = "rbxassetid://138087186"
  561. hit1.Volume = 0
  562. hit2 = Instance.new("Sound", clone.Torso)
  563. hit2.SoundId = "rbxassetid://131237241"
  564. hit2.Volume = 0
  565. hit3 = Instance.new("Sound", clone.Torso)
  566. hit3.SoundId = "rbxassetid://278062209"
  567. hit3.Volume = 0
  568. hit3.TimePosition = 0.33
  569. ded = Instance.new("Sound", clone.Torso)
  570. ded.SoundId = "rbxassetid://337800380"
  571. ded.Volume = 5
  572. local leftarm = clone:findFirstChild("Left Arm")
  573. local rightrm = clone:findFirstChild("Right Arm")
  574. local leftleg = clone:findFirstChild("Left Leg")
  575. local rightleg = clone:findFirstChild("Right Leg")
  576. local head = clone:findFirstChild("Head")
  577. for i, g in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  578. if g.ClassName == "Part" then
  579. g:destroy()
  580. end
  581. end
  582. for i, h in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  583. if h.ClassName == "Accesory" then
  584. h:destroy()
  585. end
  586. end
  587. game.Workspace.CurrentCamera.CameraSubject = head
  588. if head then
  589. local attachment = Instance.new("Attachment", clone.Head)
  590. attachment.Position = Vector3.new(0, -0.5, 0)
  591. attachment.Name = "lol"
  592. attachment.Visible = false
  593. clone.Torso.NeckAttachment.Visible = false
  594. clone.Torso.NeckAttachment.Position = clone.Torso.NeckAttachment.Position + Vector3.new(0,0,0)
  595. local ball = Instance.new("BallSocketConstraint", clone)
  596. ball.Attachment0 = clone.Torso.NeckAttachment
  597. ball.Attachment1 = attachment
  598. ball.LimitsEnabled = true
  599. ball.TwistLimitsEnabled = true
  600. ball.UpperAngle = 90
  601. ball.Restitution = 0.5
  602. ball.TwistUpperAngle = 90
  603. ball.TwistLowerAngle = -90
  604. local collidepartofleftleg = Instance.new("Part", clone.Torso)
  605. collidepartofleftleg.Name = "Bone"
  606. collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
  607. collidepartofleftleg.Transparency = 1
  608. collidepartofleftleg:BreakJoints()
  609. local weeld = Instance.new("Weld", collidepartofleftleg)
  610. weeld.Part0 = collidepartofleftleg
  611. weeld.Part1 = clone["Head"]
  612. end
  613. if leftleg ~= nil then
  614. local glue = Instance.new("Glue", clone.Torso)
  615. glue.Part0 = clone.Torso
  616. glue.Part1 = leftleg
  617. glue.Name = "Left leg"
  618. local collider = Instance.new("Part", leftleg)
  619. collider.Position = Vector3.new(0,999,0)
  620. collider.Size = Vector3.new(1.5, 1, 1)
  621. collider.Shape = "Cylinder"
  622. local weld = Instance.new("Weld", collider)
  623. weld.Part0 = leftleg
  624. weld.Part1 = collider
  625. weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  626. collider.TopSurface = "Smooth"
  627. collider.BottomSurface = "Smooth"
  628. collider.formFactor = "Symmetric"
  629. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  630. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  631. collider.Transparency = 1
  632. end
  633. ------------
  634. if rightleg ~= nil then
  635. local glue1 = Instance.new("Glue", clone.Torso)
  636. glue1.Part0 = clone.Torso
  637. glue1.Part1 = rightleg
  638. glue1.Name = "Right leg"
  639. local collider1 = Instance.new("Part", rightleg)
  640. collider1.Position = Vector3.new(0,999,0)
  641. collider1.Size = Vector3.new(1.5, 1, 1)
  642. collider1.Shape = "Cylinder"
  643. local weld1 = Instance.new("Weld", collider1)
  644. weld1.Part0 = rightleg
  645. weld1.Part1 = collider1
  646. weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  647. collider1.TopSurface = "Smooth"
  648. collider1.BottomSurface = "Smooth"
  649. collider1.formFactor = "Symmetric"
  650. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  651. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  652. collider1.Transparency = 1
  653. end
  654. ------------
  655. if rightrm ~= nil then
  656. local glue11 = Instance.new("Glue", clone.Torso)
  657. glue11.Part0 = clone.Torso
  658. glue11.Part1 = rightrm
  659. glue11.Name = "Right shoulder"
  660. local collider11 = Instance.new("Part", rightrm)
  661. collider11.Position = Vector3.new(0,9999,0)
  662. collider11.Size = Vector3.new(1.5,1,1)
  663. collider11.Shape = "Cylinder"
  664. local weld11 = Instance.new("Weld", collider11)
  665. weld11.Part0 = rightrm
  666. weld11.Part1 = collider11
  667. weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  668. collider11.TopSurface = "Smooth"
  669. collider11.BottomSurface = "Smooth"
  670. collider11.formFactor = "Symmetric"
  671. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  672. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  673. collider11.Transparency = 1
  674. end
  675. ------------
  676. if leftarm ~= nil then
  677. local glue111 = Instance.new("Glue", clone.Torso)
  678. glue111.Part0 = clone.Torso
  679. glue111.Part1 = leftarm
  680. glue111.Name = "Left shoulder"
  681. local collider111 = Instance.new("Part", leftarm)
  682. collider111.Position = Vector3.new(0,9999,0)
  683. collider111.Size = Vector3.new(1.5,1,1)
  684. collider111.Shape = "Cylinder"
  685. local weld111 = Instance.new("Weld", collider111)
  686. weld111.Part0 = leftarm
  687. weld111.Part1 = collider111
  688. weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  689. collider111.TopSurface = "Smooth"
  690. collider111.BottomSurface = "Smooth"
  691. collider111.formFactor = "Symmetric"
  692. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  693. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  694. collider111.Transparency = 1
  695. ----------------
  696. sensoring = Instance.new("Part", clone.Torso)
  697. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  698. sensoring.CanCollide = false
  699. sensoring.Position = clone.Torso.Position
  700. local welder = Instance.new("Weld", sensoring)
  701. welder.Part0 = clone.Torso
  702. welder.Part1 = sensoring
  703. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  704. sensoring.Transparency = 1
  705. -----------------
  706. sensoring1 = Instance.new("Part", clone.Torso)
  707. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  708. sensoring1.CanCollide = false
  709. sensoring1.Position = clone.Torso.Position
  710. local welder1 = Instance.new("Weld", sensoring)
  711. welder1.Part0 = clone.Torso
  712. welder1.Part1 = sensoring1
  713. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  714. sensoring1.Transparency = 1
  715. end
  716. clone.Name = game.Players.LocalPlayer.Character.Name.." (DEAD)"
  717. ded:Play()
  718. vel:destroy()
  719. wait(0.2)
  720. game.Debris:AddItem(clone,60)
  721. local function touch()
  722. if not using then
  723. using = true
  724. local Math = math.random(1,4)
  725. if Math == 1 then
  726. hit:Play()
  727. end
  728. if Math == 2 then
  729. hit1:Play()
  730. end
  731. if Math == 3 then
  732. hit2:Play()
  733. end
  734. if Math == 4 then
  735. hit3:Play()
  736. end
  737. wait(0.1)
  738. using = false
  739. end
  740. end
  741. sensoring.Touched:connect(touch)
  742. sensoring1.Touched:connect(touch)
  743. while true do
  744. clone.Head.CanCollide = false
  745. game:GetService("RunService").Stepped:wait()
  746. end
  747. end
  748.  
  749. game.Players.LocalPlayer.Character.Humanoid.Died:connect(ragdoll)
  750.  
  751. --di ent
  752. while true do
  753. if cananimate then
  754. if game.Players.LocalPlayer.Character.Torso.Velocity.x < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x > 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > 0.5 and cananimate then
  755. for i = 0.1,0.3 , 0.008 do
  756. if cananimate and game.Players.LocalPlayer.Character.Torso.Velocity.x < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x > 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > 0.5 and cananimate then
  757. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53402293, 0.0594797134, 0.144087285, 0.997264206, 0.0707819909, 0.0213012099, -0.0739177391, 0.9549582, 0.287386209, 2.98023224e-08, -0.28817457, 0.957577825),i)
  758. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54035091, 0.0769848824, -0.170524538, 0.99592495, -0.0847774297, 0.0307573378, 0.090184398, 0.936214805, -0.339659303, 0, 0.341049016, 0.940045416),i)
  759. game:GetService("RunService").Stepped:wait()
  760. end
  761. end
  762. for i = 0.1,0.3 , 0.008 do
  763. if cananimate and game.Players.LocalPlayer.Character.Torso.Velocity.x < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x > 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > 0.5 and cananimate then
  764. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53173375, 0.0903658867, -0.222393572, 0.997264206, 0.0662034005, -0.0328776538, -0.0739177391, 0.893185973, -0.443570435, 2.98023224e-08, 0.444787204, 0.895636141),i)
  765. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54079688, 0.0720610619, 0.156226337, 0.99592495, -0.085669145, -0.0281783342, 0.090184398, 0.946062148, 0.311179608, 0, -0.312452823, 0.949932992),i)
  766. game:GetService("RunService").Stepped:wait()
  767. end
  768. end
  769. elseif game.Players.LocalPlayer.Character.Torso.Velocity.x > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x < 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < 0.5 then
  770. for i = 0,1 , 0.1 do
  771. if cananimate and game.Players.LocalPlayer.Character.Torso.Velocity.x > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x < 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < 0.5 and cananimate then
  772. weld.C0 = weld.C0:lerp(CFrame.new(0.0769970417, -1.17027426, -1.17937994, 0, 0, 1, -0.999999881, 0, 0, 0, -1, 0),i)
  773. headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 0.962374032, 0, 0.271727562, 0, 1, 0, -0.271727562, 0, 0.962374032),i)
  774. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 0.955355227, 0, -0.295459419, 0, 1, 0, 0.295459419, 0, 0.955355227),i)
  775. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53559077, 0.0383267403, 0, 0.997264206, 0.0739177391, 0, -0.0739177391, 0.997264266, 0, 2.98023224e-08, 1.86264515e-09, 0.999999881),i)
  776. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54305458, 0.047129631, 2.98023224e-08, 0.99592495, -0.0901843905, 0, 0.090184398, 0.995925009, 0, 0, 0, 0.999999881),i)
  777. game:GetService("RunService").RenderStepped:wait()
  778. end
  779. end
  780. end
  781. end
  782. wait()
  783. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement