Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- CraftFunctions --
- -- Created by JustDoesGames --
- -- Date of Creation: 8/1/2018 --
- local version = 1.1
- -- Detect is Device has Color --
- if term.isColor() == true then
- print("Color Detected")
- color = true
- else
- print("No Color Detected")
- color = false
- end
- -- faster way of clearing the screen --
- function cls()
- shell.run("clear")
- end
- function colora(rgb)
- -- Checks if computer is coloured or not and replaces color with appropriate one --
- if color == true then
- if rgb == "black" then
- term.setTextColor(colours.black)
- elseif rgb == "white" then
- term.setTextColor(colours.white)
- elseif rgb == "red" then
- term.setTextColor(colours.red)
- elseif rgb == "green" then
- term.setTextColor(colours.green)
- elseif rgb == "blue" then
- term.setTextColor(colours.blue)
- elseif rgb == "orange" then
- term.setTextColor(colours.orange)
- elseif rgb == "purple" then
- term.setTextColor(colours.purple)
- elseif rgb == "yellow" then
- term.setTextColor(colours.yellow)
- elseif rgb == "lime" then
- term.setTextColor(colours.lime)
- elseif rgb == "grey" then
- term.setTextColor(colours.grey)
- end
- else
- if rgb == "black" then
- term.setTextColor(colours.black)
- elseif rgb == "white" then
- term.setTextColor(colours.white)
- elseif rgb == "red" then
- term.setTextColor(colours.red)
- elseif rgb == "green" then
- term.setTextColor(colours.white)
- elseif rgb == "blue" then
- term.setTextColor(colours.grey)
- elseif rgb == "orange" then
- term.setTextColor(colours.grey)
- elseif rgb == "purple" then
- term.setTextColor(colours.grey)
- elseif rgb == "yellow" then
- term.setTextColor(colours.white)
- elseif rgb == "lime" then
- term.setTextColor(colours.white)
- elseif rgb == "grey" then
- term.setTextColor(colours.grey)
- end
- end
- end
- function colorb(rgb)
- -- Checks if computer is coloured or not and replaces color with appropriate one --
- if color == true then
- if rgb == "black" then
- term.setBackgroundColor(colours.black)
- elseif rgb == "white" then
- term.setBackgroundColor(colours.white)
- elseif rgb == "red" then
- term.setBackgroundColor(colours.red)
- elseif rgb == "green" then
- term.setBackgroundColor(colours.green)
- elseif rgb == "blue" then
- term.setBackgroundColor(colours.blue)
- elseif rgb == "orange" then
- term.setBackgroundColor(colours.orange)
- elseif rgb == "purple" then
- term.setBackgroundColor(colours.purple)
- elseif rgb == "yellow" then
- term.setBackgroundColor(colours.yellow)
- elseif rgb == "lime" then
- term.setBackgroundColor(colours.lime)
- elseif rgb == "grey" then
- term.setBackgroundColor(colours.grey)
- end
- else
- if rgb == "black" then
- term.setBackgroundColor(colours.black)
- elseif rgb == "white" then
- term.setBackgroundColor(colours.white)
- elseif rgb == "red" then
- term.setBackgroundColor(colours.red)
- elseif rgb == "green" then
- term.setBackgroundColor(colours.white)
- elseif rgb == "blue" then
- term.setBackgroundColor(colours.grey)
- elseif rgb == "orange" then
- term.setBackgroundColor(colours.grey)
- elseif rgb == "purple" then
- term.setBackgroundColor(colours.grey)
- elseif rgb == "yellow" then
- term.setBackgroundColor(colours.white)
- elseif rgb == "lime" then
- term.setBackgroundColor(colours.white)
- elseif rgb == "grey" then
- term.setBackgroundColor(colours.grey)
- end
- end
- end
- function RN()
- local right = peripheral.getType("right")
- local left = peripheral.getType("left")
- local top = peripheral.getType("top")
- local bottom = peripheral.getType("bottom")
- local back = peripheral.getType("back")
- local front = peripheral.getType("front")
- if right == "modem" then
- rednet.open("right")
- colora("green")
- write("Rednet Found on ")
- colora("red")
- write("Right")
- colora("green")
- print(" Side")
- sleep(1)
- cls()
- elseif left == "modem" then
- rednet.open("left")
- colora("green")
- write("Rednet Found on ")
- colora("red")
- write("Left")
- colora("green")
- print(" Side")
- sleep(1)
- cls()
- elseif top == "modem" then
- rednet.open("top")
- colora("green")
- write("Rednet Found on ")
- colora("red")
- write("Top")
- colora("green")
- print(" Side")
- sleep(1)
- cls()
- elseif bottom == "modem" then
- rednet.open("bottom")
- colora("green")
- write("Rednet Found on ")
- colora("red")
- write("Bottom")
- colora("green")
- print(" Side")
- sleep(1)
- cls()
- elseif back == "modem" then
- rednet.open("back")
- colora("green")
- write("Rednet Found on ")
- colora("red")
- write("Back")
- colora("green")
- print(" Side")
- sleep(1)
- cls()
- elseif front == "modem" then
- rednet.open("front")
- colora("green")
- write("Rednet Found on ")
- colora("red")
- write("Front")
- colora("green")
- print(" Side")
- sleep(1)
- cls()
- else
- error("Rednet: Could not locate Rednet on a Side")
- end
- end
- a = 1
- -- Splash Screen --
- while true do
- colorb("black")
- cls()
- colora("yellow")
- write("Powered by ")
- colora("white")
- print("CraftFunctions.")
- colora("yellow")
- write("Created by ")
- colora("white")
- print("JustDoesGames.")
- colora("purple")
- print("version", version)
- colorb("white")
- if a == 1 then
- print(" ")
- elseif a == 2 then
- print(" ")
- elseif a == 3 then
- print(" ")
- elseif a == 4 then
- print(" ")
- elseif a == 5 then
- print(" ")
- elseif a == 6 then
- print(" ")
- elseif a == 7 then
- print(" ")
- elseif a == 8 then
- print(" ")
- elseif a == 9 then
- print(" ")
- elseif a == 10 then
- print(" ")
- elseif a == 11 then
- print(" ")
- elseif a == 12 then
- print(" ")
- elseif a == 13 then
- print(" ")
- elseif a == 14 then
- print(" ")
- elseif a == 15 then
- print(" ")
- elseif a == 16 then
- print(" ")
- elseif a == 17 then
- print(" ")
- elseif a == 18 then
- print(" ")
- elseif a == 19 then
- print(" ")
- elseif a == 20 then
- print(" ")
- elseif a == 21 then
- print(" ")
- elseif a == 22 then
- print(" ")
- elseif a == 23 then
- print(" ")
- elseif a == 24 then
- print(" ")
- elseif a == 25 then
- print(" ")
- elseif a == 26 then
- print(" ")
- elseif a == 27 then
- print(" ")
- sleep(.5)
- term.setCursorPos(27,3)
- print(" ")
- sleep(.5)
- term.setCursorPos(27,2)
- print(" ")
- sleep(.5)
- term.setCursorPos(27,1)
- print(" ")
- sleep(1.5)
- colorb("black")
- cls()
- break
- end
- sleep(.05)
- a = a + 1
- end
Advertisement
Add Comment
Please, Sign In to add comment