Advertisement
astronaut32

rainbow

Nov 17th, 2016
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.76 KB | None | 0 0
  1. plr = game:service'Players'.LocalPlayer
  2. char = plr.Character
  3. mouse = plr:GetMouse()
  4. humanoid = char:findFirstChild("Humanoid")
  5. torso = char:findFirstChild("Torso")
  6. head = char.Head
  7. ra = char:findFirstChild("Right Arm")
  8. la = char:findFirstChild("Left Arm")
  9. rl = char:findFirstChild("Right Leg")
  10. ll = char:findFirstChild("Left Leg")
  11. rs = torso:findFirstChild("Right Shoulder")
  12. ls = torso:findFirstChild("Left Shoulder")
  13. rh = torso:findFirstChild("Right Hip")
  14. lh = torso:findFirstChild("Left Hip")
  15. neck = torso:findFirstChild("Neck")
  16. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  17. anim = char:findFirstChild("Animate")
  18. rootpart = char:findFirstChild("HumanoidRootPart")
  19. camera = workspace.CurrentCamera
  20. emitter = Instance.new("ParticleEmitter",torso)
  21.  
  22.  
  23.  
  24. local colors = {"Really red","New yeller","Deep orange","Lime green","Really blue","Dark indigo","Plum"}
  25.  
  26. local red = Color3.new(255,0,0)
  27.  
  28. local orange = Color3.new(255,85,0)
  29.  
  30. local yellow = Color3.new(255,255,0)
  31.  
  32. local green = Color3.new(0,255,0)
  33.  
  34. local blue = Color3.new(0,0,255)
  35.  
  36. local indigo = Color3.new(170,0,255)
  37.  
  38. local violet = Color3.new(80,0,127)
  39.  
  40. emitter.EmissionDirection = "Top"
  41.  
  42. local lifetime = emitter.Lifetime
  43.  
  44. emitter.Color = ColorSequence.new(red,orange,yellow,green,blue,indigo,violet)repeat until humanoid.Died
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55. humanoid.Died:connect(function()
  56. for cframe_parts = 0, 100 do
  57. local p = Instance.new("Part")
  58. p.FormFactor = "Custom"
  59. p.BrickColor = BrickColor.new(colors[math.random(1, #colors)])
  60. p.Size = Vector3.new(1, 1, 1)
  61. Instance.new("BlockMesh", p).Scale = Vector3.new(0.05, 0.05, 0.05)
  62. p.Locked = true
  63. p.CanCollide = false
  64. p.Anchored = true
  65. p.CFrame = torso.CFrame * CFrame.Angles(math.random(-36, 36),math.random(-36, 36),math.random(-36, 36))
  66. p.Parent = workspace
  67. game:service'Debris':AddItem(p, 5)
  68. coroutine.wrap(function()
  69. while wait() do
  70. if p ~= nil then
  71. p.CFrame = p.CFrame * CFrame.new(0, 0.085, 0)
  72. p.Mesh.Scale = p.Mesh.Scale - Vector3.new(0.005, 0, 0.005) + Vector3.new(0, 0.01, 0)
  73. p.Transparency = p.Transparency + 0.015
  74. else
  75. break
  76. end
  77. end
  78. end)()
  79. end
  80. for _,v in pairs(char:children()) do
  81. if v:IsA("Part") then
  82. v:Destroy()
  83. end
  84. end
  85.  
  86. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement