Advertisement
Idirina

Colour of the Rainbow

Nov 20th, 2017
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.18 KB | None | 0 0
  1. Colors = {"Really black", "Navy blue", "Really red", "Bright bluish green", "New Yeller", "Royal purple", "Deep orange", "Magenta", "Lime green"}
  2. Player = game:GetService("Players").LocalPlayer
  3. Char = Player.Character
  4. Torso = Char.Torso
  5. Mouse = Player:GetMouse()
  6.  
  7. pcall(function()Char.Platform:Destroy() end)
  8. Main = Instance.new("Model",Char)
  9. Main.Name = "Platform"
  10. script.Parent = Main
  11. Mode = 10
  12. Mode2 = 0
  13. With = 5 -- Must be 5 and larger. Idk why.
  14. Highth = .05
  15. OnColor = 1
  16.  
  17. MainP = Instance.new("Part",Main)
  18. MainP.FormFactor = "Custom"
  19. MainP.Size = Vector3.new(With,Highth,With)
  20. MainP.Material = "Neon"
  21. MainP.BrickColor = BrickColor.new(Colors[OnColor])
  22. MainP.Anchored = true
  23. MainP:BreakJoints()
  24. Instance.new("CylinderMesh",MainP)
  25.  
  26. game:GetService("RunService").Stepped:connect(function()
  27. if Mode == 1 then
  28. if Mode2 == 1 then
  29. Torso.CFrame = Torso.CFrame*CFrame.new(0,-.5,0)
  30. elseif Mode2 == 2 then
  31. Torso.CFrame = Torso.CFrame*CFrame.new(0,.5,0)
  32. end
  33. MainP.CFrame = Torso.CFrame * CFrame.new(0,-3+-.225,0)
  34. elseif Mode == 2 then
  35. MainP.CFrame = Torso.CFrame * CFrame.new(5,5,5)
  36. else
  37. Mode = 1
  38. MainP.CFrame = Torso.CFrame * CFrame.new(0,-3+-.225,0)
  39. end
  40. end)
  41.  
  42. LastPart = MainP
  43. Num = 4
  44. game:GetService("RunService").Stepped:connect(function()
  45. local a = OnColor+1
  46. if #Colors < a then
  47. OnColor = 1
  48. else
  49. OnColor = OnColor+1
  50. end
  51. a = MainP:Clone()
  52. a.Mesh.Scale = Vector3.new(.8,.8,.8)
  53. a.Parent = MainP.Parent
  54. a.BrickColor = BrickColor.new(Colors[OnColor])
  55. a.CanCollide = false
  56. aPOS = a.CFrame
  57. coroutine.wrap(function()
  58. for i = 0,1,1/15 do wait()
  59. a.Transparency = i
  60. end
  61. a:Destroy()
  62. end)()
  63. coroutine.wrap(function()
  64. for i = .8,0,.8/-15 do wait()
  65. a.Mesh.Scale = Vector3.new(i,i-.05,i)
  66. end
  67. end)()
  68. end)
  69. local BHold = false
  70. Mouse.KeyDown:connect(function(Key)
  71. if Key == "c" and Mode == 1 then
  72. BHold = true
  73. repeat wait() Mode2 = 1 until BHold == false
  74. Mode2 = 0
  75. elseif Key == "z" and Mode == 1 then
  76. BHold = true
  77. repeat wait() Mode2 = 2 until BHold == false
  78. Mode2 = 0
  79. elseif Key == "p" then
  80. if Mode == 1 then
  81. Mode = 2
  82. coroutine.wrap(function()
  83. while Mode == 2 do
  84. wait()
  85. if Char:GetModelCFrame().p.y < -10 then
  86. Mode = 1
  87. end
  88. end
  89. end)()
  90. else
  91. Mode = 1
  92. end
  93. end
  94. end)
  95. Mouse.KeyUp:connect(function(Key)
  96. if Key == "c" or Key == "z" then
  97. BHold = false
  98. end
  99. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement