Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rofl = {
- delay = 0.03,
- x = 9,
- y = 7,
- moveRange = 5,
- moveSpeed = 0.1,
- length = 24,
- frame = {
- [1] = {
- "ROFL:ROFL:LOL:",
- " ^",
- " L /----------",
- " O=== []\\",
- " L \\ \\",
- " \\___________]",
- " I I",
- " ----------/",
- },
- [2] = {
- " :LOL:ROFL:ROFL",
- " ^",
- " /----------",
- " LOL== []\\",
- " \\ \\",
- " \\___________]",
- " I I",
- " ----------/",
- },
- }
- }
- local sX,sY = rofl.x,rofl.y
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- term.clear()
- local frameNo = 0
- local clearRofl = function(x,y,tall)
- for a = y, y+tall do
- term.setCursorPos(x,a)
- term.clearLine()
- end
- end
- while true do
- for a = 1, #rofl.frame do
- clearRofl(rofl.x,rofl.y-1,#rofl.frame[a]+2)
- rofl.x = sX + rofl.moveRange * math.sin(frameNo*rofl.moveSpeed)
- rofl.y = sY + rofl.moveRange * math.cos(frameNo*rofl.moveSpeed)
- for b = 1, #rofl.frame[a] do
- term.setCursorPos(rofl.x,rofl.y+(b-1))
- term.write(rofl.frame[a][b])
- end
- frameNo = frameNo + 1
- sleep(rofl.delay)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement