Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wait(3)
- local resX = 800
- local resY = 600
- local cameraCF = CFrame.new(-81.0621338, 2.4502182, -25.3679562, -0.658071518, -0.103256181, -0.745841801, -0, 0.990552425, -0.137134522, 0.752955437, -0.090244323, -0.651854336)
- local inputs = require(game.ReplicatedStorage.InputFunctions)
- local waitI = 0
- local frames = {}
- local lastPixelColor
- local lastPixel
- function renderStuff()
- local camera = workspace.Camera
- camera.CameraType = Enum.CameraType.Scriptable
- camera.CFrame = cameraCF
- for y = 1,resY do
- for x = 1,resX do
- waitI = waitI + 1
- if waitI > 25 then
- game.Players.LocalPlayer.PlayerGui.ScreenGui.TextLabel.Text = "Rendering status:"..x.."/"..y
- game:GetService("RunService").RenderStepped:Wait()
- waitI = 0
- end
- local frame = game.ReplicatedStorage.Frame:Clone()
- local ray = camera:ScreenPointToRay(x, y)
- local actualRay = Ray.new(ray.Origin,ray.Direction * 900)
- local part = workspace:FindPartOnRay(actualRay)
- if part then
- frame.BackgroundColor3 = part.Color
- end
- frame.Position = UDim2.new(0,x,0,y)
- --frame.Parent = game.Players.LocalPlayer.PlayerGui.ScreenGui
- table.insert(frames,frame)
- end
- end
- for i,v in pairs(frames) do
- if lastPixel then
- if lastPixelColor == v.BackgroundColor3 then
- lastPixel.Size = lastPixel.Size + UDim2.new(0,1,0,0)
- end
- end
- waitI = waitI + 1
- if waitI > resX then
- game.Players.LocalPlayer.PlayerGui.ScreenGui.TextLabel.Text = "Rendering status: finishing"
- game:GetService("RunService").RenderStepped:Wait()
- waitI = 0
- end
- lastPixel = v
- lastPixelColor = v.BackgroundColor3
- end
- end
- inputs.BindOnBegan(nil,"E",renderStuff, "aaa",false,"Select aaa")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement