Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Variables --
- local env = getsenv(game:GetService("Players").LocalPlayer.PlayerGui["Game GUI"]["Client Controller"])
- local upvalues = debug.getupvalues(env.addItem)
- local replicatedStorage = game:GetService("ReplicatedStorage")
- local remotes = replicatedStorage["Game Objects"].Remotes
- local networkEvent = nil;
- local networkFunction = nil;
- local addToMarket = upvalues["addToMarket"]
- local controlItem = upvalues["controlItem"]
- local privateKey = nil;
- local logLevels = {
- Info = Color3.fromRGB(255, 255, 255),
- Warning = Color3.fromRGB(255, 247, 134),
- Error = Color3.fromRGB(255, 41, 34),
- Success = Color3.fromRGB(118, 255, 55)
- }
- local guiInstances = {}
- local buxFarmActive = false
- -- Creates GUI --
- function createInstance(instance, name, parent)
- local inst = Instance.new(instance)
- if(parent ~= nil) then
- inst.Parent = parent
- end
- guiInstances[name] = inst
- return inst
- end
- function createGui()
- local screenGui = createInstance("ScreenGui", "screenGui", game:GetService("Players").LocalPlayer.PlayerGui)
- local mainFrame = createInstance("Frame", "mainFrame", screenGui)
- mainFrame.BackgroundColor3 = Color3.fromRGB(38, 38, 38)
- mainFrame.BorderColor3 = Color3.fromRGB(255, 255, 255)
- mainFrame.BorderSizePixel = 1
- mainFrame.Position = UDim2.new(1, -320, 1, -270)
- mainFrame.Size = UDim2.new(0, 300, 0, 20)
- mainFrame.Draggable = true
- mainFrame.Active = true
- mainFrame.Selectable = true
- local header = createInstance("Frame", "header", mainFrame)
- header.BackgroundColor3 = Color3.fromRGB(38, 38, 38)
- header.BorderColor3 = Color3.fromRGB(255, 255, 255)
- header.BorderSizePixel = 1
- header.Position = UDim2.new(0, 0, -0.001, 0)
- header.Size = UDim2.new(0, 300, 0, 20)
- local headerTitle = createInstance("TextLabel", "headerTitle", header)
- headerTitle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- headerTitle.BackgroundTransparency = 1
- headerTitle.Position = UDim2.new(0, 0, 0.01, 0)
- headerTitle.Size = UDim2.new(0, 166, 0, 19)
- headerTitle.Font = Enum.Font.GothamBold
- headerTitle.Text = " Case Clickers GUI"
- headerTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
- headerTitle.TextSize = 10
- headerTitle.TextXAlignment = Enum.TextXAlignment.Left
- local headerCredits = createInstance("TextLabel", "headerCredits", header)
- headerCredits.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- headerCredits.BackgroundTransparency = 1
- headerCredits.Position = UDim2.new(0.77, 0, 0.26, 0)
- headerCredits.Size = UDim2.new(0, 68, 0, 9)
- headerCredits.Font = Enum.Font.GothamBold
- headerCredits.Text = "By Luaa"
- headerCredits.TextColor3 = Color3.fromRGB(255, 255, 255)
- headerCredits.TextSize = 10
- wait(2)
- mainFrame:TweenSize(UDim2.new(0, 300, 0, 250))
- local footer = createInstance("Frame", "footer", mainFrame)
- footer.BackgroundColor3 = Color3.fromRGB(38, 38, 38)
- footer.BorderColor3 = Color3.fromRGB(255, 255, 255)
- footer.BorderSizePixel = 1
- footer.Position = UDim2.new(-0.067, 20, 0.92, 0)
- footer.Size = UDim2.new(0, 300, 0, 20)
- local footerTitle = createInstance("TextLabel", "footerTitle", footer)
- footerTitle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- footerTitle.BackgroundTransparency = 1
- footerTitle.Position = UDim2.new(0, 0, 0.01, 0)
- footerTitle.Size = UDim2.new(0, 300, 0, 19)
- footerTitle.Font = Enum.Font.GothamBold
- footerTitle.Text = "Press the \"Click for BUX\" button."
- footerTitle.TextColor3 = Color3.fromRGB(255, 247, 134)
- footerTitle.TextSize = 10
- wait(2)
- local skipAnimation = createInstance("TextButton", "skipAnimation", mainFrame)
- skipAnimation.Position = UDim2.new(0.03, 0, 0.12, 0)
- skipAnimation.Size = UDim2.new(0, 100, 0, 50)
- skipAnimation.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
- skipAnimation.Font = Enum.Font.GothamBold
- skipAnimation.Text = "Skip Animation"
- skipAnimation.TextSize = 10
- local buxFarm = createInstance("TextButton", "buxFarm", mainFrame)
- buxFarm.Position = UDim2.new(0.643, 0, 0.12, 0)
- buxFarm.Size = UDim2.new(0, 100, 0, 50)
- buxFarm.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
- buxFarm.Font = Enum.Font.GothamBold
- buxFarm.Text = "Bux Farm"
- buxFarm.TextSize = 10
- local openCases = createInstance("TextButton", "openCases", mainFrame)
- openCases.Position = UDim2.new(0.03, 0, 0.352, 0)
- openCases.Size = UDim2.new(0, 100, 0, 50)
- openCases.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
- openCases.Font = Enum.Font.GothamBold
- openCases.Text = "Open Cases"
- openCases.TextSize = 10
- --[[
- local caseBot = createInstance("TextButton", "caseBot", mainFrame)
- caseBot.Position = UDim2.new(0.643, 0, 0.352, 0)
- caseBot.Size = UDim2.new(0, 100, 0, 50)
- caseBot.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
- caseBot.Font = Enum.Font.GothamBold
- caseBot.Text = "Case Bot"
- caseBot.TextSize = 10
- --]]
- local casesAmount = createInstance("TextBox", "casesAmount", mainFrame)
- casesAmount.Position = UDim2.new(0.03, 0, 0.78, 0)
- casesAmount.Size = UDim2.new(0, 127, 0, 22)
- casesAmount.BackgroundColor3 = Color3.fromRGB(38, 38, 38)
- casesAmount.BorderColor3 = Color3.fromRGB(255, 255, 255)
- casesAmount.BorderSizePixel = 1
- casesAmount.PlaceholderText = "Amount of Cases"
- casesAmount.Text = ""
- casesAmount.TextColor3 = Color3.fromRGB(255, 255, 255)
- local caseType = createInstance("TextBox", "caseType", mainFrame)
- caseType.Position = UDim2.new(0.553, 0, 0.78, 0)
- caseType.Size = UDim2.new(0, 127, 0, 22)
- caseType.BackgroundColor3 = Color3.fromRGB(38, 38, 38)
- caseType.BorderColor3 = Color3.fromRGB(255, 255, 255)
- caseType.BorderSizePixel = 1
- caseType.PlaceholderText = "Case Type"
- caseType.Text = ""
- caseType.TextColor3 = Color3.fromRGB(255, 255, 255)
- end
- function log(text, colour)
- guiInstances["footerTitle"].TextColor3 = colour
- guiInstances["footerTitle"].Text = text
- end
- -- Metatable Magic --
- function metatableMagic()
- -- Variables --
- local metatable = debug.getmetatable(game)
- local backupNamecall = metatable.__namecall
- -- Make randomizeRemotes do nothing --
- env.RandomizeRemotes = function() end
- -- Make metatable not readonly --
- local setreadonly = make_writeable or setreadonly
- setreadonly(metatable, false)
- -- Overwrite __namecall metamethod --
- metatable.__namecall = function(...)
- local args = {...}
- if(args[#args] == "FireServer" and networkEvent == nil and args[1].Parent == remotes) then
- privateKey = args[4]
- networkEvent = args[1]
- if(not networkFunction) then
- log("Network Event has been found, now open a case.", logLevels["Success"])
- else
- log("Network Event has been found, you may now use the gui.", logLevels["Success"])
- end
- elseif(args[#args] == "InvokeServer" and networkFunction == nil and args[1].Parent == remotes) then
- networkFunction = args[1]
- if(not networkEvent) then
- log("Net Function has been found, click the \"Click for BUX\" button.", logLevels["Success"])
- else
- log("Network Function has been found, you may use the gui.", logLevels["Success"])
- end
- elseif(args[#args] == "UserOwnsGamePassAsync") then
- return true
- elseif(args[#args] == "Kick") then
- return true
- end
- return backupNamecall(...)
- end
- end
- metatableMagic()
- createGui()
- guiInstances["skipAnimation"].MouseButton1Click:Connect(function()
- local ccEnv = getsenv(game:GetService("Players").LocalPlayer.PlayerGui["Game GUI"]["Client Controller"])
- debug.setupvalue(ccEnv.updateClient, "hasPass", true)
- debug.setupvalue(ccEnv.updateClient, "skip_enabled", true)
- log("Enabled Skip Animation.", logLevels["Success"])
- end)
- guiInstances["buxFarm"].MouseButton1Click:Connect(function()
- if(buxFarmActive) then
- buxFarmActive = false
- log("Stopped Bux farm.", logLevels["Success"])
- else
- buxFarmActive = true
- if(networkEvent) then
- log("Started Bux Farm.", logLevels["Success"])
- while buxFarmActive do
- wait()
- networkEvent:FireServer("Click", {}, privateKey)
- end
- else
- log("Event has not been found, click \"Click for BUX\" button.", logLevels["Error"])
- end
- end
- end)
- guiInstances["openCases"].MouseButton1Click:Connect(function()
- local amount = guiInstances["casesAmount"].Text
- local type = guiInstances["caseType"].Text
- if(tonumber(amount) ~= nil and type ~= "") then
- if(networkFunction) then
- log("Started Case Opener.", logLevels["Success"])
- for i=0, tonumber(amount) do
- log("Opening Case: " .. i, logLevels["Success"])
- networkFunction:InvokeServer("OpenCase", {type, true}, privateKey)
- wait(0.5)
- end
- else
- log("Network Function has not been found, open a case.", logLevels["Error"])
- end
- else
- log("You have not entered a number or type.", logLevels["Error"])
- end
- end)
- --[[
- local itemJSON = require(game.ReplicatedStorage.Modules.CollectiblesJSON)
- function getType(assetId)
- return itemJSON[tostring(assetId)] and itemJSON[tostring(assetId)].Type or "Common"
- end
- function getPrice(assetId)
- local val = game.ReplicatedStorage.PriceData:FindFirstChild(assetId)
- return val and val.Value or 0
- end
- Works but unfinished.
- guiInstances["caseBot"].MouseButton1Click:Connect(function()
- if(networkFunction) then
- while wait() do
- local caseData, items, winningNumber, caseSpeed = networkFunction:InvokeServer("OpenCase", {"Legendary", true}, privateKey)
- wait(0.2)
- if(caseData) then
- local itemType = getType(items[winningNumber].AssetId)
- if((itemType:upper() ~= "OMEGA" or itemType:upper() ~= "LEGENDARY") and 300000 > tonumber(getPrice(items[winningNumber].AssetId))) then
- controlItem:FireServer(items[winningNumber].AssetId, "Sell")
- end
- end
- wait(0.5)
- end
- else
- log("Network Function has not been found, open a case.", logLevels["Error"])
- end
- end)
- --]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement