hawoody

SAO Death

Apr 15th, 2018
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. --Converted with ttyyuu12345's model to script plugin v4
  2. function sandbox(var,func)
  3. local env = getfenv(func)
  4. local newenv = setmetatable({},{
  5. __index = function(self,k)
  6. if k=="script" then
  7. return var
  8. else
  9. return env[k]
  10. end
  11. end,
  12. })
  13. setfenv(func,newenv)
  14. return func
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. LocalScript0 = Instance.new("LocalScript")
  19. Sparkles1 = Instance.new("Sparkles")
  20. LocalScript0.Name = "FuncDeath"
  21. LocalScript0.Parent = mas
  22. table.insert(cors,sandbox(LocalScript0,function()
  23. local character = game.Players.LocalPlayer.Character
  24. local player = game.Players.LocalPlayer
  25. local char = game.Players.LocalPlayer.Character
  26.  
  27. game.Players.LocalPlayer.Character.Humanoid.Changed:connect(function(death)
  28. if game.Players.LocalPlayer.Character.Humanoid.Health == 0 then
  29. local i = script.Death:Clone()
  30. local o = script.Death:Clone()
  31. local p = script.Death:Clone()
  32. local a = script.Death:Clone()
  33. local s = script.Death:Clone()
  34. local d = script.Death:Clone()
  35. i.Parent = character.Torso
  36. o.Parent = character:findFirstChild("Right Arm")
  37. p.Parent = character:findFirstChild("Right Leg")
  38. a.Parent = character:FindFirstChild("Left Arm")
  39. s.Parent = character:FindFirstChild("Left Leg")
  40. -- Limbs Disappear
  41. character:findFirstChild("Right Arm").Transparency = 1
  42. character:findFirstChild("Right Leg").Transparency = 1
  43. character:FindFirstChild("Left Arm").Transparency = 1
  44. character:FindFirstChild("Left Leg").Transparency = 1
  45. -- Clothing Disappear
  46. if char:FindFirstChild("Pants") then
  47. char.Pants:Destroy()
  48. if char:FindFirstChild("Shirt") then
  49. char.Shirt:Destroy()
  50. if char:FindFirstChild("Hat") then
  51. char.Hat:Destroy()
  52. if char:FindFirstChild("Hat") then
  53. char.Hat:Destroy()
  54. if char:FindFirstChild("Hat") then
  55. char.Hat:Destroy()
  56. end
  57. end
  58. end
  59. end
  60. end
  61. end
  62. end)
  63. end))
  64. Sparkles1.Name = "Death"
  65. Sparkles1.Parent = LocalScript0
  66. Sparkles1.Color = Color3.new(0.222222, 7.84, 1)
  67. Sparkles1.SparkleColor = Color3.new(0.12549, 0.768628, 1)
  68. Sparkles1.Color = Color3.new(0.222222, 7.84, 1)
  69. for i,v in pairs(mas:GetChildren()) do
  70. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  71. pcall(function() v:MakeJoints() end)
  72. end
  73. mas:Destroy()
  74. for i,v in pairs(cors) do
  75. spawn(function()
  76. pcall(v)
  77. end)
  78. end
Add Comment
Please, Sign In to add comment