-- Power
local UsingPower = false
local PowerConsumption = 0
local LeftoverPower = 100

-- Time
local StartTime
local EndTime

-- Doors
local EastDoor -- door boi 
local WestDoor -- door boi pt. 2

local PowerCheck = coroutine.wrap(function(bool)
    if LeftoverPower == 0 then
        bool = true
    else
        bool = false
    end
    
    print("Power status:\nConsumption: " .. PowerConsumption .. "\nCurrent Power: " .. LeftoverPower)
    
    return bool
end)

local EnablePowerOutage = coroutine.wrap(function()
    print("power is out ruh-roh raggy")
end)

local Timer = coroutine.wrap(function()
    
end)

local DoorPower = coroutine.wrap(function()
    while UsingPower do
        if LeftoverPower >= 0 then
            if EastDoor then
                PowerConsumption = PowerConsumption + 1
                LeftoverPower = LeftoverPower - 1
            elseif WestDoor then
                PowerConsumption = PowerConsumption + 1
                LeftoverPower = LeftoverPower - 1
            else
                return
            end
        else
            print("no more power for u stinky")
            break
        end
    end
end)

local DoorLightPower = coroutine.wrap(function()
    print("Door light power pog")
end)

local LightPower = coroutine.wrap(function()
    print("Light power pog")
end)

local BasePower = coroutine.wrap(function()
    print("Base power pog")
end)

local CameraPower = coroutine.wrap(function()
    print("Camera power pog")
end)

local FanPower = coroutine.wrap(function()
    print("Fan power pog")
end)

local MainPower = coroutine.wrap(function()
    if UsingPower == true then
        print("Using power, checking for power percentage (%)\n")
        PowerCheck()
        print("User has enough power, checking base power\n")
        BasePower()
        print("Base power is normal, checking door power\n")
        DoorPower()
        print("Door power is normal, checking door lights\n")
        DoorLightPower()
        print("Door lights are normal, checking fan power\n")
        FanPower()
        print("Fan power is normal, checking camera power\n")
        CameraPower()
    else
        EnablePowerOutage()
    end
end)

MainPower()
print("Power status:\nConsumption: " .. PowerConsumption .. "\nCurrent Power: " .. LeftoverPower)

-- these will be used later

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: