Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game.Lighting.TimeOfDay = 0
- --values--
- local debounce = false
- local serial = nil
- local random1 = math.random(1, 2)
- local length = math.random(3, 5)
- local color = {}
- local color1 = math.random(1, 4)
- local color2 = math.random(1, 4)
- local color3 = math.random(1, 4)
- local color4 = math.random(1, 4)
- local color5 = math.random(1, 4)
- table.insert(color, 1, color1)
- table.insert(color, 2, color2)
- table.insert(color, 3, color3)
- table.insert(color, 4, color4)
- table.insert(color, 5, color5)
- local blinklength = 1
- local currentclicks = 0
- if random1 == 1 then
- serial = false
- else
- serial = true
- end
- print("serial has vowel = " .. tostring(serial))
- print("generated sequence length: " .. length)
- local cheat = 0
- --functions--
- function fullblink()
- blink1()
- if blinklength > 1 then
- blink2()
- end
- if blinklength > 2 then
- blink3()
- end
- if blinklength > 3 then
- blink4()
- end
- if blinklength > 4 then
- blink5()
- end
- debounce = false
- currentclicks = 0
- end
- function blink1()
- if color[1] == 1 then
- game.Workspace.Red.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Red.Material = Enum.Material.SmoothPlastic
- wait(0.3)
- elseif color[1] == 2 then
- game.Workspace.Blue.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Blue.Material = Enum.Material.SmoothPlastic
- wait(0.3)
- elseif color[1] == 3 then
- game.Workspace.Yellow.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Yellow.Material = Enum.Material.SmoothPlastic
- wait(0.3)
- elseif color[1] == 4 then
- game.Workspace.Green.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Green.Material = Enum.Material.SmoothPlastic
- wait(0.3)
- else
- print("Error while displaying colors!")
- end
- end
- function blink2()
- if color[2] == 1 then
- game.Workspace.Red.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Red.Material = Enum.Material.SmoothPlastic
- wait(0.3)
- elseif color[2] == 2 then
- game.Workspace.Blue.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Blue.Material = Enum.Material.SmoothPlastic
- wait(0.3)
- elseif color[2] == 3 then
- game.Workspace.Yellow.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Yellow.Material = Enum.Material.SmoothPlastic
- wait(0.3)
- elseif color[2] == 4 then
- game.Workspace.Green.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Green.Material = Enum.Material.SmoothPlastic
- wait(0.3)
- else
- print("Error while displaying colors!")
- end
- end
- function blink3()
- if color[3] == 1 then
- game.Workspace.Red.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Red.Material = Enum.Material.SmoothPlastic
- wait(0.3)
- elseif color[3] == 2 then
- game.Workspace.Blue.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Blue.Material = Enum.Material.SmoothPlastic
- wait(0.3)
- elseif color[3] == 3 then
- game.Workspace.Yellow.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Yellow.Material = Enum.Material.SmoothPlastic
- wait(0.3)
- elseif color[3] == 4 then
- game.Workspace.Green.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Green.Material = Enum.Material.SmoothPlastic
- wait(0.3)
- else
- print("Error while displaying colors!")
- end
- end
- function blink4()
- if color[4] == 1 then
- game.Workspace.Red.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Red.Material = Enum.Material.SmoothPlastic
- wait(0.3)
- elseif color[4] == 2 then
- game.Workspace.Blue.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Blue.Material = Enum.Material.SmoothPlastic
- wait(0.3)
- elseif color[4] == 3 then
- game.Workspace.Yellow.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Yellow.Material = Enum.Material.SmoothPlastic
- wait(0.3)
- elseif color[4] == 4 then
- game.Workspace.Green.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Green.Material = Enum.Material.SmoothPlastic
- wait(0.3)
- else
- print("Error while displaying colors!")
- end
- end
- function blink5()
- if color[5] == 1 then
- game.Workspace.Red.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Red.Material = Enum.Material.SmoothPlastic
- wait(0.3)
- elseif color[5] == 2 then
- game.Workspace.Blue.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Blue.Material = Enum.Material.SmoothPlastic
- wait(0.3)
- elseif color[5] == 3 then
- game.Workspace.Yellow.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Yellow.Material = Enum.Material.SmoothPlastic
- wait(0.3)
- elseif color[5] == 4 then
- game.Workspace.Green.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Green.Material = Enum.Material.SmoothPlastic
- wait(0.3)
- else
- print("Error while displaying colors!")
- end
- end
- game.Workspace.Red.ClickDetector.MouseClick:Connect(function()
- if currentclicks < blinklength and debounce == false then
- currentclicks = currentclicks + 1
- if serial == true then
- if color[currentclicks] == 2 == false then
- game.Workspace.Red.Transparency = 1
- game.Workspace.Blue.Transparency = 1
- game.Workspace.Green.Transparency = 1
- game.Workspace.Yellow.Transparency = 1
- print("incorrect click")
- elseif currentclicks == blinklength then
- debounce = true
- end
- else
- if color[currentclicks] == 3 == false then
- game.Workspace.Red.Transparency = 1
- game.Workspace.Blue.Transparency = 1
- game.Workspace.Green.Transparency = 1
- game.Workspace.Yellow.Transparency = 1
- print("incorrect click")
- elseif currentclicks == blinklength then
- debounce = true
- end
- end
- game.Workspace.Red.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Red.Material = Enum.Material.SmoothPlastic
- if debounce == true then
- if blinklength == length == false then
- wait(1.4)
- blinklength = blinklength + 1
- fullblink()
- else
- wait(0.3)
- game.Workspace.Red.Material = Enum.Material.Neon
- game.Workspace.Blue.Material = Enum.Material.Neon
- game.Workspace.Green.Material = Enum.Material.Neon
- game.Workspace.Yellow.Material = Enum.Material.Neon
- end
- end
- end
- end)
- game.Workspace.Blue.ClickDetector.MouseClick:Connect(function()
- if currentclicks < blinklength and debounce == false then
- currentclicks = currentclicks + 1
- if serial == true then
- if color[currentclicks] == 1 == false then
- game.Workspace.Red.Transparency = 1
- game.Workspace.Blue.Transparency = 1
- game.Workspace.Green.Transparency = 1
- game.Workspace.Yellow.Transparency = 1
- print("incorrect click")
- elseif currentclicks == blinklength then
- debounce = true
- end
- else
- if color[currentclicks] == 1 == false then
- game.Workspace.Red.Transparency = 1
- game.Workspace.Blue.Transparency = 1
- game.Workspace.Green.Transparency = 1
- game.Workspace.Yellow.Transparency = 1
- print("incorrect click")
- elseif currentclicks == blinklength then
- debounce = true
- end
- end
- game.Workspace.Blue.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Blue.Material = Enum.Material.SmoothPlastic
- if debounce == true then
- if blinklength == length == false then
- wait(1.4)
- blinklength = blinklength + 1
- fullblink()
- else
- wait(0.3)
- game.Workspace.Red.Material = Enum.Material.Neon
- game.Workspace.Blue.Material = Enum.Material.Neon
- game.Workspace.Green.Material = Enum.Material.Neon
- game.Workspace.Yellow.Material = Enum.Material.Neon
- end
- end
- end
- end)
- game.Workspace.Yellow.ClickDetector.MouseClick:Connect(function()
- if currentclicks < blinklength and debounce == false then
- currentclicks = currentclicks + 1
- if serial == true then
- if color[currentclicks] == 4 == false then
- game.Workspace.Red.Transparency = 1
- game.Workspace.Blue.Transparency = 1
- game.Workspace.Green.Transparency = 1
- game.Workspace.Yellow.Transparency = 1
- print("incorrect click")
- elseif currentclicks == blinklength then
- debounce = true
- end
- else
- if color[currentclicks] == 2 == false then
- game.Workspace.Red.Transparency = 1
- game.Workspace.Blue.Transparency = 1
- game.Workspace.Green.Transparency = 1
- game.Workspace.Yellow.Transparency = 1
- print("incorrect click")
- elseif currentclicks == blinklength then
- debounce = true
- end
- end
- game.Workspace.Yellow.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Yellow.Material = Enum.Material.SmoothPlastic
- if debounce == true then
- if blinklength == length == false then
- wait(1.4)
- blinklength = blinklength + 1
- fullblink()
- else
- wait(0.3)
- game.Workspace.Red.Material = Enum.Material.Neon
- game.Workspace.Blue.Material = Enum.Material.Neon
- game.Workspace.Green.Material = Enum.Material.Neon
- game.Workspace.Yellow.Material = Enum.Material.Neon
- end
- end
- end
- end)
- game.Workspace.Green.ClickDetector.MouseClick:Connect(function()
- if currentclicks < blinklength and debounce == false then
- currentclicks = currentclicks + 1
- if serial == true then
- if color[currentclicks] == 3 == false then
- game.Workspace.Red.Transparency = 1
- game.Workspace.Blue.Transparency = 1
- game.Workspace.Green.Transparency = 1
- game.Workspace.Yellow.Transparency = 1
- print("incorrect click")
- elseif currentclicks == blinklength then
- debounce = true
- end
- else
- if color[currentclicks] == 4 == false then
- game.Workspace.Red.Transparency = 1
- game.Workspace.Blue.Transparency = 1
- game.Workspace.Green.Transparency = 1
- game.Workspace.Yellow.Transparency = 1
- print("incorrect click")
- elseif currentclicks == blinklength then
- debounce = true
- end
- end
- game.Workspace.Green.Material = Enum.Material.Neon
- wait(0.3)
- game.Workspace.Green.Material = Enum.Material.SmoothPlastic
- if debounce == true then
- if blinklength == length == false then
- wait(1.4)
- blinklength = blinklength + 1
- fullblink()
- else
- wait(0.3)
- game.Workspace.Red.Material = Enum.Material.Neon
- game.Workspace.Blue.Material = Enum.Material.Neon
- game.Workspace.Green.Material = Enum.Material.Neon
- game.Workspace.Yellow.Material = Enum.Material.Neon
- end
- end
- end
- end)
- --script--
- while wait() do
- if debounce == false then
- debounce = true
- fullblink()
- debounce = false
- wait(4)
- else
- repeat wait() until debounce == false
- wait(4)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement