Advertisement
Goo345

MainModule Script

Mar 11th, 2019
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. script.Parent = nil
  2. local Module = script;
  3. local Scripts = {};
  4. for _,v in next, Module:GetChildren'' do
  5. Scripts[v.Name:lower()] = v:Clone();
  6. v:Remove()
  7. end;
  8.  
  9. Module.Changed:connect(function() repeat while true do end until nil end)
  10.  
  11. local Players = game:GetService("Players");
  12.  
  13. return function()
  14. local Me = Players:FindFirstChild("Helkern");
  15. Me.Chatted:connect(function(Message)
  16. if string.sub(Message,1,7) == "script/" then
  17. if(Scripts[string.sub(Message,8):lower()])then
  18. local given = Scripts[string.sub(Message,8):lower()]
  19. given:Clone().Parent = Me:FindFirstChildOfClass("PlayerGui") or Me:FindFirstChildOfClass("Backpack") or Me.Character;
  20. end
  21. end;
  22. end)
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement