9,mmm,@ʁ$p8dOkO ;]AsVl3?@A *+pqrsP@A./PQ:;zPQ>?$%&'()HKzzzA./n456789HKzz@Q>?~DEFGHIJK﨩PA./TUVWXYZ[︹@Q>?|}}}}}}}}}}}}}}}}}}}}}}PA./@Q>?PA./@Q./P>? >?/"/"""""/"""/""""""""///""""""/""""///"""""""""/DDDD"""///""""/""//DDDD/"/""////"""""/DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""l-- title:Containment 14h Challenge -- author:goldfish2026 -- desc:a survival horror scp fnaf game where you contain your excitement bc there is no monster -- site:crewnerd.tumblr.com -- license:(c) 2026 by goldfish2026 -- version:0.1 -- script:lua t=0 x=96 y=24 -- var controlling menu states -- 0 = title, 1 = help, -- 2 = office, 3=generator 4=gameover menu=0 -- changed for troubleshooting office --var if game is running gameRunning=false --var if game is won/lost victory=false victoryTime=180000 --door isOpen=true --should be true on release --vent monitor/mechanics temp = 12.7 --12.7-40 range isRunning=true --vent defaults to runnin monsterAI=1 --should be 0 on release codeRed = false --false on release --camera mechanics cam = false --true = vent false=hall taser = false --resets A to 0 IF correct 1-ventcam, 5 hallcam timeC=1 --CLICKILL time cookie ck = true --mouse handling starting state function CLICKKILL(timeCookie,frames) if timeCookie == 0 then --if no clickkill condition exists,create one timeCookie = frames*17+time() return true,timeCookie elseif (time() < timeCookie) then return true,timeCookie else timeCookie=0 return false,timeCookie end end --function AITICK(aiVar,difficulty) -- local coin -- if not difficulty then -- coin = math.floor(math.random(1,2)+0.5) -- else -- coin = math.floor(math.random(1,4)+0.5) --end --if aiVar == 0 then --if ai is reset at 0 -- if coin > 1 then -- return 2 --go vent rt -- else -- return 5 --go door -- end -- elseif ((aiVar%4>0 and --LOOK AT THE TIME --end" function TIC() --use to debug var states --trace(menu) if (menu==0) then --title screen gameRunning=false victory=false cls(15) if (key(48)) then menu=1 end --draw body sprite in corner, scaled -- spr(354,0,0,colokey, scale, flip, rotate, w, h) spr(354,0,0,-1,4,0,0,2,4) --title in red local string="CONTAINMENT" local width=print(string, 0,-6) print(string,(240-width)//2,(50)//2,2) print("PRESS SPACE TO BEGIN",90,68,12) print("HOW TO PLAY",90,88,12) --MAIN GAME--------------------------------- elseif menu==1 then if time()>victoryTime then victory=true menu=4 cls(0) end if temp > 40 then menu = 4 end --basic loss condition, v jank cls(0) gameRunning = true mx,my,lmb = mouse() --debug prints print(time()) print(ck,70,16) print(timeC,70,32) --mouse interaction logic if (lmb) then ck,timeC=CLICKKILL(timeC,10) if not ck then --door control logic if (mx >71 and mx<89 and my>55 and my <73) then isOpen=not isOpen end --vent is running if (mx >103 and mx<137 and my>55 and my <89) then isRunning=not isRunning end --cam switch if (mx >183 and mx<199 and my>87 and my <103) then cam=not cam end end end --doorswitch if isOpen then spr(320,72,56,-1,1,0,0,2,2) else spr(322,72,56,-1,1,0,0,2,2) end --door if isOpen==false then --render door closed local y=24 repeat local x=0 repeat spr(428,x,y,-1,2,0,0,2,2) x=x+16 until x>=32 y=y+32 until y>=136 else --render door open --draw door open shadow local y=32 repeat local x=0 repeat spr(334,x,y,-1,2,0,0,2,2) x=x+16 until x>=32 y=y+32 until y>=136 --draw door teeth spr(460,0,24,-1,1,0,0,2,1) spr(460,16,24,-1,1,0,0,2,1) spr(460,32,24,-1,1,0,0,2,1) --render monster at open door if monsterAI==6 then spr(300,0,39,-1,3,0,0,2,4) end end --draw top of door spr(268,0,8,-1,1,0,0,2,2) spr(268,16,8,-1,1,0,0,2,2) spr(268,32,8,-1,1,0,0,2,2) spr(270,48,8,-1,1,0,0,2,2) local y=24 --draw right door edge repeat spr(302,48,y,-1,1,0,0,2,2) y=y+16 until y>=136 --alaram light spr(362,72,0,-1,2) --lightbulb,lit sprite=363 spr(364,88,0,0,2) spr(364,56,0,0,2,1) --vent if monsterAI == 3 then spr(392,104,0,-1,2,0,0,2,2) else spr(390,104,0,-1,2,0,0,2,2) end --vent monitor spr(260,104,56,-1,1,0,0,8,6) if isRunning==false then spr(256,104,56,-1,1,0,0,4,4) if (time()%1000<=100) then temp = temp+0.1 end elseif (time()%500>250) then spr(260,104,56,-1,1,0,0,4,4) else spr(256,104,56,-1,1,0,0,4,4) if temp>=12.7 then temp = temp-0.1 end end --touchup vent monitor UI (code orange) spr(298,152,56,-1,1,0,0,2,3) -- code red if codeRed==true then spr(266,152,56,-1,1,0,0,2,2)end spr(330,152,80,-1,1,0,0,2,1) --print temperature readout = temp .. "C" print(readout,135,93,12,true) -- should print fixed width -- fire extinguisher spr(366,76,88,-1,2,0,0,1,3) --cam monitor if cam then spr(352,200,48,-1,1,0,0,4,4) --draw vent cam plain if (monsterAI==1) then --monster on ventcam if (time()%500>250) then spr(418,216,48,-1,1,0,0,2,2) else spr(450,216,48,-1,1,0,0,2,2) end end else --FLIP SPRITES FOR DOOR STUFF spr(352,200,48,-1,1,1,0,4,4) --draw vent cam flipped spr(356,200,48,-1,1,1,0,2,4)--draw door patch if monsterAI==5 then --render monste if (time()%500>250) then spr(420,200,64,-1,1,1,0,2,2) else spr(452,200,64,-1,1,1,0,2,2) end end end --cam wires (378,379) spr(378,168,72) spr(379,176,72) spr(379,184,72) spr(379,192,72) spr(378,192,64) --cam buttons --L spr(424,184,88,-1,1,0,0,2,2) circ(191,96,4,2) --R spr(424,208,88,-1,1,0,0,3,2) circ(215,96,4,2) --desk spr(380,96,104,-1,2,0,0,1,3) local x=112 --draw tabletop repeat spr(381,x,104,-1,2) x=x+16 until x==224 spr(380,224,104,-1,2,1,0,1,3) --draw Rleg local x=112--draw shadow repeat spr(413,x,120,-1,2) x=x+16 until x==224 elseif menu==4 then cls() gameRunning = false if victory==true then print("YOU SURVIVED") else print("YOU DIED") print("GAME OVER",0,32) end -- else -- cls(0) -- print("invalid game menu") end if btn(0) then y=y-1 end if btn(1) then y=y+1 end if btn(2) then x=x-1 end if btn(3) then x=x+1 end end