AA122294

Anti backdoor

Mar 24th, 2025
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. -- by mate aa122294_0
  2. -- Anti backdoor
  3. local LoadStringModuleCheck = true -- RISK LEVEL IF MADE FALSE: High or Critical
  4. local RuntimeRemoteAddedCheck = true -- RISK LEVEL IF MADE FALSE: Mid or High
  5.  
  6. local IsStudio = game:GetService("RunService"):IsStudio()
  7.  
  8. if not IsStudio then
  9.  
  10. if RuntimeRemoteAddedCheck then
  11. game.DescendantAdded:Connect(function(descendant)
  12. if descendant:IsA("RemoteEvent") or descendant:IsA("RemoteFunction") then
  13. descendant:Destroy()
  14. --[[
  15. It's pretty much impossible to detect
  16. if a selected remote is a chat remote
  17. since people can just fake a chat rem
  18. ote.
  19.  
  20. It doesn't matter though because chat
  21. remotes can't be destroyed, you'll ju
  22. st have to deal with endless warn mes
  23. sages hence why this script will only
  24. work in non studio as to not spam the
  25. output. Feel free to remove the check
  26. but it will make it harder to debug e
  27. rrors.
  28. --]]
  29. end
  30. end)
  31. end
  32.  
  33. if LoadStringModuleCheck then
  34. for _, v in pairs(game:GetDescendants()) do
  35. if v.Name == "Loadstring" and v:IsA("ModuleScript") then
  36. v:Destroy()
  37. end
  38. end
  39.  
  40. game.DescendantAdded:Connect(function(descendant)
  41. if descendant.Name == "Loadstring" and descendant:IsA("ModuleScript") then
  42. descendant:Destroy()
  43. end
  44. end)
  45.  
  46. --[[
  47. I know you can just rename the
  48. loadstring module to whatever,
  49. but I haven't seen anyone do t
  50. hat before.
  51. --]]
  52. end
  53. end
Advertisement
Add Comment
Please, Sign In to add comment