Advertisement
subaru112g

ded fe

Feb 27th, 2019
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.03 KB | None | 0 0
  1.  
  2. local plr = owner
  3. local char = plr.Character
  4.  
  5. local nametag = Instance.new("BillboardGui",char.Head)
  6. nametag.StudsOffset = Vector3.new(0,2,0)
  7. nametag.Adornee = char.Head
  8. nametag.Size = UDim2.new(0,200,0,50)
  9.  
  10. local text = Instance.new("TextLabel",nametag)
  11. text.Size = UDim2.new(0,200,0,50)
  12. text.BackgroundTransparency = 1
  13. text.TextColor3 = Color3.new(0, 0, 0)
  14. text.TextStrokeColor3 = Color3.new(0,0,0)
  15. text.Font = Enum.Font.Fantasy
  16. text.TextScaled = true
  17. text.TextStrokeTransparency = 0
  18. text.Text = "DED"
  19.  
  20. local hum = char.Humanoid
  21. local rarm = char["Right Arm"]
  22. local larm= char["Left Arm"]
  23. local rleg= char["Right Leg"]
  24. local lleg = char["Left Leg"]
  25. local root = char.HumanoidRootPart
  26. local tors = char.Torso
  27. local head = char.Head
  28. local sine = 0;
  29. local change = 1;
  30. local RunS = game:GetService("RunService")
  31. local mouse = plr:GetMouse()
  32. local defAnim = true;
  33.  
  34. local Attachments = {}
  35.  
  36. function GetAttach(p)
  37. for _,v in next, p:children() do
  38. if v:IsA'Attachment' then
  39. table.insert(Attachments,v)
  40. end
  41. GetAttach(v)
  42. end
  43. end
  44.  
  45. GetAttach(char)
  46.  
  47. wait(1)
  48.  
  49. local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
  50. local V3 = {N=Vector3.new}
  51. local M = {C=math.cos,R=math.rad,S=math.sin,P=math.pi,RNG=math.random,MRS=math.randomseed,H=math.huge}
  52. local Effects,Sounds = {},{};
  53. --Stop animations
  54. for _,v in next, hum:GetPlayingAnimationTracks() do
  55. v:Stop();
  56. end
  57.  
  58. pcall(game.Destroy,char:FindFirstChild'Animate')
  59. pcall(game.Destroy,hum:FindFirstChild'Animator')
  60. hum:SetStateEnabled("Dead",false)
  61. hum:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
  62. -- Sounds
  63. Sounds['Wet'] = {Id=256738023,Loop=false,Pitch=1}
  64. Sounds['Swoosh1'] = {Id=320557353,Loop=false,Pitch=1}
  65. Sounds['Swoosh2'] = {Id=320557382,Loop=false,Pitch=1}
  66. Sounds['Swoosh3'] = {Id=320557413,Loop=false,Pitch=1}
  67. Sounds['Swoosh4'] = {Id=320557453,Loop=false,Pitch=1}
  68. Sounds['Swoosh5'] = {Id=320557487,Loop=false,Pitch=1}
  69. Sounds['Swoosh6'] = {Id=320557537,Loop=false,Pitch=1}
  70. Sounds['Swoosh7'] = {Id=320557563,Loop=false,Pitch=1}
  71. Sounds['Swoosh8'] = {Id=320557518,Loop=false,Pitch=1}
  72. Sounds['ShrekRemix'] = {Id=163306929,Loop=true,Pitch=1,Volume = 4}
  73. Sounds['CreoDimension'] = {Id=927529620,Loop=true,Pitch=1,Volume=4}
  74. Sounds['BlackBlizzard'] = {Id=657626121,Loop=true,Pitch=1,Volume=4}
  75. Sounds['ColbreakzFantasy'] = {Id=876981900,Loop=true,Pitch=1,Volume=4}
  76. Sounds['NeflCrystals'] = {Id=340106355,Loop=true,Pitch=1,Volume=4}
  77. Sounds['EvilMortyRemix'] = {Id=1057401232,Loop=true,Pitch=1,Volume=10}
  78. Sounds['SayoFuckYouDan-Nara'] = {Id=1205183071,Loop=true,Pitch=1,Volume=1}
  79.  
  80.  
  81. -- Functions
  82. local NewInstance = function(instance,parent,properties)
  83. local inst = Instance.new(instance,parent)
  84. if(properties)then
  85. for i,v in next, properties do
  86. pcall(function() inst[i] = v end)
  87. end
  88. end
  89. return inst;
  90. end
  91.  
  92. function clerp(a, b, t)
  93. local qa = {
  94. QuaternionFromCFrame(a)
  95. }
  96. local qb = {
  97. QuaternionFromCFrame(b)
  98. }
  99. local ax, ay, az = a.x, a.y, a.z
  100. local bx, by, bz = b.x, b.y, b.z
  101. local _t = 1 - t
  102. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  103. end
  104. function QuaternionFromCFrame(cf)
  105. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  106. local trace = m00 + m11 + m22
  107. if trace > 0 then
  108. local s = math.sqrt(1 + trace)
  109. local recip = 0.5 / s
  110. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  111. else
  112. local i = 0
  113. if m00 < m11 then
  114. i = 1
  115. end
  116. if m22 > (i == 0 and m00 or m11) then
  117. i = 2
  118. end
  119. if i == 0 then
  120. local s = math.sqrt(m00 - m11 - m22 + 1)
  121. local recip = 0.5 / s
  122. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  123. elseif i == 1 then
  124. local s = math.sqrt(m11 - m22 - m00 + 1)
  125. local recip = 0.5 / s
  126. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  127. elseif i == 2 then
  128. local s = math.sqrt(m22 - m00 - m11 + 1)
  129. local recip = 0.5 / s
  130. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  131. end
  132. end
  133. end
  134. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  135. local xs, ys, zs = x + x, y + y, z + z
  136. local wx, wy, wz = w * xs, w * ys, w * zs
  137. local xx = x * xs
  138. local xy = x * ys
  139. local xz = x * zs
  140. local yy = y * ys
  141. local yz = y * zs
  142. local zz = z * zs
  143. return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  144. end
  145. function QuaternionSlerp(a, b, t)
  146. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  147. local startInterp, finishInterp
  148. if cosTheta >= 1.0E-4 then
  149. if 1 - cosTheta > 1.0E-4 then
  150. local theta = math.acos(cosTheta)
  151. local invSinTheta = 1 / math.sin(theta)
  152. startInterp = math.sin((1 - t) * theta) * invSinTheta
  153. finishInterp = math.sin(t * theta) * invSinTheta
  154. else
  155. startInterp = 1 - t
  156. finishInterp = t
  157. end
  158. elseif 1 + cosTheta > 1.0E-4 then
  159. local theta = math.acos(-cosTheta)
  160. local invSinTheta = 1 / math.sin(theta)
  161. startInterp = math.sin((t - 1) * theta) * invSinTheta
  162. finishInterp = math.sin(t * theta) * invSinTheta
  163. else
  164. startInterp = t - 1
  165. finishInterp = t
  166. end
  167. return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
  168. end
  169.  
  170. local sndFromData = function(data,parent)
  171. if(typeof(data) == 'table')then
  172. local snd = NewInstance("Sound",parent or char,{SoundId = "rbxassetid://"..data.Id,Looped=data.Loop or false,Pitch = data.Pitch or 1,Volume = data.Volume or 1})
  173. return snd;
  174. else
  175. return error('Argument passed into sndFromData must be a table!',1)
  176. end
  177. end
  178.  
  179. function UnbindLoops()
  180. pcall(RunS.UnbindFromRenderStep,RunS,"N_Effects")
  181. pcall(RunS.UnbindFromRenderStep,RunS,"N_Animations")
  182. end;
  183.  
  184. UnbindLoops() -- Just so if the loops already exist from previously running a script using this template, there's no errors
  185.  
  186. function ragdoll()
  187. char.Archivable = true
  188. local clone = owner.Character:Clone()
  189. clone.Parent = workspace
  190. for i,v in pairs(clone:GetChildren()) do
  191. if v.ClassName == "Script" or v.ClassName == "LocalScript" then
  192. v:destroy()
  193. end
  194. for i,p in pairs(v:GetChildren()) do
  195. if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then
  196. p:destroy()
  197. end
  198. end
  199. end
  200. local leftarm = clone:findFirstChild("Left Arm")
  201. local rightrm = clone:findFirstChild("Right Arm")
  202. local leftleg = clone:findFirstChild("Left Leg")
  203. local rightleg = clone:findFirstChild("Right Leg")
  204. local head = clone:findFirstChild("Head")
  205. char:Destroy()
  206. workspace.CurrentCamera.CameraSubject = head
  207. if head then
  208. local attachment = Instance.new("Attachment", clone.Head)
  209. attachment.Position = Vector3.new(0, -0.5, 0)
  210. attachment.Name = "lol"
  211. attachment.Visible = false
  212. clone.Torso.NeckAttachment.Visible = false
  213. clone.Torso.NeckAttachment.Position = clone.Torso.NeckAttachment.Position + Vector3.new(0,0,0)
  214. local ball = Instance.new("BallSocketConstraint", clone)
  215. ball.Attachment0 = clone.Torso.NeckAttachment
  216. ball.Attachment1 = attachment
  217. ball.LimitsEnabled = true
  218. ball.TwistLimitsEnabled = true
  219. ball.UpperAngle = 90
  220. ball.Restitution = 0.5
  221. ball.TwistUpperAngle = 90
  222. ball.TwistLowerAngle = -90
  223. local collidepartofleftleg = Instance.new("Part", clone.Torso)
  224. collidepartofleftleg.Name = "Bone"
  225. collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
  226. collidepartofleftleg.Transparency = 1
  227. collidepartofleftleg:BreakJoints()
  228. local weeld = Instance.new("Weld", collidepartofleftleg)
  229. weeld.Part0 = collidepartofleftleg
  230. weeld.Part1 = clone["Head"]
  231. end
  232. if leftleg ~= nil then
  233. local glue = Instance.new("Glue", clone.Torso)
  234. glue.Part0 = clone.Torso
  235. glue.Part1 = leftleg
  236. glue.Name = "Left leg"
  237. local collider = Instance.new("Part", leftleg)
  238. collider.Position = Vector3.new(0,999,0)
  239. collider.Size = Vector3.new(1.5, 1, 1)
  240. collider.Shape = "Cylinder"
  241. local weld = Instance.new("Weld", collider)
  242. weld.Part0 = leftleg
  243. weld.Part1 = collider
  244. weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  245. collider.TopSurface = "Smooth"
  246. collider.BottomSurface = "Smooth"
  247. collider.formFactor = "Symmetric"
  248. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  249. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  250. collider.Transparency = 1
  251. end
  252. ------------
  253. if rightleg ~= nil then
  254. local glue1 = Instance.new("Glue", clone.Torso)
  255. glue1.Part0 = clone.Torso
  256. glue1.Part1 = rightleg
  257. glue1.Name = "Right leg"
  258. local collider1 = Instance.new("Part", rightleg)
  259. collider1.Position = Vector3.new(0,999,0)
  260. collider1.Size = Vector3.new(1.5, 1, 1)
  261. collider1.Shape = "Cylinder"
  262. local weld1 = Instance.new("Weld", collider1)
  263. weld1.Part0 = rightleg
  264. weld1.Part1 = collider1
  265. weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  266. collider1.TopSurface = "Smooth"
  267. collider1.BottomSurface = "Smooth"
  268. collider1.formFactor = "Symmetric"
  269. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  270. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  271. collider1.Transparency = 1
  272. end
  273. ------------
  274. if rightrm ~= nil then
  275. local glue11 = Instance.new("Glue", clone.Torso)
  276. glue11.Part0 = clone.Torso
  277. glue11.Part1 = rightrm
  278. glue11.Name = "Right shoulder"
  279. local collider11 = Instance.new("Part", rightrm)
  280. collider11.Position = Vector3.new(0,9999,0)
  281. collider11.Size = Vector3.new(1.5,1,1)
  282. collider11.Shape = "Cylinder"
  283. local weld11 = Instance.new("Weld", collider11)
  284. weld11.Part0 = rightrm
  285. weld11.Part1 = collider11
  286. weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  287. collider11.TopSurface = "Smooth"
  288. collider11.BottomSurface = "Smooth"
  289. collider11.formFactor = "Symmetric"
  290. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  291. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  292. collider11.Transparency = 1
  293. end
  294. ------------
  295. if leftarm ~= nil then
  296. local glue111 = Instance.new("Glue", clone.Torso)
  297. glue111.Part0 = clone.Torso
  298. glue111.Part1 = leftarm
  299. glue111.Name = "Left shoulder"
  300. local collider111 = Instance.new("Part", leftarm)
  301. collider111.Position = Vector3.new(0,9999,0)
  302. collider111.Size = Vector3.new(1.5,1,1)
  303. collider111.Shape = "Cylinder"
  304. local weld111 = Instance.new("Weld", collider111)
  305. weld111.Part0 = leftarm
  306. weld111.Part1 = collider111
  307. weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  308. collider111.TopSurface = "Smooth"
  309. collider111.BottomSurface = "Smooth"
  310. collider111.formFactor = "Symmetric"
  311. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  312. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  313. collider111.Transparency = 1
  314. ----------------
  315. end
  316.  
  317. wait(0.5)
  318. coroutine.resume(coroutine.create(function()
  319. while wait() do
  320. clone.Head.CanCollide = false
  321. game:GetService("RunService").Stepped:wait()
  322. end
  323. end))
  324. return clone
  325. end
  326.  
  327.  
  328. -- Build
  329.  
  330. New = function(Object, Parent, Name, Data)
  331. local Object = Instance.new(Object)
  332. for Index, Value in pairs(Data or {}) do
  333. Object[Index] = Value
  334. end
  335. Object.Parent = Parent
  336. Object.Name = Name
  337. return Object
  338. end
  339.  
  340. Model = New("Model",workspace,"Model",{})
  341. ring = New("Part",Model,"ring",{CanCollide=false,BrickColor = BrickColor.new("Brick yellow"),Elasticity = 0,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(1, 1, 1),CFrame = CFrame.new(-72.0287933, 6.52005148, 33.66502, -0.0191105176, -0.965736747, 0.258819014, -0.246841118, -0.246295646, -0.937234163, 0.96886754, -0.0817982107, -0.233676717),Anchored = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.843137, 0.772549, 0.603922),})
  342. Mesh = New("SpecialMesh",ring,"Mesh",{MeshId = "http://www.roblox.com/asset/?id=3270017",MeshType = Enum.MeshType.FileMesh,})
  343. roof = New("Part",Model,"roof",{CanCollide=false,BrickColor = BrickColor.new("Reddish brown"),FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(3.83999777, 0.200000256, 3.35999894),CFrame = CFrame.new(-71.9617996, 14.1185007, 33.3817253, 0.999999523, 0.000339658902, 0.000940953556, -0.000311135052, 0.999545336, -0.030149797, -0.000950766378, 0.0301494878, 0.999544978),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.411765, 0.25098, 0.156863),})
  344.  
  345.  
  346. tors.CFrame = tors.CFrame * CFrame.new(0,4,0)
  347. local storedCF = tors.CFrame
  348. roof.CFrame = storedCF * CFrame.new(0,9,0)
  349. ring.CFrame = head.CFrame
  350. local a0 = Instance.new("Attachment",roof)
  351. local a1 = Instance.new("Attachment",ring)
  352.  
  353. local rope = Instance.new("RopeConstraint",roof)
  354. rope.Thickness = 0.1
  355. rope.Color = ring.BrickColor
  356. rope.Attachment0 = a0
  357. rope.Visible = true
  358. rope.Attachment1 = a1
  359. rope.Length = (roof.CFrame.p - ring.CFrame.p).magnitude
  360. wait(.05)
  361. local rag = ragdoll()
  362. plr.Character = rag
  363. Model.Parent = rag
  364. local hw = Instance.new("Weld",rag)
  365. hw.Part0 = rag.Head
  366. hw.Part1 = ring
  367. hw.C1 = CFrame.new(0,0,0.5)*CFrame.Angles(math.rad(90),0,0)
  368.  
  369.  
  370. local Music = sndFromData(Sounds["SayoFuckYouDan-Nara"],rag.Torso)
  371. Music:Play()
  372.  
  373. -- Check State
  374. function CheckState(rPart)
  375. if(rPart.Velocity.y > 1 and hum:GetState() == Enum.HumanoidStateType.Freefall)then
  376. return 'Jump';
  377. elseif(rPart.Velocity.y < -1 and hum:GetState() == Enum.HumanoidStateType.Freefall)then
  378. return 'Fall';
  379. elseif(math.abs(rPart.Velocity.x) > 2 or math.abs(rPart.Velocity.z) > 2 and hum:GetState() ~= Enum.HumanoidStateType.Freefall)then
  380. return 'Walk';
  381. end
  382. return 'Idle';
  383. end
  384.  
  385.  
  386. -- Died event
  387.  
  388. hum.Died:connect(function() -- When the player dies
  389. UnbindLoops() -- Unbind all of the loops used
  390. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement