Advertisement
kanewutt

eferferf

May 15th, 2016
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. local user=game.Players.localPlayer;
  2. local part=script.Parent;
  3.  
  4. coroutine.resume(coroutine.create(function()
  5. while wait() do
  6. repeat wait()
  7. part.BrickColor = BrickColor.Random();
  8. until nil
  9. end
  10. end))
  11. local generate=function()
  12. local particle=Instance.new'Part';
  13. particle.Anchored=true;
  14. particle.CFrame=CFrame.new(user.Character.Torso.CFrame.p);
  15. particle.FormFactor='Custom';
  16. particle.Size=Vector3.new(.5,.5,.5);
  17. particle.TopSurface='Smooth';
  18. particle.BrickColor=BrickColor.new(color);
  19. local random=math.random;
  20. local randSet1={random(1,2),random(1,2),random(1,2)};
  21. local randSet2={random(1,5),random(1,5),random(1,5)};
  22. local cf={0,0,0};
  23. for _,v in next,randSet1 do
  24. cf[_]=((v==1 and 1)or -1)*randSet2[_];
  25. end;
  26. particle.Parent=user.Character;
  27. particle.CFrame=particle.CFrame*CFrame.new(cf[1],cf[2],cf[3]);
  28. for i=0,1,0.1 do
  29. particle.Transparency=i;
  30. particle.CFrame=particle.CFrame*CFrame.new(0,0.1,0);
  31. wait'';
  32. end;
  33. particle:remove'';
  34. end;
  35. repeat
  36. coroutine.wrap(generate)();
  37. wait'';
  38. until false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement