Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local library = loadstring(game:HttpGet("https://pastebin.com/raw/H2eqw9DB", true))()
- local plr = game.Players.LocalPlayer
- local char = plr.Character
- local hrp = char.HumanoidRootPart
- local Connections = game.ReplicatedStorage.Connections
- local initEvt = Connections.NodeInitiateCollect
- local collectEvent = Connections.NodeCollect
- local sellEvt = Connections.InventorySellAll
- local invEvt = Connections.InventoryGet
- local zonesEvt = Connections.ZonesGetUnlocked
- local renderStepped = game:GetService("RunService").RenderStepped
- function ShouldSell()
- local inv = invEvt:InvokeServer()
- if #inv.Objects >= inv.MaxInventory then
- return true
- end
- return false
- end
- function SortNodes()
- local tab = workspace.Nodes:GetChildren()
- table.sort(tab, function(k1,k2)
- return k1.Worth.Value > k2.Worth.Value
- end)
- return tab
- end
- function Sell()
- hrp.CFrame = workspace.PawnShopPart.CFrame
- sellEvt:InvokeServer()
- end
- function Upgrade()
- Connections.InventoryUpgrade:InvokeServer()
- end
- function AutoCollect()
- getgenv().Running = true
- for k,v in next, workspace.Nodes:GetChildren() do
- hrp.CFrame = v.CFrame
- spawn(function()
- initEvt:InvokeServer(v)
- collectEvent:InvokeServer(v)
- if ShouldSell() then
- return Sell()
- end
- end)
- wait()
- end
- getgenv().Running = false
- end
- function UnlockZone()
- local wzones = workspace.Zones:GetChildren()
- if #wzones < 1 then return end
- local zones = {
- "Zone 1",
- "Zone 2",
- "Cave 1"
- }
- for i,zone in next, zones do
- for i,wzone in next, wzones do
- if zone.Name == wzone then
- Connections.ZonesUnlock:InvokeServer(wzone)
- return
- end
- end
- end
- end
- local main = library:CreateWindow({
- text = "Diving Simulator",
- underline = Color3.fromRGB(191,19,99)
- })
- main:AddToggle("Auto Farm", function(state)
- getgenv().AutoFarm = state
- end)
- main:AddToggle("Auto Upgrade Inventory", function(state)
- getgenv().AutoUpgrade = state
- end)
- main:AddToggle("Auto Unlock Zones", function(state)
- getgenv().AutoZones = state
- end)
- main:AddLabel("made by asgar#3199")
- while true do
- if AutoFarm then
- if not Running then
- spawn(AutoCollect)
- end
- end
- if AutoZones then
- spawn(UnlockZone)
- end
- if AutoUpgrade then
- spawn(Upgrade)
- end
- wait()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement