Advertisement
username123guest

123

Sep 28th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. local LightingLock = true
  2. local Antivirus = {Enabled = true, Names = {"LocalScript"}
  3.  
  4. local WhiteList = {Enabled = false, WhiteListedUsers = {"Player1"}} -- Enabled whitelist only allows people with their names in the table to join the game.
  5.  
  6. -- Do not edit below this point if you do not know what you are doing --
  7.  
  8. local ActiveProtectChest
  9. if not game.ServerStorage:FindFirstChild("Exploit Protection Quarantine V.1") then
  10. ActiveProtectChest = Instance.new("Folder", game.ServerStorage)
  11. ActiveProtectChest.Name = "Exploit Protection Quarantine V.1"
  12. else
  13. ActiveProtectChest = game.ServerStorage:FindFirstChild("Exploit Protection Quarantine V.1")
  14. end
  15.  
  16.  
  17. game.Lighting.ChildAdded:connect(function(Instance)
  18. if LightingLock then
  19. if Instance.ClassName == "Sky" then
  20. wait()
  21. Instance.Parent = ActiveProtectChest
  22. end
  23. end
  24. end)
  25. local Lighting = game:GetService("Lighting")
  26. local LightingNames = {"Ambient","Brightness","ColorShift_Bottom","ColorShift_Top","GlobalShadows","OutdoorAmbient","Outlines","ShadowColor","GeographicLatitude","TimeOfDay","FogColor","FogEnd","FogStart"}
  27. local LightingProperties = {Lighting.Ambient,Lighting.Brightness,Lighting.ColorShift_Bottom,Lighting.ColorShift_Top,Lighting.GlobalShadows,Lighting.OutdoorAmbient,Lighting.Outlines,Lighting.ShadowColor,Lighting.GeographicLatitude,Lighting.TimeOfDay,Lighting.FogColor,Lighting.FogEnd,Lighting.FogStart}
  28. Lighting.Changed:connect(function()
  29. if LightingLock then
  30. for i,v in pairs(LightingNames) do
  31. Lighting[v] = LightingProperties[i]
  32. end
  33. end
  34. end)
  35.  
  36.  
  37. game.Workspace.DescendantAdded:connect(function(Instance)
  38. if Antivirus.Enabled then
  39. for i, v in pairs (Antivirus.Names) do
  40. if string.lower(Instance.Name) == string.lower(v) then
  41. wait()
  42. Instance.Parent = ActiveProtectChest
  43. end
  44. end
  45. end
  46. end)
  47.  
  48. game.Players.PlayerAdded:connect(function(Player)
  49. if WhiteList.Enabled then
  50. local PlayerAllowed
  51. for i, v in pairs (WhiteList.WhiteListedUsers) do
  52. if Player.Name == v then
  53. PlayerAllowed = true
  54. break
  55. end
  56. end
  57. if not PlayerAllowed then
  58. Player:Kick("You are not whitelisted on this server.")
  59. end
  60. end
  61. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement