getrunningscripts returns a list of all running scripts in the caller's global state. This includes Script, LocalScript, and ModuleScript instances - excluding CoreScripts by default.
localrunning=game.Players.LocalPlayer.Character:FindFirstChild("Animate")localinactive=Instance.new("LocalScript")-- Not running because no bytecode to runfor_,scriptinpairs(getrunningscripts())doifscript==runningthenprint("Found the running Animate script.")elseifscript==inactivethenprint("This should never print.")print("If this did print, then you have just experienced 1 in a quintillion chance of BITS FLIPPING from radiation. Do you live inside a nuclear reactor?")endend