Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Transition Effect
- local function transitionTo(colorSequence, delay)
- for _, color in ipairs(colorSequence) do
- term.setBackgroundColor(color)
- term.clear()
- sleep(delay)
- end
- end
- -- Intro Transition: Fade to Black
- local function introTransition()
- local colorsToFade = {
- colors.white, colors.lightGray, colors.gray, colors.black
- }
- transitionTo(colorsToFade, 0.1)
- end
- -- Outro Transition: Fade to White
- local function outroTransition()
- local colorsToFade = {
- colors.black, colors.gray, colors.lightGray, colors.white
- }
- transitionTo(colorsToFade, 0.1)
- end
- -- Main Program
- introTransition() -- Smooth transition to blank screen
- os.pullEvent("key") -- Wait for any key press
- outroTransition() -- Smooth transition to white
- sleep(0.3) -- Wait an additional 0.1 seconds after the outro transition
- shell.run("/disk/os/lock") -- Run the lock program
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement