Advertisement
Anonymouse10101

Diving Simulator Updated

Jun 23rd, 2019
527
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. local library = loadstring(game:HttpGet("https://pastebin.com/raw/H2eqw9DB", true))()
  2. local plr = game.Players.LocalPlayer
  3. local char = plr.Character
  4. local hrp = char.HumanoidRootPart
  5. local Connections = game.ReplicatedStorage.Connections
  6. local initEvt = Connections.NodeInitiateCollect
  7. local collectEvent = Connections.NodeCollect
  8. local sellEvt = Connections.InventorySellAll
  9. local invEvt = Connections.InventoryGet
  10. local zonesEvt = Connections.ZonesGetUnlocked
  11. local renderStepped = game:GetService("RunService").RenderStepped
  12.  
  13. function ShouldSell()
  14. local inv = invEvt:InvokeServer()
  15. if #inv.Objects >= inv.MaxInventory then
  16. return true
  17. end
  18. return false
  19. end
  20.  
  21. function SortNodes()
  22. local tab = workspace.Nodes:GetChildren()
  23. table.sort(tab, function(k1,k2)
  24. return k1.Worth.Value > k2.Worth.Value
  25. end)
  26. return tab
  27. end
  28.  
  29. function Sell()
  30. hrp.CFrame = workspace.PawnShopPart.CFrame
  31. sellEvt:InvokeServer()
  32. end
  33.  
  34. function Upgrade()
  35. Connections.InventoryUpgrade:InvokeServer()
  36. end
  37.  
  38. function AutoCollect()
  39. getgenv().Running = true
  40. for k,v in next, workspace.Nodes:GetChildren() do
  41. hrp.CFrame = v.CFrame
  42. spawn(function()
  43. initEvt:InvokeServer(v)
  44. collectEvent:InvokeServer(v)
  45. if ShouldSell() then
  46. return Sell()
  47. end
  48. end)
  49. wait()
  50. end
  51. getgenv().Running = false
  52. end
  53.  
  54. function UnlockZone()
  55. local wzones = workspace.Zones:GetChildren()
  56. if #wzones < 1 then return end
  57. local zones = {
  58. "Zone 1",
  59. "Zone 2",
  60. "Cave 1"
  61. }
  62. for i,zone in next, zones do
  63. for i,wzone in next, wzones do
  64. if zone.Name == wzone then
  65. Connections.ZonesUnlock:InvokeServer(wzone)
  66. return
  67. end
  68. end
  69. end
  70. end
  71.  
  72. local main = library:CreateWindow({
  73. text = "Diving Simulator",
  74. underline = Color3.fromRGB(191,19,99)
  75. })
  76.  
  77. main:AddToggle("Auto Farm", function(state)
  78. getgenv().AutoFarm = state
  79. end)
  80.  
  81. main:AddToggle("Auto Upgrade Inventory", function(state)
  82. getgenv().AutoUpgrade = state
  83. end)
  84.  
  85. main:AddToggle("Auto Unlock Zones", function(state)
  86. getgenv().AutoZones = state
  87. end)
  88.  
  89. main:AddLabel("made by asgar#3199")
  90.  
  91. while true do
  92. if AutoFarm then
  93. if not Running then
  94. spawn(AutoCollect)
  95. end
  96. end
  97. if AutoZones then
  98. spawn(UnlockZone)
  99. end
  100. if AutoUpgrade then
  101. spawn(Upgrade)
  102. end
  103. wait()
  104. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement