Advertisement
kirkarr

Untitled

Mar 24th, 2024 (edited)
778
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. local ofx, ofy = 132, 75
  2. local sx, sy = 71, 35
  3. local x, y = 0, 0
  4. local last = 0
  5. hook.Add("Tick","fill",function ()
  6.     cur = CurTime()
  7.     if cur - last > 0.6 then
  8.         net.Start("pixelbattle")
  9.         net.WriteUInt(ofx + x, 24)
  10.         net.WriteUInt(ofy + y, 24)
  11.         net.WriteUInt(pixelbattle.encode(HSVToColor((x / sx) * 180 + (y / sy) * 180, 1, 1)), 24)
  12.         net.SendToServer()
  13.         last = cur
  14.         x = x + 1
  15.         if x > sx then
  16.             x = 0
  17.             y = y + 1
  18.         end
  19.         if y > sy then
  20.             for i=1, 10 do
  21.                 print("Finished painting")
  22.             end
  23.             error("Ready")
  24.         end
  25.     end
  26. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement