SHARE
TWEET

Untitled

Xeva Nov 12th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Variables --
  2. local env = getsenv(game:GetService("Players").LocalPlayer.PlayerGui["Game GUI"]["Client Controller"])
  3. local upvalues = debug.getupvalues(env.addItem)
  4. local replicatedStorage = game:GetService("ReplicatedStorage")
  5. local remotes = replicatedStorage["Game Objects"].Remotes
  6. local networkEvent = nil;
  7. local networkFunction = nil;
  8. local addToMarket = upvalues["addToMarket"]
  9. local controlItem = upvalues["controlItem"]
  10. local privateKey = nil;
  11. local logLevels = {
  12.     Info = Color3.fromRGB(255, 255, 255),
  13.     Warning = Color3.fromRGB(255, 247, 134),
  14.     Error = Color3.fromRGB(255, 41, 34),
  15.     Success = Color3.fromRGB(118, 255, 55)
  16. }
  17. local guiInstances = {}
  18. local buxFarmActive = false
  19.  
  20. -- Creates GUI --
  21. function createInstance(instance, name, parent)
  22.     local inst = Instance.new(instance)
  23.     if(parent ~= nil) then
  24.         inst.Parent = parent
  25.     end
  26.     guiInstances[name] = inst
  27.     return inst
  28. end
  29.  
  30. function createGui()
  31.     local screenGui = createInstance("ScreenGui", "screenGui", game:GetService("Players").LocalPlayer.PlayerGui)
  32.     local mainFrame = createInstance("Frame", "mainFrame", screenGui)
  33.     mainFrame.BackgroundColor3 = Color3.fromRGB(38, 38, 38)
  34.     mainFrame.BorderColor3 = Color3.fromRGB(255, 255, 255)
  35.     mainFrame.BorderSizePixel = 1
  36.     mainFrame.Position = UDim2.new(1, -320, 1, -270)
  37.     mainFrame.Size = UDim2.new(0, 300, 0, 20)
  38.     mainFrame.Draggable = true
  39.     mainFrame.Active = true
  40.     mainFrame.Selectable = true
  41.     local header = createInstance("Frame", "header", mainFrame)
  42.     header.BackgroundColor3 = Color3.fromRGB(38, 38, 38)
  43.     header.BorderColor3 = Color3.fromRGB(255, 255, 255)
  44.     header.BorderSizePixel = 1
  45.     header.Position = UDim2.new(0, 0, -0.001, 0)
  46.     header.Size = UDim2.new(0, 300, 0, 20)
  47.     local headerTitle = createInstance("TextLabel", "headerTitle", header)
  48.     headerTitle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  49.     headerTitle.BackgroundTransparency = 1
  50.     headerTitle.Position = UDim2.new(0, 0, 0.01, 0)
  51.     headerTitle.Size = UDim2.new(0, 166, 0, 19)
  52.     headerTitle.Font = Enum.Font.GothamBold
  53.     headerTitle.Text = "     Case Clickers GUI"
  54.     headerTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
  55.     headerTitle.TextSize = 10
  56.     headerTitle.TextXAlignment = Enum.TextXAlignment.Left
  57.     local headerCredits = createInstance("TextLabel", "headerCredits", header)
  58.     headerCredits.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  59.     headerCredits.BackgroundTransparency = 1
  60.     headerCredits.Position = UDim2.new(0.77, 0, 0.26, 0)
  61.     headerCredits.Size = UDim2.new(0, 68, 0, 9)
  62.     headerCredits.Font = Enum.Font.GothamBold
  63.     headerCredits.Text = "By Luaa"
  64.     headerCredits.TextColor3 = Color3.fromRGB(255, 255, 255)
  65.     headerCredits.TextSize = 10
  66.     wait(2)
  67.     mainFrame:TweenSize(UDim2.new(0, 300, 0, 250))
  68.     local footer = createInstance("Frame", "footer", mainFrame)
  69.     footer.BackgroundColor3 = Color3.fromRGB(38, 38, 38)
  70.     footer.BorderColor3 = Color3.fromRGB(255, 255, 255)
  71.     footer.BorderSizePixel = 1
  72.     footer.Position = UDim2.new(-0.067, 20, 0.92, 0)
  73.     footer.Size = UDim2.new(0, 300, 0, 20)
  74.     local footerTitle = createInstance("TextLabel", "footerTitle", footer)
  75.     footerTitle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  76.     footerTitle.BackgroundTransparency = 1
  77.     footerTitle.Position = UDim2.new(0, 0, 0.01, 0)
  78.     footerTitle.Size = UDim2.new(0, 300, 0, 19)
  79.     footerTitle.Font = Enum.Font.GothamBold
  80.     footerTitle.Text = "Press the \"Click for BUX\" button."
  81.     footerTitle.TextColor3 = Color3.fromRGB(255, 247, 134)
  82.     footerTitle.TextSize = 10
  83.     wait(2)
  84.     local skipAnimation = createInstance("TextButton", "skipAnimation", mainFrame)
  85.     skipAnimation.Position = UDim2.new(0.03, 0, 0.12, 0)
  86.     skipAnimation.Size = UDim2.new(0, 100, 0, 50)
  87.     skipAnimation.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
  88.     skipAnimation.Font = Enum.Font.GothamBold
  89.     skipAnimation.Text = "Skip Animation"
  90.     skipAnimation.TextSize = 10
  91.     local buxFarm = createInstance("TextButton", "buxFarm", mainFrame)
  92.     buxFarm.Position = UDim2.new(0.643, 0, 0.12, 0)
  93.     buxFarm.Size = UDim2.new(0, 100, 0, 50)
  94.     buxFarm.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
  95.     buxFarm.Font = Enum.Font.GothamBold
  96.     buxFarm.Text = "Bux Farm"
  97.     buxFarm.TextSize = 10
  98.     local openCases = createInstance("TextButton", "openCases", mainFrame)
  99.     openCases.Position = UDim2.new(0.03, 0, 0.352, 0)
  100.     openCases.Size = UDim2.new(0, 100, 0, 50)
  101.     openCases.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
  102.     openCases.Font = Enum.Font.GothamBold
  103.     openCases.Text = "Open Cases"
  104.     openCases.TextSize = 10
  105.     --[[
  106.     local caseBot = createInstance("TextButton", "caseBot", mainFrame)
  107.     caseBot.Position = UDim2.new(0.643, 0, 0.352, 0)
  108.     caseBot.Size = UDim2.new(0, 100, 0, 50)
  109.     caseBot.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
  110.     caseBot.Font = Enum.Font.GothamBold
  111.     caseBot.Text = "Case Bot"
  112.     caseBot.TextSize = 10
  113.     --]]
  114.     local casesAmount = createInstance("TextBox", "casesAmount", mainFrame)
  115.     casesAmount.Position = UDim2.new(0.03, 0, 0.78, 0)
  116.     casesAmount.Size = UDim2.new(0, 127, 0, 22)
  117.     casesAmount.BackgroundColor3 = Color3.fromRGB(38, 38, 38)
  118.     casesAmount.BorderColor3 = Color3.fromRGB(255, 255, 255)
  119.     casesAmount.BorderSizePixel = 1
  120.     casesAmount.PlaceholderText = "Amount of Cases"
  121.     casesAmount.Text = ""
  122.     casesAmount.TextColor3 = Color3.fromRGB(255, 255, 255)
  123.     local caseType = createInstance("TextBox", "caseType", mainFrame)
  124.     caseType.Position = UDim2.new(0.553, 0, 0.78, 0)
  125.     caseType.Size = UDim2.new(0, 127, 0, 22)
  126.     caseType.BackgroundColor3 = Color3.fromRGB(38, 38, 38)
  127.     caseType.BorderColor3 = Color3.fromRGB(255, 255, 255)
  128.     caseType.BorderSizePixel = 1
  129.     caseType.PlaceholderText = "Case Type"
  130.     caseType.Text = ""
  131.     caseType.TextColor3 = Color3.fromRGB(255, 255, 255)
  132. end
  133.  
  134. function log(text, colour)
  135.     guiInstances["footerTitle"].TextColor3 = colour
  136.     guiInstances["footerTitle"].Text = text
  137. end
  138.  
  139. -- Metatable Magic --
  140. function metatableMagic()
  141.     -- Variables --
  142.     local metatable = debug.getmetatable(game)
  143.     local backupNamecall = metatable.__namecall
  144.  
  145.     -- Make randomizeRemotes do nothing --
  146.     env.RandomizeRemotes = function() end
  147.  
  148.     -- Make metatable not readonly --
  149.     local setreadonly = make_writeable or setreadonly
  150.     setreadonly(metatable, false)
  151.  
  152.     -- Overwrite __namecall metamethod --
  153.     metatable.__namecall = function(...)
  154.         local args = {...}
  155.         if(args[#args] == "FireServer" and networkEvent == nil and args[1].Parent == remotes) then
  156.             privateKey = args[4]
  157.             networkEvent = args[1]
  158.             if(not networkFunction) then
  159.                 log("Network Event has been found, now open a case.", logLevels["Success"])
  160.             else
  161.                 log("Network Event has been found, you may now use the gui.", logLevels["Success"])
  162.             end
  163.         elseif(args[#args] == "InvokeServer" and networkFunction == nil and args[1].Parent == remotes) then
  164.             networkFunction = args[1]
  165.             if(not networkEvent) then
  166.                 log("Net Function has been found, click the \"Click for BUX\" button.", logLevels["Success"])
  167.             else
  168.                 log("Network Function has been found, you may use the gui.", logLevels["Success"])
  169.             end
  170.         elseif(args[#args] == "UserOwnsGamePassAsync") then
  171.             return true
  172.         elseif(args[#args] == "Kick") then
  173.             return true
  174.         end
  175.         return backupNamecall(...)
  176.     end
  177. end
  178.  
  179. metatableMagic()
  180. createGui()
  181.  
  182. guiInstances["skipAnimation"].MouseButton1Click:Connect(function()
  183.     local ccEnv = getsenv(game:GetService("Players").LocalPlayer.PlayerGui["Game GUI"]["Client Controller"])
  184.     debug.setupvalue(ccEnv.updateClient, "hasPass", true)
  185.     debug.setupvalue(ccEnv.updateClient, "skip_enabled", true)
  186.     log("Enabled Skip Animation.", logLevels["Success"])
  187. end)
  188.  
  189. guiInstances["buxFarm"].MouseButton1Click:Connect(function()
  190.     if(buxFarmActive) then
  191.         buxFarmActive = false
  192.         log("Stopped Bux farm.", logLevels["Success"])
  193.     else
  194.         buxFarmActive = true
  195.        
  196.         if(networkEvent) then
  197.             log("Started Bux Farm.", logLevels["Success"])
  198.             while buxFarmActive do
  199.                 wait()
  200.                 networkEvent:FireServer("Click", {}, privateKey)
  201.             end
  202.         else
  203.             log("Event has not been found, click \"Click for BUX\" button.", logLevels["Error"])
  204.         end
  205.     end
  206. end)
  207.  
  208. guiInstances["openCases"].MouseButton1Click:Connect(function()
  209.     local amount = guiInstances["casesAmount"].Text
  210.     local type = guiInstances["caseType"].Text
  211.  
  212.     if(tonumber(amount) ~= nil and type ~= "") then
  213.         if(networkFunction) then
  214.             log("Started Case Opener.", logLevels["Success"])
  215.             for i=0, tonumber(amount) do
  216.                 log("Opening Case: " .. i, logLevels["Success"])
  217.                 networkFunction:InvokeServer("OpenCase", {type, true}, privateKey)
  218.                 wait(0.5)
  219.             end
  220.         else
  221.             log("Network Function has not been found, open a case.", logLevels["Error"])
  222.         end
  223.     else
  224.         log("You have not entered a number or type.", logLevels["Error"])
  225.     end
  226. end)
  227.  
  228. --[[
  229. local itemJSON = require(game.ReplicatedStorage.Modules.CollectiblesJSON)
  230. function getType(assetId)
  231.     return itemJSON[tostring(assetId)] and itemJSON[tostring(assetId)].Type or "Common"
  232. end
  233. function getPrice(assetId)
  234.     local val = game.ReplicatedStorage.PriceData:FindFirstChild(assetId)
  235.     return val and val.Value or 0
  236. end
  237.  
  238. Works but unfinished.
  239.  
  240. guiInstances["caseBot"].MouseButton1Click:Connect(function()
  241.     if(networkFunction) then
  242.         while wait() do
  243.             local caseData, items, winningNumber, caseSpeed = networkFunction:InvokeServer("OpenCase", {"Legendary", true}, privateKey)
  244.             wait(0.2)
  245.             if(caseData) then
  246.                 local itemType = getType(items[winningNumber].AssetId)
  247.                 if((itemType:upper() ~= "OMEGA" or itemType:upper() ~= "LEGENDARY") and 300000 > tonumber(getPrice(items[winningNumber].AssetId))) then
  248.                     controlItem:FireServer(items[winningNumber].AssetId, "Sell")
  249.                 end
  250.             end
  251.             wait(0.5)
  252.         end
  253.     else
  254.         log("Network Function has not been found, open a case.", logLevels["Error"])
  255.     end
  256. end)
  257. --]]
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
 
Top