I’m making this plugin and it just randomly made it so it crashes studio when I click the button
local version = "1.0.0"
local tab = plugin:CreateToolbar("Planet Protect "..version)
local button = tab:CreateButton("Scan Game", "", "")
local function scan(thingtoscan, thing)
local value = false
for i = 1, #thingtoscan do
if string.sub(thingtoscan, 1, i) == thing then
value = true
end
end
return value
end
button.Click:Connect(function()
for i,v in pairs(game:GetDescendants()) do
pcall(function()
if v:IsA("LuaSourceContainer") then
local source = v.Source
if scan(source, "SynapseXen%_") or scan(source, "Kiriot") or scan(source, "deobfuscate") or scan(source, "IronBrew") or scan(source, "Luraph") then
warn("Obfuscated Script Alert!")
end
end
end)
end
end)