Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Made by Esbenmine
- SleepTime = .2
- Start1 = true
- Start2 = true
- Start3 = true
- Start = true
- term.clear()
- term.setCursorPos(1,1)
- MW, MH = term.getSize()
- FH = 10
- FW = 12
- Enter = function()
- repeat
- local event, key = os.pullEvent("key")
- if key == keys.space then
- if Start1 then
- Start1 = false
- else
- if Start2 then
- Start2 = false
- else
- if Start3 then
- Start3 = false
- if Color1 == Color2 and Color2 == Color3 then
- print("Yeah")
- elseif Color1 == Color2 or Color2 == Color3 or Color3 == Color1 then
- print("Little Yeah")
- else
- print("Nope")
- end
- sleep(2)
- Start1 = true
- Start2 = true
- Start3 = true
- end
- end
- end
- else
- end
- until Start == false
- end
- RandomColor = function()
- Number = math.random(1,16)
- if Number == 1 then
- Color = colors.white
- elseif Number == 2 then
- Color = colors.orange
- elseif Number == 3 then
- Color = colors.magenta
- elseif Number == 4 then
- Color = colors.lightBlue
- elseif Number == 5 then
- Color = colors.yellow
- elseif Number == 6 then
- Color = colors.lime
- elseif Number == 7 then
- Color = colors.pink
- elseif Number == 8 then
- Color = colors.gray
- elseif Number == 9 then
- Color = colors.lightGray
- elseif Number == 10 then
- Color = colors.cyan
- elseif Number == 11 then
- Color = colors.purple
- elseif Number == 12 then
- Color = colors.blue
- elseif Number == 13 then
- Color = colors.brown
- elseif Number == 14 then
- Color = colors.green
- elseif Number == 15 then
- Color = colors.red
- elseif Number == 16 then
- Color = colors.black
- end
- return Color
- end
- DrawF = function(x,y, Color)
- for x1 = 1, FW do
- for y1 = 1, FH do
- term.setBackgroundColor(Color)
- term.setCursorPos((x1+x),(y1+y))
- print(" ")
- end
- end
- end
- Spin1 = function()
- repeat
- if Start1 == false then
- return
- else
- Color1 = RandomColor()
- DrawF((MW/2 - FW/2 - FW - 6),1, Color1)
- end
- sleep(SleepTime)
- until Start1 == false
- end
- Spin2 = function()
- repeat
- if Start2 == false then
- return
- else
- Color2 = RandomColor()
- DrawF((MW/2 - FW/2),1,Color2)
- end
- sleep(SleepTime)
- until Start2 == false
- end
- Spin3 = function()
- repeat
- if Start3 == false then
- return
- else
- Color3 = RandomColor()
- DrawF((MW/2 - FW/2 + FW + 6),1,Color3)
- end
- sleep(SleepTime)
- until Start3 == false
- end
- repeat
- parallel.waitForAll(Enter, Spin1, Spin2, Spin3)
- until Start == false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement