ryghost

Framework

Aug 19th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.06 KB | None | 0 0
  1. if Arsenic then
  2.     print('Existing Arsenic instance, deleting ...')
  3.     Arsenic.Destroy()
  4.     game:service("CoreGui").Arsenic:Destroy()
  5.     return
  6. end
  7.  
  8. getgenv().Arsenic = {}
  9.  
  10. Arsenic.Destroy = function()
  11.     for i,v in next, Arsenic.Events do
  12.         v:Disconnect()
  13.     end
  14.     getgenv().Arsenic = nil
  15. end
  16.  
  17. function Arsenic.Find(list, query)
  18.     for _, Query in next, list do
  19.         if Query.Name:sub(1, query:len()):lower() == query:lower() then
  20.             return Query
  21.         end
  22.     end
  23. end
  24.  
  25. function Arsenic.FindRaw(list, query)
  26.     for Query, _ in next, list do
  27.         if Query:sub(1, query:len()):lower() == query:lower() then
  28.             return Query
  29.         end
  30.     end
  31. end
  32.  
  33. Arsenic.Variables = {
  34.     Prefix = '$',
  35.     Whitelist = false,
  36.     FlySpeed = 50,
  37. }
  38.  
  39. Arsenic.Loops = {
  40.     Glowstick = false,
  41.     Flying = false,
  42.     C4Walk = false,
  43.     VS50Walk = false,
  44.     TM46Walk = false,
  45. }
  46.  
  47. Arsenic.Storage = {
  48.     Bans = {},
  49.     Loopkill = {},
  50.     Whitelisted = {},
  51.     RainbowGuns = {},
  52.     Admins = {},
  53.     Mods = {}
  54. }
  55.  
  56. Arsenic.Data = {}
  57. local function InitializeData(player)
  58.     local slots = player:WaitForChild('playerstats').slots
  59.     Arsenic.Data[player.Name] = {
  60.         Toggles = {
  61.             Spectate = false,
  62.             CombatLog = false,
  63.             Loopkill = false,
  64.             Punish = false,
  65.             Unhumanoid = false,
  66.             ShowFace = true,
  67.             ShowVest = true,
  68.             Sparkles = false,
  69.             Sparkles = false,
  70.             Smoke = false,
  71.             Fire = false,
  72.             Redlight = false,
  73.             Bluelight = false,
  74.             Greenlight = false,
  75.         },
  76.         Inventory = {
  77.             Primary = slots.slotprimary,
  78.             Secondary = slots.slotsecondary,
  79.             Backpack = slots.slotbackpack,
  80.             Slots = (function()
  81.                 local ret = {}
  82.                 for i = 1, 20 do
  83.                     if #slots['slot'..i]:children() > 0 then
  84.                         table.insert(ret, slots['slot'..i])
  85.                     end
  86.                 end
  87.                 return ret
  88.             end)()
  89.         }
  90.     }
  91. end
  92.  
  93. local function Import(link)
  94.     return loadstring(game:HttpGetAsync(link))()
  95. end
  96.  
  97. Arsenic.Environment = Import('https://pastebin.com/raw/ChTrJ2yd')
  98. Arsenic.Functions = Import('https://pastebin.com/raw/zuALe9Yf')
  99. Arsenic.Graphics = Import('https://pastebin.com/raw/4Q9NxR0M')
  100. Arsenic.Commands = Import('https://pastebin.com/raw/CpT1iwNT')
  101.  
  102. function Arsenic.CommandHandler(caller, command, ...)
  103.     local Command = rawget(Arsenic.Commands, command)
  104.     if not Command then
  105.         return 'Invalid command'
  106.     end
  107.  
  108.     local Ran, Output = pcall(Command, caller, unpack{...})
  109.     if Ran and Output then
  110.         return Output
  111.     end
  112.  
  113.     return 'Invalid parameters'
  114. end
  115.  
  116. Arsenic.Events = {}
  117.  
  118. Arsenic.GetRank = function(player)
  119.     if player == Arsenic.Client then
  120.         return 'Root'
  121.     elseif rawget(Arsenic.Storage.Admins, player.Name) then
  122.         return 'Admin'
  123.     elseif rawget(Arsenic.Storage.Mods, player.Name) then
  124.         return 'Mod'
  125.     end
  126.     return 'Normie'
  127. end
  128.  
  129. Arsenic.Events.ChatHook = Arsenic.Remote.Chat.OnClientEvent:Connect(function(pod)
  130.     local Author = pod.Speaker
  131.     local Message = pod.Message
  132.  
  133.     if (Message:sub(1, 1) == ';' and Message:sub(2, 2):match("%a") ) and (Author ~= Arsenic.Client or not Author:IsFriendsWith(Arsenic.Client.UserId) ) then
  134.         Arsenic.Graphics.Write(Author.Name .. ' has been removed from the game, for attempting to use Ventrix-styled commands.')
  135.         Arsenic.Functions.Banishment.Kick(Author)
  136.     end
  137.  
  138.     if Message:sub(1, Arsenic.Variables.Prefix:len()) ~= Arsenic.Variables.Prefix or Arsenic.GetRank(Author) == 'Normie' then
  139.         return
  140.     end
  141.  
  142.     local Vargs = {}
  143.     for Split in (pod.Message:sub(1 + Arsenic.Variables.Prefix:len(), Message:len()) .. ';'):gmatch('(.-);') do
  144.         table.insert(Vargs, Split)
  145.     end
  146.  
  147.     local Result = Arsenic.CommandHandler(Author, rawget(Vargs, 1), unpack((function()
  148.         local Return = {}
  149.         for i = 2, #Vargs do
  150.             table.insert(Return, rawget(Vargs, i))
  151.         end
  152.         return Return
  153.     end)()))
  154.  
  155.     print(Result)
  156. end)
  157.  
  158. Arsenic.Events.Death = Arsenic.Client.Character.Humanoid.Died:Connect(function()
  159.     for i,v in next, Arsenic.Loops do
  160.         v = false
  161.     end
  162. end)
  163.  
  164. local Players = game:service("Players")
  165.  
  166. for i,v in next, Players:GetPlayers() do
  167.     InitializeData(v)
  168. end
  169.  
  170. Arsenic.Events.Joined = Players.PlayerAdded:Connect(function(player)
  171.     local Name = player.Name
  172.     if Arsenic.Storage.Bans[Name] or (Arsenic.Variables.Whitelist and not Arsenic.Storage.Whitelisted[Name]) then
  173.         Arsenic.Functions.Banishment.Kick(player)
  174.         print('Invalid user ' .. Name .. ', attempted to join.')
  175.         return
  176.     end
  177.     InitializeData(player)
  178. end)
  179.  
  180. Arsenic.Events.Left = Players.PlayerRemoving:Connect(function(player)
  181.     Arsenic.Data[player.Name] = nil
  182.     if Arsenic.Storage.Loopkill[player] then
  183.         Arsenic.Storage.Loopkill[player] = nil
  184.     end
  185. end)
  186.  
  187. Arsenic.Events.Submit = Arsenic.Remote.Flyby.OnClientEvent:Connect(function(p, ray)
  188.     local Rep = game:service("ReplicatedStorage")
  189.     if ray.Origin == Rep.GhostCorpse.Corpse.Torso.Position + Vector3.new(10, 10, 10) then
  190.         local Pod = Rep.ArsenicClients.Pod
  191.         Arsenic.Graphics.MessageBox(Pod.Type.Value, Pod.Title.Value, Pod.Message.Value, Pod.Function1.Value, Pod.Function2.Value)
  192.     end
  193. end)
  194.  
  195. spawn(function()
  196.     while wait(10) do
  197.         for i,v in next, Arsenic.Storage.Loopkill do
  198.             Arsenic.Banishment.Kill(i)
  199.         end
  200.     end
  201. end)
  202.  
  203. local RemoveChecks = function(d)
  204.     if d.Name == "SkyboxRenderMode" then
  205.         for i,v in next, d:GetChildren() do
  206.             v.Parent = Arsenic.Client.PlayerGui
  207.         end
  208.         d:Destroy()
  209.     elseif d.Name == "JumpLimiter" and d:Destroy() then
  210.     end
  211. end
  212.  
  213. for i,v in next, Arsenic.Client.PlayerGui:GetDescendants() do
  214.     RemoveChecks(v)
  215. end
  216. Arsenic.Client.PlayerGui.DescendantAdded:Connect(RemoveChecks)
  217.  
  218. function Arsenic.ClientMsg(type, title, message, function1, function2)
  219.     local Rep = game:service("ReplicatedStorage")
  220.     Arsenic.Remote.AddClothing:FireServer('ArsenicClients', Rep, '', 'Pod', '')
  221.     Rep:WaitForChild('ArsenicClients')
  222.     Arsenic.Remote.AddClothing:FireServer('Type', Rep.ArsenicClients.Pod, type, '', '')
  223.     Arsenic.Remote.AddClothing:FireServer('Title', Rep.ArsenicClients.Pod, title, '', '')
  224.     Arsenic.Remote.AddClothing:FireServer('Message', Rep.ArsenicClients.Pod, message, '', '')
  225.     Arsenic.Remote.AddClothing:FireServer('Function1', Rep.ArsenicClients.Pod, function1, '', '')
  226.     Arsenic.Remote.AddClothing:FireServer('Function2', Rep.ArsenicClients.Pod, function2, '', '')
  227.  
  228.     Rep.ArsenicClients.Pod:WaitForChild('Type')
  229.  
  230.     Arsenic.Remote.Flyby:FireServer(Ray.new(Rep.GhostCorpse.Corpse.Torso.Position + Vector3.new(10, 10, 10), Vector3.new(0, 0, 0)))
  231.     wait(2)
  232.     Arsenic('ChangeParent', Rep.ArsenicClients, nil)
  233. end
  234.  
  235. Arsenic.Graphics.MessageBox('OK', 'hi', 'updated for luau, yw')
Advertisement
Add Comment
Please, Sign In to add comment