FireBlazer_Scripting

Untitled

Mar 19th, 2017
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. --[[ Script loader by MakerModelLua ]]--
  2.  
  3. local Scripts = {}
  4.  
  5. function LoadScript(Source)
  6. local LocalScript = Instance.new("LocalScript")
  7. LocalScript.Disabled = true
  8. LocalScript.Parent = game.Players.LocalPlayer.Character
  9. table.insert(Scripts, LocalScript)
  10. LocalScript.Name = "Script: "..#Scripts
  11. LocalScript.Source = [==[--[[ LocalScript Loader by MakerModelLua ]] ]==]..Source
  12. wait()
  13. LocalScript.Disabled = false
  14. end
  15.  
  16. game.Players.LocalPlayer.Chatted:connect(function(Message)
  17. if string.sub(string.lower(Message),1,3) == "/e " then
  18. LoadScript(string.sub(Message,4))
  19. elseif string.lower(Message) == "nolocal" then
  20. for _,Script in pairs(Scripts) do
  21. Script.Disabled = true
  22. Script:Destroy()
  23. end
  24. Scripts = {}
  25. end
  26. end)
Add Comment
Please, Sign In to add comment