Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --By Allymonies
- --Download at lightning.com (Firewolf)
- --Alternate download (Preferably, use the above site though) at api.com(Also a firewolf site)
- function print(text)
- color = 0
- for i = 1, #text do
- c = text:sub(i,i)
- if color ~= 6 then
- color = color +1
- else
- color =1
- end
- if color == 1 then
- term.setTextColor(colors.red)
- elseif color == 2 then
- term.setTextColor(colors.orange)
- elseif color == 3 then
- term.setTextColor(colors.yellow)
- elseif color == 4 then
- term.setTextColor(colors.lime)
- elseif color == 5 then
- term.setTextColor(colors.blue)
- else
- term.setTextColor(colors.purple)
- end
- write(c)
- end
- term.setTextColor(colors.white)
- x,y = term.getCursorPos()
- term.setCursorPos(1,y +1)
- c = nil
- color = nil
- text = nil
- return true
- end
- function slowprint(text, speed)
- color = 0
- if speed then
- timer = speed /20
- else
- timer = 0.05
- end
- for i = 1, #text do
- sleep(timer)
- c = text:sub(i,i)
- if color ~= 6 then
- color = color +1
- else
- color =1
- end
- if color == 1 then
- term.setTextColor(colors.red)
- elseif color == 2 then
- term.setTextColor(colors.orange)
- elseif color == 3 then
- term.setTextColor(colors.yellow)
- elseif color == 4 then
- term.setTextColor(colors.lime)
- elseif color == 5 then
- term.setTextColor(colors.blue)
- else
- term.setTextColor(colors.purple)
- end
- write(c)
- end
- term.setTextColor(colors.white)
- x,y = term.getCursorPos()
- term.setCursorPos(1,y +1)
- c = nil
- color = nil
- text = nil
- speed = nil
- timer = nil
- return true
- end
- function rwrite(text)
- color = 0
- for i = 1, #text do
- c = text:sub(i,i)
- if color ~= 6 then
- color = color +1
- else
- color =1
- end
- if color == 1 then
- term.setTextColor(colors.red)
- elseif color == 2 then
- term.setTextColor(colors.orange)
- elseif color == 3 then
- term.setTextColor(colors.yellow)
- elseif color == 4 then
- term.setTextColor(colors.lime)
- elseif color == 5 then
- term.setTextColor(colors.blue)
- else
- term.setTextColor(colors.purple)
- end
- write(c)
- end
- term.setTextColor(colors.white)
- x,y = term.getCursorPos()
- term.setCursorPos(x+1,y)
- c = nil
- color = nil
- text = nil
- return true
- end
Add Comment
Please, Sign In to add comment