Is there any function that allows me to detect any local scripts added to the game that are not by the game itself? Or just in general? My best guess is something to do with getfenv() but I'm not very good at understanding how that works.
getfenv()
has nothing to do with local scripts and everything to do with environment manipulation. Anyway I think you want something with DescendantAdded
so here you go.
In a local script of course
local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer LocalPlayer.DescendantAdded:Connect(function(Descendant) print(Descendant) -- idk do your code here end)
while wait() do m = Instance.new"Message" m.Text = "ScriptingHelpers.org is a HELP site, not a request site!" m.Parent = game.Workspace end