Community Curator/Source/TSWRes Story

local StoryRes = {}

StoryRes.SavedFile = {} StoryRes.StoryProg = 0

function StoryRes.LoadFile local SavedFile = StoryRes.SavedFile if not FS.exists("LBPStorySave.data") then return true, "No file found" end local FileHandle = io.open("LBPStorySave.data") if not FileHandle then return false, "Story Progress is unreadable" end SavedFile["MainLvls"] = FileHandle:read or 0 SavedFile["Save"] = FileHandle:read StoryRes.StoryProg = FileHandle:read or 0 FileHandle:close return true end

function StoryRes.Menu if StoryRes.StoryProg == 0 then Intro = require "TSWRes Intro" Intro.IntroCut end for i=1, math.huge do     draw.beginframe Draw.BGs.StoryMainMenu draw.endframe TX, TY = draw.waittouch local BackTap = TRec(24, SizeY - 64, 128, SizeY - 24, TX, TY) if BackTap then return end end end

return StoryRes