Advertisement
Guest User

Untitled

a guest
Oct 9th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. wait(3)
  2.  
  3. local resX = 800
  4. local resY = 600
  5.  
  6. 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)
  7. local inputs = require(game.ReplicatedStorage.InputFunctions)
  8.  
  9. local waitI = 0
  10. local frames = {}
  11. local lastPixelColor
  12. local lastPixel
  13.  
  14. function renderStuff()
  15. local camera = workspace.Camera
  16. camera.CameraType = Enum.CameraType.Scriptable
  17. camera.CFrame = cameraCF
  18. for y = 1,resY do
  19. for x = 1,resX do
  20.  
  21. waitI = waitI + 1
  22. if waitI > 25 then
  23. game.Players.LocalPlayer.PlayerGui.ScreenGui.TextLabel.Text = "Rendering status:"..x.."/"..y
  24. game:GetService("RunService").RenderStepped:Wait()
  25. waitI = 0
  26. end
  27.  
  28. local frame = game.ReplicatedStorage.Frame:Clone()
  29. local ray = camera:ScreenPointToRay(x, y)
  30. local actualRay = Ray.new(ray.Origin,ray.Direction * 900)
  31. local part = workspace:FindPartOnRay(actualRay)
  32. if part then
  33. frame.BackgroundColor3 = part.Color
  34. end
  35. frame.Position = UDim2.new(0,x,0,y)
  36. --frame.Parent = game.Players.LocalPlayer.PlayerGui.ScreenGui
  37. table.insert(frames,frame)
  38. end
  39. end
  40. for i,v in pairs(frames) do
  41. if lastPixel then
  42. if lastPixelColor == v.BackgroundColor3 then
  43. lastPixel.Size = lastPixel.Size + UDim2.new(0,1,0,0)
  44. end
  45. end
  46.  
  47. waitI = waitI + 1
  48. if waitI > resX then
  49. game.Players.LocalPlayer.PlayerGui.ScreenGui.TextLabel.Text = "Rendering status: finishing"
  50. game:GetService("RunService").RenderStepped:Wait()
  51. waitI = 0
  52. end
  53.  
  54. lastPixel = v
  55. lastPixelColor = v.BackgroundColor3
  56.  
  57. end
  58. end
  59.  
  60. inputs.BindOnBegan(nil,"E",renderStuff, "aaa",false,"Select aaa")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement