From 3ab4be0b679e9db006baac2138e37efd7d98f52f Mon Sep 17 00:00:00 2001 From: filoxenace Date: Mon, 22 Sep 2025 15:39:09 -0400 Subject: [PATCH] Begin main functionality --- .gitignore | 1 + detector.luau | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..598ae79 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.vscode diff --git a/detector.luau b/detector.luau index e69de29..157e24f 100644 --- a/detector.luau +++ b/detector.luau @@ -0,0 +1,24 @@ +local process = require("@lune/process") +local fs = require("@lune/fs") +local roblox = require("@lune/roblox") + +local args = process.args() + +local fileFromArgs: string = fs.readFile(args[1]) + + +function scanForWorkspace(model: Model): boolean + for _index, child in model:GetDescendants() do + if child:IsA("Workspace") then + return true + end + end + return false +end + +function containsWorkspace(fileContents: string): boolean + local instances = roblox.deserializeModel(fileContents) + return scanForWorkspace(instances) +end + +containsWorkspace(fileFromArgs) \ No newline at end of file