Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Loading Mining Simulator GUI")
- local OldGui = game.Players.LocalPlayer.PlayerGui:FindFirstChild("Nice Flex But OK")
- if OldGui then
- OldGui:Destroy()
- end
- local ScreenGUI = game:GetObjects("rbxassetid://2594598861")[1]
- ScreenGUI.Enabled = true
- ScreenGUI.Parent = game.Players.LocalPlayer.PlayerGui
- ScreenGUI.Name = "Nice Flex But OK"
- local TopBar = ScreenGUI.Frame
- local MainFrame = TopBar.Frame
- local ExitButton = TopBar.ExitButton
- local OpenButton = TopBar.Parent.OpenButton
- local RemoteText = TopBar.RemoteText
- local AutoSellToggle = MainFrame.AutoSellToggle
- local FastMineToggle = MainFrame.FastMineToggle
- local AutoMineToggle = MainFrame.AutoMineToggle
- local AutoBackpackToggle = MainFrame.AutoBackpackToggle
- local AutoToolsToggle = MainFrame.AutoToolsToggle
- local AutoRebirthToggle = MainFrame.AutoRebirthToggle
- local AutoSellToggled = false
- local FastMineToggled = false
- local AutoMineToggled = false
- local AutoBackpackToggled = false
- local AutoToolsToggled = false
- local AutoRebirthToggled = false
- local Remote = nil
- local backpackModule = require(game.Lighting.Assets.Modules.BackpackModule)
- local Network = {
- cache = {}
- }
- local network = {}
- local network_mt = {}
- function network_mt:__index()
- Network:FireServer("xd")
- error("Read the rules", 2)
- end
- setmetatable(network, network_mt)
- function Network:Initialize()
- local id = 0
- local runs = 0
- function key()
- id = id + 1
- if id > 100 then
- id = 0
- end
- return 2654 * (id * 3)
- end
- function Network.new()
- local remote, func = game.ReplicatedStorage.Network:InvokeServer()
- runs = runs + 1
- if runs >= 2 then
- self:FireServer("KickSelf", "Bypassing Network")
- end
- Network.RemoteEvent = remote
- Network.RemoteFunction = func
- end
- Network.new()
- function Network:FireServer(name, ...)
- self.RemoteEvent:FireServer(name, {
- {
- ...
- }
- })
- end
- function Network:InvokeServer(name, ...)
- return self.RemoteFunction:InvokeServer(name, {
- {
- ...
- }
- }, key())
- end
- function self.RemoteFunction.OnClientInvoke(...)
- return self:Function(...)
- end
- self.RemoteEvent.OnClientEvent:connect(function(...)
- self:Function(...)
- end)
- Network.init = true
- end
- Network:Initialize()
- local MetaTable = getrawmetatable(game)
- local game_namecall = MetaTable.__namecall
- pcall((setreadonly or make_writeable), MetaTable, false)
- MetaTable.__namecall = function(self, ...)
- if Remote == nil then
- local args = {...}
- local method = table.remove(args)
- if method == 'FireServer' then
- self.Name = "CorrectRemote"
- Remote = self
- RemoteText.Text = "Remote Found!"
- end
- end
- return game_namecall(self, ...)
- end
- local function Raycast(Vector)
- local Raycast = Ray.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position, Vector)
- local Ignore = {game.Players.LocalPlayer.Character}
- local Ore, endPoint = game.Workspace:FindPartOnRayWithIgnoreList(Raycast, Ignore)
- if Ore then
- if Ore.Parent.Parent.Name == "Blocks" then
- local Arguments = {
- [1] = "MineBlock",
- [2] = {
- [1] = {
- [1] = Ore.Parent
- }
- }
- }
- Remote:FireServer(unpack(Arguments))
- end
- end
- end
- AutoSellToggle.MouseButton1Click:Connect(function()
- if Remote == nil then
- else
- if AutoSellToggled == false then
- AutoSellToggled = true
- AutoSellToggle.Text = "Disable"
- while AutoSellToggled do
- wait(1)
- local coins, inventory, equipped, ownedItems, offer, rebirths, skins, skinEquipped, pets, crates, favorites, hatInventory, wearing, visibleHats, eggHuntStuff, eggPackBought, quests, sortType, patriotBought, tokens, permanentItems, login, toolEnchantments, newQuests, lightPack, equippedAccessories, secProgression, trails, candyCorn, hauntedPack, darkPack, visibleAccessory, infernoPack = Network:InvokeServer("GetStats")
- local function inventoryContents()
- local num = 0
- for i = 1, #inventory do
- num = num + inventory[i][2]
- end
- return num
- end
- local Amount = inventoryContents()
- local Backpack = backpackModule[equipped[1]]
- if Amount == Backpack then
- local LastPosition = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
- for i = 1, 25 do
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-116, 13, 38)
- local Arguments = {
- [1] = "SellItems",
- [2] = {
- [1] = {
- }
- }
- }
- Remote:FireServer(unpack(Arguments))
- wait(0.03)
- end
- for i = 1, 10 do
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = LastPosition + Vector3.new(0,2,0)
- wait(0.03)
- end
- end
- end
- else
- AutoSellToggled = false
- AutoSellToggle.Text = "Enable"
- end
- end
- end)
- FastMineToggle.MouseButton1Click:Connect(function()
- if Remote == nil then
- else
- if FastMineToggled == false then
- FastMineToggled = true
- FastMineToggle.Text = "Disable"
- for i,v in pairs(game.Workspace.Blocks:GetChildren()) do
- if v:FindFirstChild("Stats") then
- if v:FindFirstChild("Stats"):FindFirstChild("Multiplier") then
- v.Stats.Multiplier.Value = -1337
- end
- end
- end
- else
- FastMineToggled = false
- FastMineToggle.Text = "Enable"
- end
- end
- end)
- AutoMineToggle.MouseButton1Click:Connect(function()
- if Remote == nil then
- else
- if AutoMineToggled == false then
- AutoMineToggled = true
- AutoMineToggle.Text = "Disable"
- while AutoMineToggled do
- for i = 1, 100 do
- Raycast(Vector3.new(5, 0, 0))
- Raycast(Vector3.new(-5, 0, 0))
- Raycast(Vector3.new(0, 0, 5))
- Raycast(Vector3.new(0, 0, -5))
- Raycast(Vector3.new(0, -5, 0))
- wait(0.1)
- end
- end
- else
- AutoMineToggled = false
- AutoMineToggle.Text = "Enable"
- end
- end
- end)
- AutoBackpackToggle.MouseButton1Click:Connect(function()
- if Remote == nil then
- else
- if AutoBackpackToggled == false then
- AutoBackpackToggled = true
- AutoBackpackToggle.Text = "Disable"
- while AutoBackpackToggled do
- wait(3)
- for i = 1, 50 do
- if i == 2 then
- else
- local Arguments = {
- [1] = "BuyItem",
- [2] = {
- [1] = {
- [1] = "Backpack",
- [2] = i
- }
- }
- }
- Remote:FireServer(unpack(Arguments))
- wait(0.1)
- end
- end
- end
- else
- AutoBackpackToggled = false
- AutoBackpackToggle.Text = "Enable"
- end
- end
- end)
- AutoToolsToggle.MouseButton1Click:Connect(function()
- if Remote == nil then
- else
- if AutoToolsToggled == false then
- AutoToolsToggled = true
- AutoToolsToggle.Text = "Disable"
- while AutoToolsToggled do
- wait(3)
- for i = 1, 50 do
- local Arguments = {
- [1] = "BuyItem",
- [2] = {
- [1] = {
- [1] = "Tools",
- [2] = i
- }
- }
- }
- Remote:FireServer(unpack(Arguments))
- wait(0.1)
- end
- end
- else
- AutoToolsToggled = false
- AutoToolsToggle.Text = "Enable"
- end
- end
- end)
- AutoRebirthToggle.MouseButton1Click:Connect(function()
- if Remote == nil then
- else
- if AutoRebirthToggled == false then
- AutoRebirthToggled = true
- AutoRebirthToggle.Text = "Disable"
- while AutoRebirthToggled do
- wait(0.5)
- local Arguments = {
- [1] = "Rebirth",
- [2] = {
- [1] = {
- }
- }
- }
- Remote:FireServer(unpack(Arguments))
- end
- else
- AutoRebirthToggled = false
- AutoRebirthToggle.Text = "Enable"
- end
- end
- end)
- ExitButton.MouseButton1Click:Connect(function()
- TopBar.Visible = false
- OpenButton.Visible = true
- end)
- OpenButton.MouseButton1Click:Connect(function()
- TopBar.Visible = true
- OpenButton.Visible = false
- end)
- game.Workspace.Blocks.ChildAdded:Connect(function(v)
- if FastMineToggled then
- local Stats = v:WaitForChild("Stats")
- local Multiplier = Stats:WaitForChild("Multiplier")
- if Stats and Multiplier then
- Multiplier.Value = -1337
- end
- end
- end)
- print("GUI LOADED")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement