zars15

Roblox library n shiz

Dec 7th, 2014
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.41 KB | None | 0 0
  1. local zGL = require(game.ReplicatedStorage.zGL)
  2. zGL.init()
  3.  
  4. local scene = zGL.newScene()
  5.  
  6. local camera = zGL.newCamera(CFrame.new())
  7.  
  8. local A = Vector3.new(-2, -2, -8)
  9. local B = Vector3.new(-2, -2, -12)
  10. local C = Vector3.new(2, -2, -12)
  11. local D = Vector3.new(2, -2, -8)
  12.  
  13. local E = Vector3.new(-2, 2, -8)
  14. local F = Vector3.new(-2, 2, -12)
  15. local G = Vector3.new(2, 2, -12)
  16. local H = Vector3.new(2, 2, -8)
  17.  
  18.  
  19. scene:insert(zGL.newQuad(A,B,C,D, Color3.new(math.random(), math.random(), math.random())))
  20. scene:insert(zGL.newQuad(E,F,G,H, Color3.new(math.random(), math.random(), math.random())))
  21.  
  22. scene:insert(zGL.newQuad(A,E,H,D, Color3.new(math.random(), math.random(), math.random())))
  23. scene:insert(zGL.newQuad(B,F,G,C, Color3.new(math.random(), math.random(), math.random())))
  24.  
  25. scene:insert(zGL.newQuad(A,B,F,E, Color3.new(math.random(), math.random(), math.random())))
  26. scene:insert(zGL.newQuad(D,C,G,H, Color3.new(math.random(), math.random(), math.random())))
  27.  
  28. local ang = 0
  29. local delta = 0
  30. local lastTick = tick()
  31. wait()
  32.  
  33. while true do
  34.     delta = tick() - lastTick
  35.     lastTick = tick()
  36.     ang = ang + 100*delta
  37.     camera.CFrame = CFrame.new(Vector3.new(math.cos(math.rad(ang))*10, 0, math.sin(math.rad(ang))*10-10), Vector3.new(0, 0, -10))
  38.     zGL.render(scene, camera) -- If you don't pass the camera to render function, it will use roblox camera instead.
  39.     game:GetService("RunService").RenderStepped:wait()
  40. end
Add Comment
Please, Sign In to add comment