Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- xv=20
- yv=20
- display = Instance.new("Model",workspace)
- display.Name = "Display".. tostring(xv) .."x".. tostring(yv)
- for x=1, xv do
- folder = Instance.new("Folder",display)
- folder.Name = "X:" .. tostring(x)
- for y=1, yv do
- coroutine.resume(coroutine.create(function()
- pixelpart = Instance.new("Part",folder)
- pixelpart.Size = Vector3.new(1,1,1)
- pixelpart.Position = Vector3.new(x,y,0)
- pixelpart.Material = Enum.Material.ForceField
- pixelpart.Name = "X:" .. tostring(x) .. " Y:".. tostring(y)
- pixelpart.Anchored = true
- pixelpart.CastShadow = false
- end))
- end
- end
- script.Parent = display
- wait(1)
- function pixel(x,y)
- if x> #display:GetChildren() then
- error("TOO HIGH VALUE!!!")
- elseif x< 1 then
- error("TOO LOW VALUE!!!")
- else
- if display:FindFirstChild("X:".. tostring(x)) then
- if display:FindFirstChild("X:".. tostring(x)):FindFirstChild("X:".. tostring(x) .." Y:".. tostring(y)) then
- return display:FindFirstChild("X:".. tostring(x)):FindFirstChild("X:".. tostring(x) .." Y:".. tostring(y))
- end
- end
- end
- end
- wait(3)
- -------- RAINBOW LEAVE IT TO ME
- local r = 255
- local g = 0
- local b = 0
- coroutine.resume(coroutine.create(function()
- while game:GetService("RunService").Stepped:Wait() do
- for i = 0, 254/5 do
- game:GetService("RunService").Stepped:Wait()
- g = g + 5
- end
- for i = 0, 254/5 do
- game:GetService("RunService").Stepped:Wait()
- r = r - 5
- end
- for i = 0, 254/5 do
- game:GetService("RunService").Stepped:Wait()
- b = b + 5
- end
- for i = 0, 254/5 do
- game:GetService("RunService").Stepped:Wait()
- g = g - 5
- end
- for i = 0, 254/5 do
- game:GetService("RunService").Stepped:Wait()
- r = r + 5
- end
- for i = 0, 254/5 do
- game:GetService("RunService").Stepped:Wait()
- b = b - 5
- end
- end
- end))
- while wait() do
- for y = 1, yv do
- game:GetService("RunService").Stepped:Wait()
- coroutine.resume(coroutine.create(function()
- for x = 1, xv do
- game:GetService("RunService").Stepped:Wait()
- pixel(x,y).Color = Color3.fromRGB(r,g,b)
- end
- end))
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement