Advertisement
plytalent

something

Jun 13th, 2020
932
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.04 KB | None | 0 0
  1. xv=20
  2. yv=20
  3. display = Instance.new("Model",workspace)
  4. display.Name = "Display".. tostring(xv) .."x".. tostring(yv)
  5. for x=1, xv do
  6.     folder = Instance.new("Folder",display)
  7.     folder.Name = "X:" .. tostring(x)
  8.     for y=1, yv do
  9.         coroutine.resume(coroutine.create(function()
  10.             pixelpart = Instance.new("Part",folder)
  11.             pixelpart.Size = Vector3.new(1,1,1)
  12.             pixelpart.Position = Vector3.new(x,y,0)
  13.             pixelpart.Material = Enum.Material.ForceField
  14.             pixelpart.Name = "X:" .. tostring(x) .. " Y:".. tostring(y)
  15.             pixelpart.Anchored = true
  16.             pixelpart.CastShadow = false
  17.         end))
  18.     end
  19. end
  20. script.Parent = display
  21. wait(1)
  22. function pixel(x,y)
  23.     if x> #display:GetChildren() then
  24.         error("TOO HIGH VALUE!!!")
  25.     elseif x< 1 then
  26.         error("TOO LOW VALUE!!!")
  27.     else
  28.         if display:FindFirstChild("X:".. tostring(x)) then
  29.             if display:FindFirstChild("X:".. tostring(x)):FindFirstChild("X:".. tostring(x) .." Y:".. tostring(y)) then
  30.                 return display:FindFirstChild("X:".. tostring(x)):FindFirstChild("X:".. tostring(x) .." Y:".. tostring(y))
  31.             end
  32.         end
  33.     end
  34. end
  35. wait(3)
  36. -------- RAINBOW LEAVE IT TO ME
  37. local r = 255
  38. local g = 0
  39. local b = 0
  40. coroutine.resume(coroutine.create(function()
  41. while game:GetService("RunService").Stepped:Wait() do
  42.     for i = 0, 254/5 do
  43.         game:GetService("RunService").Stepped:Wait()
  44.         g = g + 5
  45.     end
  46.     for i = 0, 254/5 do
  47.         game:GetService("RunService").Stepped:Wait()
  48.         r = r - 5
  49.     end
  50.     for i = 0, 254/5 do
  51.         game:GetService("RunService").Stepped:Wait()
  52.         b = b + 5
  53.     end
  54.     for i = 0, 254/5 do
  55.         game:GetService("RunService").Stepped:Wait()
  56.         g = g - 5
  57.     end
  58.     for i = 0, 254/5 do
  59.         game:GetService("RunService").Stepped:Wait()
  60.         r = r + 5
  61.     end
  62.     for i = 0, 254/5 do
  63.         game:GetService("RunService").Stepped:Wait()
  64.         b = b - 5
  65.     end
  66. end
  67. end))
  68. while wait() do
  69.     for y = 1, yv do
  70.         game:GetService("RunService").Stepped:Wait()
  71.         coroutine.resume(coroutine.create(function()
  72.             for x = 1, xv do
  73.                 game:GetService("RunService").Stepped:Wait()
  74.                 pixel(x,y).Color = Color3.fromRGB(r,g,b)
  75.             end
  76.         end))
  77.     end
  78. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement