Advertisement
SebTDZ

Random

Sep 28th, 2019
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.19 KB | None | 0 0
  1. function ranbow(SP)
  2.     local function rgb(RED,GREEN,BLUE)
  3.         local Count = 1 / 255
  4.         --Red Count
  5.         local red = Count * RED
  6.         --Green Count
  7.         local green = Count * GREEN
  8.         --Blue Count
  9.         local blue = Count * BLUE
  10.         --Give Color3
  11.         local FColor = Color3.new(red,green,blue)
  12.         return FColor
  13.     end
  14.     coroutine.resume(coroutine.create(function()
  15.         while true do
  16.             game.TweenService:Create(SP, TweenInfo.new(2,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0), {Color = rgb(0, 255, 0)}):Play()
  17.             wait(2)
  18.             game.TweenService:Create(SP, TweenInfo.new(2,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0), {Color = rgb(0, 0, 255)}):Play()
  19.             wait(2)
  20.             game.TweenService:Create(SP, TweenInfo.new(2,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0), {Color = rgb(255, 0, 0)}):Play()
  21.             wait(2)
  22.         end
  23.     end))
  24. end
  25.  
  26. local Point1 = Vector3.new(-2500,-10,-2500)
  27. local Point2 = Vector3.new(2500,2500,2000)
  28. local Region = Region3.new(Point1,Point2)
  29. for _,Part in pairs(game.Workspace:FindPartsInRegion3(Region,nil,math.huge)) do
  30. ranbow(Part)
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement