Advertisement
subaru112g

ded2 fe

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