Advertisement
skinkillaz

treasure hunt2

Sep 1st, 2018
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.45 KB | None | 0 0
  1. --[[ DOES NOT WORK WITH THE INFINITE BACKPACK!
  2. DOES NOT WORK WITH THE INFINITE BACKPACK!
  3. DOES NOT WORK WITH THE INFINITE BACKPACK!
  4.  
  5. Scripting by: OMGGMH
  6. Gui by: REQUESTED TO BE HIDDEN
  7.  
  8. Enjoy this while it lasts. I'm really getting tired of fixing this thing.
  9.  
  10.  
  11.  
  12. How to use:
  13. 1) Execute with a level 7 LUA NOT LUA-C exploit.
  14. 2) Select the Tool and Backpack you have equipped. It will automatically buy the tool and backpack if you don't own it.
  15. 2) That's it.
  16. ]]
  17. local AntiAFK = false -- If enabled the script will press your w key from time to time to prevent idle kick. (REQURIES ELYSIAN OR SYNAPSE TO WORK!)
  18. local Autorebirth = true -- Automatically rebirth when you can.
  19. local TargetedShovel = "Metal Detector" -- The script will automatically buy/equip this shovel when you can.
  20. local TargetedBackpack = "Sand Vault" -- The script will automatically buy/equip this backpack when you can.
  21.  
  22.  
  23. local Plrs = game:GetService("Players")
  24. local Run = game:GetService("RunService")
  25. local Rep = game:GetService("ReplicatedStorage")
  26. local Input = game:GetService("UserInputService")
  27. local CoreGui = game:GetService("CoreGui")
  28. local MyPlr = Plrs.LocalPlayer
  29. local MyGui = MyPlr.PlayerGui
  30. local MyPack = MyPlr.Backpack
  31. local MyCoins = MyPlr.leaderstats.Coins
  32. local MyRebirths = MyPlr.leaderstats.Rebirths
  33. local RebirthPrice = math.floor((MyRebirths.Value ^ 1.5 + 1) * 500000)
  34. local MyChar = MyPlr.Character
  35. local Events = Rep.Events
  36.  
  37. local On = false
  38. local DigSiteAboutToCollapse = false
  39.  
  40. local ShovelIds = {
  41. [1] = "Bucket",
  42. [2] = "Spade",
  43. [3] = "Toy Shovel",
  44. [4] = "Small Shovel",
  45. [5] = "Medium Shovel",
  46. [6] = "Large Shovel",
  47. [7] = "Big Scooper",
  48. [8] = "Vacuum",
  49. [9] = "Giant Shovel",
  50. [10] = "Metal Detector",
  51. [11] = "Jack Hammer",
  52. [12] = "Golden Spoon",
  53. [13] = "Dual Scoops",
  54. [14] = "Drill"
  55. }
  56.  
  57. local ShovelPrice = {
  58. [1] = 0,
  59. [2] = 100,
  60. [3] = 250,
  61. [4] = 600,
  62. [5] = 2100,
  63. [6] = 8800,
  64. [7] = 24000,
  65. [8] = 65000,
  66. [9] = 250000,
  67. [10] = 500000,
  68. [11] = 3000000,
  69. [12] = 10000000,
  70. [13] = 220000000,
  71. [14] = 450000000
  72. }
  73.  
  74. local BackpackIds = {
  75. [1] = "Starterpack",
  76. [2] = "Small Bag",
  77. [3] = "Medium Bag",
  78. [4] = "Large Bag",
  79. [5] = "XL Bag",
  80. [6] = "XXL Bag",
  81. [7] = "Sand Safe",
  82. [8] = "Sand Vault",
  83. [9] = "Small Canister",
  84. [10] = "Medium Canister",
  85. [11] = "Large Canister",
  86. [12] = "Duffle Bag",
  87. [13] = "Dual Canister",
  88. [14] = "Giant Canister",
  89. [15] = "Magical Fanny Pack"
  90. }
  91.  
  92. local BackpackPrices = {
  93. [1] = 0,
  94. [2] = 150,
  95. [3] = 375,
  96. [4] = 900,
  97. [5] = 3150,
  98. [6] = 13200,
  99. [7] = 150000,
  100. [8] = 350000,
  101. [9] = 1500000,
  102. [10] = 4000000,
  103. [11] = 8000000,
  104. [12] = 12000000,
  105. [13] = 24000000,
  106. [14] = 48000000,
  107. [15] = 100000000
  108. }
  109.  
  110. function GetTool()
  111. local tool = MyPack:FindFirstChildOfClass("Tool")
  112. return tool
  113. end
  114.  
  115. function GetBackpack()
  116. local pack = MyChar:FindFirstChildOfClass("Model")
  117. if pack then
  118. return pack
  119. end
  120.  
  121. return nil
  122. end
  123.  
  124. local EquipedShovel = GetTool().Name
  125.  
  126. local EquipedBackpack = GetBackpack().Name
  127.  
  128. local SelectedShovel = EquipedShovel
  129.  
  130. local SelectedBackpack = EquipedBackpack
  131.  
  132. function GetBestSandBlock()
  133. local best = { }
  134. local bestblock = workspace.SandBlocks:GetChildren()[math.random(1, #workspace.SandBlocks:GetChildren())]
  135.  
  136. local b = workspace.SandBlocks:GetChildren()
  137. for i, v in pairs(b) do
  138. local h = v:FindFirstChild("Health")
  139. if h and v.Material == Enum.Material.Sand then
  140. if h.Value > 50 then
  141. table.insert(best, v)
  142. end
  143. end
  144. end
  145.  
  146. for i, v in next, best do
  147. if bestblock == nil then
  148. bestblock = v
  149. else
  150. if bestblock.Health.Value < v.Health.Value then
  151. bestblock = v
  152. end
  153. end
  154. end
  155.  
  156. return bestblock
  157. end
  158.  
  159. function BackpackFull()
  160. local FindBackpack = GetBackpack()
  161. if FindBackpack then
  162. local GUI = FindBackpack.Counter.SurfaceGui.TextLabel
  163. local CurSand, MaxSand = string.match(GUI.Text, "(%d+)/(%d+)")
  164.  
  165. if FindBackpack.Name == "Infinite" then
  166. CurSand = MyPlr.leaderstats.Sand.Value
  167. MaxSand = 999999999
  168. end
  169.  
  170. MaxSand = tonumber(MaxSand)
  171. if tonumber(CurSand) >= MaxSand then
  172. print("BACKPACK FULL")
  173. return true
  174. else
  175. return false
  176. end
  177. end
  178.  
  179. return false
  180. end
  181.  
  182. function BuyItem(i)
  183. local Owned = Events.CheckIfOwned:InvokeServer(i)
  184. if not Owned then
  185. Events.Checkout:FireServer(i)
  186. end
  187. end
  188.  
  189. function EquipBackpack(s)
  190. Events.EquipBackpack:FireServer(s)
  191. EquipedBackpack = s
  192. end
  193.  
  194. function EquipTool(s)
  195. local get = nil
  196. repeat
  197. get = MyPack:FindFirstChild(s) or MyChar:FindFirstChild(s)
  198. wait()
  199. until get ~= nil
  200. if get.Parent == MyPack then
  201. get.Parent = MyChar
  202. end
  203.  
  204. return get
  205. end
  206.  
  207. function Rebirth()
  208. print("REBIRTH COST: " .. tostring(RebirthPrice))
  209. if MyCoins.Value >= RebirthPrice then
  210. local tool = MyChar:FindFirstChild(EquipedShovel)
  211. if tool then
  212. tool.Parent = MyPack
  213. end
  214. Events.Rebirth:FireServer()
  215. repeat
  216. wait()
  217. until MyPack:FindFirstChild("Bucket")
  218. EquipedShovel = "Bucket"
  219. EquipedBackpack = "Starterpack"
  220. end
  221. end
  222.  
  223. function BuyAndEquip(Fuck_My_Shitty_Coding)
  224. if Fuck_My_Shitty_Coding == nil then
  225. if EquipedShovel ~= TargetedShovel then
  226. for i, v in next, ShovelIds do
  227. if v == TargetedShovel then
  228. local Owned = Events.CheckIfOwned:InvokeServer(TargetedShovel)
  229. if not Owned then
  230. if MyCoins.Value >= ShovelPrice[i] then
  231. BuyItem(v)
  232. Events.EquipShovel:FireServer(TargetedShovel)
  233. EquipedShovel = TargetedShovel
  234. EquipTool(v)
  235. break
  236. end
  237. else
  238. Events.EquipShovel:FireServer(TargetedShovel)
  239. EquipedShovel = TargetedShovel
  240. end
  241. end
  242. end
  243. end
  244.  
  245. if EquipedBackpack ~= TargetedBackpack then
  246. for i, v in next, BackpackIds do
  247. if v == TargetedBackpack then
  248. if MyCoins.Value >= BackpackPrices[i] then
  249. BuyItem(v)
  250. EquipBackpack(v)
  251. break
  252. end
  253. end
  254. end
  255. end
  256. else
  257. for i, v in next, ShovelIds do
  258. if v == Fuck_My_Shitty_Coding then
  259. local Owned = Events.CheckIfOwned:InvokeServer(Fuck_My_Shitty_Coding)
  260. if not Owned then
  261. if MyCoins.Value >= ShovelPrice[i] then
  262. BuyItem(v)
  263. EquipTool(Fuck_My_Shitty_Coding)
  264. EquipedShovel = Fuck_My_Shitty_Coding
  265. break
  266. end
  267. else
  268. Events.EquipShovel:FireServer(Fuck_My_Shitty_Coding)
  269. EquipedShovel = Fuck_My_Shitty_Coding
  270. end
  271. end
  272. end
  273.  
  274. for i, v in next, BackpackIds do
  275. if v == Fuck_My_Shitty_Coding then
  276. EquipBackpack(Fuck_My_Shitty_Coding)
  277. if MyCoins.Value >= BackpackPrices[i] then
  278. BuyItem(v)
  279. EquipBackpack(Fuck_My_Shitty_Coding)
  280. break
  281. end
  282. end
  283. end
  284. end
  285. end
  286.  
  287. function MineSandBlock(Block, Tool)
  288. local FindHealth = Block:FindFirstChild("Health")
  289. if Block.Material == Enum.Material.Plastic then
  290. Tool.RemoteClick:FireServer(Block)
  291. return
  292. end
  293.  
  294. if FindHealth then
  295. local MyTor = MyChar:FindFirstChild("HumanoidRootPart")
  296. if not MyTor then return end
  297. Tool.Parent = MyChar
  298. if BackpackFull() then
  299. MyTor.CFrame = CFrame.new(Vector3.new(-33.463, 20.608, -13.357))
  300. return
  301. end
  302. MyTor.CFrame = Block.CFrame
  303. Tool.RemoteClick:FireServer(Block)
  304. else
  305. return
  306. end
  307. end
  308.  
  309. function GetPrice(s)
  310. local price = 0
  311.  
  312. for i, v in next, BackpackIds do
  313. if v == s then
  314. return BackpackPrices[i]
  315. end
  316. end
  317.  
  318. for i, v in next, ShovelIds do
  319. if v == s then
  320. return ShovelPrice[i]
  321. end
  322. end
  323.  
  324. return price
  325. end
  326.  
  327. function Init()
  328. -- Objects
  329.  
  330. local TreasureHuntGUI = Instance.new("ScreenGui")
  331. local MainFrame = Instance.new("Frame")
  332. local title = Instance.new("TextLabel")
  333. local design = Instance.new("Frame")
  334. local buttons = Instance.new("Frame")
  335. local toolSelectionFrame = Instance.new("Frame")
  336. local toolSelectionText = Instance.new("TextLabel")
  337. local toolSelectionRight_B = Instance.new("ImageButton")
  338. local toolSelectionLeft_B = Instance.new("ImageButton")
  339. local backpackSelectionFrame = Instance.new("Frame")
  340. local backpackSelectionText = Instance.new("TextLabel")
  341. local backpackSelectionRight_B = Instance.new("ImageButton")
  342. local backpackSelectionLeft_B = Instance.new("ImageButton")
  343. local buyequiptoolbackpack_B = Instance.new("TextButton")
  344. local toggleautomine_B = Instance.new("TextButton")
  345. local toggleantiafk_B = Instance.new("TextButton")
  346.  
  347. -- Properties
  348.  
  349. TreasureHuntGUI.Name = "TreasureHuntGUI"
  350. TreasureHuntGUI.Parent = CoreGui
  351. TreasureHuntGUI.ResetOnSpawn = false
  352.  
  353. MainFrame.Name = "MainFrame"
  354. MainFrame.Parent = TreasureHuntGUI
  355. MainFrame.Active = true
  356. MainFrame.BackgroundColor3 = Color3.new(0.164706, 0.172549, 0.192157)
  357. MainFrame.BorderSizePixel = 0
  358. MainFrame.Draggable = true
  359. MainFrame.LayoutOrder = 2
  360. MainFrame.Position = UDim2.new(0.5, -150, 0.5, -105)
  361. MainFrame.Size = UDim2.new(0, 300, 0, 247)
  362.  
  363. title.Name = "title"
  364. title.Parent = MainFrame
  365. title.BackgroundColor3 = Color3.new(1, 1, 1)
  366. title.BackgroundTransparency = 1
  367. title.Size = UDim2.new(1, 0, 0, 40)
  368. title.Font = Enum.Font.SourceSansBold
  369. title.Text = "Treasure Hunt Simulator Exploit \nby Racist Dolphin#5199"
  370. title.TextColor3 = Color3.new(1, 1, 1)
  371. title.TextSize = 14
  372.  
  373. design.Name = "design"
  374. design.Parent = MainFrame
  375. design.BackgroundColor3 = Color3.new(0.258824, 0.270588, 0.286275)
  376. design.BorderSizePixel = 0
  377. design.Position = UDim2.new(0, 5, 0, 45)
  378. design.Size = UDim2.new(1, -10, 0, 1)
  379.  
  380. buttons.Name = "buttons"
  381. buttons.Parent = MainFrame
  382. buttons.BackgroundColor3 = Color3.new(1, 1, 1)
  383. buttons.BackgroundTransparency = 1
  384. buttons.Position = UDim2.new(0, 10, 0, 50)
  385. buttons.Size = UDim2.new(1, -20, 1, -60)
  386.  
  387. toolSelectionFrame.Name = "toolSelectionFrame"
  388. toolSelectionFrame.Parent = buttons
  389. toolSelectionFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  390. toolSelectionFrame.BackgroundTransparency = 1
  391. toolSelectionFrame.Size = UDim2.new(1, 0, 0, 40)
  392.  
  393. toolSelectionText.Name = "toolSelectionText"
  394. toolSelectionText.Parent = toolSelectionFrame
  395. toolSelectionText.BackgroundColor3 = Color3.new(0.282353, 0.294118, 0.317647)
  396. toolSelectionText.BorderSizePixel = 0
  397. toolSelectionText.Position = UDim2.new(0.5, -85, 0.5, -15)
  398. toolSelectionText.Size = UDim2.new(0, 170, 0, 30)
  399. toolSelectionText.Font = Enum.Font.SourceSans
  400. toolSelectionText.Text = EquipedShovel .. "($" .. tostring(GetPrice(EquipedShovel)) .. ")"
  401. toolSelectionText.TextColor3 = Color3.new(0.694118, 0.705882, 0.72549)
  402. toolSelectionText.TextSize = 18
  403.  
  404. toolSelectionRight_B.Name = "toolSelectionRight_B"
  405. toolSelectionRight_B.Parent = toolSelectionFrame
  406. toolSelectionRight_B.BackgroundColor3 = Color3.new(1, 1, 1)
  407. toolSelectionRight_B.BackgroundTransparency = 1
  408. toolSelectionRight_B.Position = UDim2.new(1, -35, 0.5, -15)
  409. toolSelectionRight_B.Size = UDim2.new(0, 30, 0, 30)
  410. toolSelectionRight_B.Image = "rbxassetid://1380733312"
  411. toolSelectionRight_B.ImageColor3 = Color3.new(0.494118, 0.501961, 0.517647)
  412.  
  413. toolSelectionLeft_B.Name = "toolSelectionLeft_B"
  414. toolSelectionLeft_B.Parent = toolSelectionFrame
  415. toolSelectionLeft_B.BackgroundColor3 = Color3.new(1, 1, 1)
  416. toolSelectionLeft_B.BackgroundTransparency = 1
  417. toolSelectionLeft_B.Position = UDim2.new(0, 5, 0.5, -15)
  418. toolSelectionLeft_B.Size = UDim2.new(0, 30, 0, 30)
  419. toolSelectionLeft_B.Image = "rbxassetid://1380733079"
  420. toolSelectionLeft_B.ImageColor3 = Color3.new(0.494118, 0.501961, 0.517647)
  421.  
  422. backpackSelectionFrame.Name = "backpackSelectionFrame"
  423. backpackSelectionFrame.Parent = buttons
  424. backpackSelectionFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  425. backpackSelectionFrame.BackgroundTransparency = 1
  426. backpackSelectionFrame.Position = UDim2.new(0, 0, 0, 40)
  427. backpackSelectionFrame.Size = UDim2.new(1, 0, 0, 40)
  428.  
  429. backpackSelectionText.Name = "backpackSelectionText"
  430. backpackSelectionText.Parent = backpackSelectionFrame
  431. backpackSelectionText.BackgroundColor3 = Color3.new(0.282353, 0.294118, 0.317647)
  432. backpackSelectionText.BorderSizePixel = 0
  433. backpackSelectionText.Position = UDim2.new(0.5, -85, 0.5, -15)
  434. backpackSelectionText.Size = UDim2.new(0, 170, 0, 30)
  435. backpackSelectionText.Font = Enum.Font.SourceSans
  436. backpackSelectionText.Text = EquipedBackpack .. "($" .. tostring(GetPrice(EquipedBackpack)) .. ")"
  437. backpackSelectionText.TextColor3 = Color3.new(0.694118, 0.705882, 0.72549)
  438. backpackSelectionText.TextSize = 18
  439.  
  440. backpackSelectionRight_B.Name = "backpackSelectionRight_B"
  441. backpackSelectionRight_B.Parent = backpackSelectionFrame
  442. backpackSelectionRight_B.BackgroundColor3 = Color3.new(1, 1, 1)
  443. backpackSelectionRight_B.BackgroundTransparency = 1
  444. backpackSelectionRight_B.Position = UDim2.new(1, -35, 0.5, -15)
  445. backpackSelectionRight_B.Size = UDim2.new(0, 30, 0, 30)
  446. backpackSelectionRight_B.Image = "rbxassetid://1380733312"
  447. backpackSelectionRight_B.ImageColor3 = Color3.new(0.494118, 0.501961, 0.517647)
  448.  
  449. backpackSelectionLeft_B.Name = "backpackSelectionLeft_B"
  450. backpackSelectionLeft_B.Parent = backpackSelectionFrame
  451. backpackSelectionLeft_B.BackgroundColor3 = Color3.new(1, 1, 1)
  452. backpackSelectionLeft_B.BackgroundTransparency = 1
  453. backpackSelectionLeft_B.Position = UDim2.new(0, 5, 0.5, -15)
  454. backpackSelectionLeft_B.Size = UDim2.new(0, 30, 0, 30)
  455. backpackSelectionLeft_B.Image = "rbxassetid://1380733079"
  456. backpackSelectionLeft_B.ImageColor3 = Color3.new(0.494118, 0.501961, 0.517647)
  457.  
  458. buyequiptoolbackpack_B.Name = "buyequiptoolbackpack_B"
  459. buyequiptoolbackpack_B.Parent = buttons
  460. buyequiptoolbackpack_B.BackgroundColor3 = Color3.new(0.282353, 0.294118, 0.317647)
  461. buyequiptoolbackpack_B.BorderSizePixel = 0
  462. buyequiptoolbackpack_B.Position = UDim2.new(0, 0, 0, 85)
  463. buyequiptoolbackpack_B.Size = UDim2.new(1, 0, 0, 30)
  464. buyequiptoolbackpack_B.Font = Enum.Font.SourceSansBold
  465. buyequiptoolbackpack_B.Text = "Buy & Equip Shovel"
  466. buyequiptoolbackpack_B.TextColor3 = Color3.new(0.694118, 0.705882, 0.72549)
  467. buyequiptoolbackpack_B.TextSize = 18
  468.  
  469. toggleautomine_B.Name = "toggleautomine_B"
  470. toggleautomine_B.Parent = buttons
  471. toggleautomine_B.BackgroundColor3 = Color3.new(0.282353, 0.294118, 0.317647)
  472. toggleautomine_B.BorderSizePixel = 0
  473. toggleautomine_B.Position = UDim2.new(0, 0, 0, 120)
  474. toggleautomine_B.Size = UDim2.new(1, 0, 0, 30)
  475. toggleautomine_B.Font = Enum.Font.SourceSansBold
  476. toggleautomine_B.Text = "Toggle Auto Mine"
  477. toggleautomine_B.TextColor3 = Color3.new(0.694118, 0.705882, 0.72549)
  478. toggleautomine_B.TextSize = 18
  479.  
  480. toggleantiafk_B.Name = "toggleantiafk_B"
  481. toggleantiafk_B.Parent = buttons
  482. toggleantiafk_B.BackgroundColor3 = Color3.new(0.282353, 0.294118, 0.317647)
  483. toggleantiafk_B.BorderSizePixel = 0
  484. toggleantiafk_B.Position = UDim2.new(0, 0, 0, 155)
  485. toggleantiafk_B.Size = UDim2.new(1, 0, 0, 30)
  486. toggleantiafk_B.Font = Enum.Font.SourceSansBold
  487. toggleantiafk_B.Text = "Toggle Anti-AFK"
  488. toggleantiafk_B.TextColor3 = Color3.new(0.694118, 0.705882, 0.72549)
  489. toggleantiafk_B.TextSize = 18
  490.  
  491. toolSelectionRight_B.MouseButton1Click:connect(function()
  492. if SelectedShovel == "Bucket" then
  493. SelectedShovel = "Spade"
  494. elseif SelectedShovel == "Spade" then
  495. SelectedShovel = "Toy Shovel"
  496. elseif SelectedShovel == "Toy Shovel" then
  497. SelectedShovel = "Small Shovel"
  498. elseif SelectedShovel == "Small Shovel" then
  499. SelectedShovel = "Medium Shovel"
  500. elseif SelectedShovel == "Medium Shovel" then
  501. SelectedShovel = "Large Shovel"
  502. elseif SelectedShovel == "Large Shovel" then
  503. SelectedShovel = "Big Scooper"
  504. elseif SelectedShovel == "Big Scooper" then
  505. SelectedShovel = "Vacuum"
  506. elseif SelectedShovel == "Vacuum" then
  507. SelectedShovel = "Giant Shovel"
  508. elseif SelectedShovel == "Giant Shovel" then
  509. SelectedShovel = "Metal Detector"
  510. elseif SelectedShovel == "Metal Detector" then
  511. SelectedShovel = "Jack Hammer"
  512. elseif SelectedShovel == "Jack Hammer" then
  513. SelectedShovel = "Golden Spoon"
  514. elseif SelectedShovel == "Golden Spoon" then
  515. SelectedShovel = "Dual Scoops"
  516. elseif SelectedShovel == "Dual Scoops" then
  517. SelectedShovel = "Drill"
  518. elseif SelectedShovel == "Drill" then
  519. SelectedShovel = "Bucket"
  520. end
  521.  
  522. toolSelectionText.Text = SelectedShovel .. " ($" .. tostring(GetPrice(SelectedShovel)) .. ")"
  523. end)
  524.  
  525. toolSelectionLeft_B.MouseButton1Click:connect(function()
  526. if SelectedShovel == "Bucket" then
  527. SelectedShovel = "Drill"
  528. elseif SelectedShovel == "Drill" then
  529. SelectedShovel = "Dual Scoops"
  530. elseif SelectedShovel == "Dual Scoops" then
  531. SelectedShovel = "Golden Spoon"
  532. elseif SelectedShovel == "Golden Spoon" then
  533. SelectedShovel = "Jack Hammer"
  534. elseif SelectedShovel == "Jack Hammer" then
  535. SelectedShovel = "Metal Detector"
  536. elseif SelectedShovel == "Metal Detector" then
  537. SelectedShovel = "Giant Shovel"
  538. elseif SelectedShovel == "Giant Shovel" then
  539. SelectedShovel = "Vacuum"
  540. elseif SelectedShovel == "Vacuum" then
  541. SelectedShovel = "Big Scooper"
  542. elseif SelectedShovel == "Big Scooper" then
  543. SelectedShovel = "Large Shovel"
  544. elseif SelectedShovel == "Large Shovel" then
  545. SelectedShovel = "Medium Shovel"
  546. elseif SelectedShovel == "Medium Shovel" then
  547. SelectedShovel = "Small Shovel"
  548. elseif SelectedShovel == "Small Shovel" then
  549. SelectedShovel = "Toy Shovel"
  550. elseif SelectedShovel == "Toy Shovel" then
  551. SelectedShovel = "Spade"
  552. elseif SelectedShovel == "Spade" then
  553. SelectedShovel = "Bucket"
  554. end
  555.  
  556. toolSelectionText.Text = SelectedShovel .. " ($" .. tostring(GetPrice(SelectedShovel)) .. ")"
  557. end)
  558.  
  559. backpackSelectionRight_B.MouseButton1Click:connect(function()
  560. if SelectedBackpack == "Starterpack" then
  561. SelectedBackpack = "Small Bag"
  562. elseif SelectedBackpack == "Small Bag" then
  563. SelectedBackpack = "Medium Bag"
  564. elseif SelectedBackpack == "Medium Bag" then
  565. SelectedBackpack = "Large Bag"
  566. elseif SelectedBackpack == "Large Bag" then
  567. SelectedBackpack = "XL Bag"
  568. elseif SelectedBackpack == "XL Bag" then
  569. SelectedBackpack = "XXL Bag"
  570. elseif SelectedBackpack == "XXL Bag" then
  571. SelectedBackpack = "Sand Safe"
  572. elseif SelectedBackpack == "Sand Safe" then
  573. SelectedBackpack = "Sand Vault"
  574. elseif SelectedBackpack == "Sand Vault" then
  575. SelectedBackpack = "Small Canister"
  576. elseif SelectedBackpack == "Small Canister" then
  577. SelectedBackpack = "Medium Canister"
  578. elseif SelectedBackpack == "Medium Canister" then
  579. SelectedBackpack = "Large Canister"
  580. elseif SelectedBackpack == "Large Canister" then
  581. SelectedBackpack = "Duffle Bag"
  582. elseif SelectedBackpack == "Duffle Bag" then
  583. SelectedBackpack = "Dual Canister"
  584. elseif SelectedBackpack == "Dual Canister" then
  585. SelectedBackpack = "Giant Canister"
  586. elseif SelectedBackpack == "Giant Canister" then
  587. SelectedBackpack = "Magical Fanny Pack"
  588. elseif SelectedBackpack == "Magical Fanny Pack" then
  589. SelectedBackpack = "Starterpack"
  590. end
  591.  
  592. backpackSelectionText.Text = SelectedBackpack .. "($" .. tostring(GetPrice(SelectedBackpack)) .. ")"
  593. end)
  594.  
  595. backpackSelectionLeft_B.MouseButton1Click:connect(function()
  596. if SelectedBackpack == "Starterpack" then
  597. SelectedBackpack = "Magical Fanny Pack"
  598. elseif SelectedBackpack == "Magical Fanny Pack" then
  599. SelectedBackpack = "Giant Canister"
  600. elseif SelectedBackpack == "Giant Canister" then
  601. SelectedBackpack = "Dual Canister"
  602. elseif SelectedBackpack == "Dual Canister" then
  603. SelectedBackpack = "Duffle Bag"
  604. elseif SelectedBackpack == "Duffle Bag" then
  605. SelectedBackpack = "Large Canister"
  606. elseif SelectedBackpack == "Large Canister" then
  607. SelectedBackpack = "Medium Canister"
  608. elseif SelectedBackpack == "Medium Canister" then
  609. SelectedBackpack = "Small Canister"
  610. elseif SelectedBackpack == "Small Canister" then
  611. SelectedBackpack = "Sand Vault"
  612. elseif SelectedBackpack == "Sand Vault" then
  613. SelectedBackpack = "Sand Safe"
  614. elseif SelectedBackpack == "Sand Safe" then
  615. SelectedBackpack = "XXL Bag"
  616. elseif SelectedBackpack == "XXL Bag" then
  617. SelectedBackpack = "XL Bag"
  618. elseif SelectedBackpack == "XL Bag" then
  619. SelectedBackpack = "Large Bag"
  620. elseif SelectedBackpack == "Large Bag" then
  621. SelectedBackpack = "Medium Bag"
  622. elseif SelectedBackpack == "Medium Bag" then
  623. SelectedBackpack = "Small Bag"
  624. elseif SelectedBackpack == "Small Bag" then
  625. SelectedBackpack = "Starterpack"
  626. end
  627.  
  628. backpackSelectionText.Text = SelectedBackpack .. "($" .. tostring(GetPrice(SelectedBackpack)) .. ")"
  629. end)
  630.  
  631. buyequiptoolbackpack_B.MouseButton1Click:connect(function()
  632. BuyAndEquip(SelectedBackpack)
  633. BuyAndEquip(SelectedShovel)
  634. end)
  635.  
  636. toggleautomine_B.MouseButton1Click:connect(function()
  637. On = not On
  638. if On then
  639. toggleautomine_B.BackgroundColor3 = Color3.new(0, 116 / 255, 4 / 255)
  640. else
  641. local MyTor = MyChar:FindFirstChild("HumanoidRootPart")
  642. if MyTor then
  643. MyTor.CFrame = CFrame.new(Vector3.new(-33.463, 20.608, -13.357))
  644. end
  645. toggleautomine_B.BackgroundColor3 = Color3.new(72 / 255, 75 / 255, 81 / 255)
  646. end
  647. end)
  648.  
  649. toggleantiafk_B.MouseButton1Click:connect(function()
  650. AntiAFK = not AntiAFK
  651. if AntiAFK then
  652. toggleantiafk_B.BackgroundColor3 = Color3.new(0, 116 / 255, 4 / 255)
  653. else
  654. toggleantiafk_B.BackgroundColor3 = Color3.new(72 / 255, 75 / 255, 81 / 255)
  655. end
  656. end)
  657. end
  658.  
  659. Init()
  660.  
  661. local succ, out = coroutine.resume(coroutine.create(function()
  662. while true do
  663. if AntiAFK then
  664. pcall(function() keypress(0x57) keyrelease(0x57) end)
  665. end
  666.  
  667. RebirthPrice = math.floor((MyRebirths.Value ^ 1.5 + 1) * 500000)
  668. MyChar = MyPlr.Character
  669. if On and not workspace.Settings.Closed.Value then
  670. if Autorebirth then
  671. Rebirth()
  672. end
  673.  
  674. if EquipedShovel ~= TargetedShovel or EquipedBackpack ~= TargetedBackpack then
  675. BuyAndEquip()
  676. end
  677.  
  678. local tool = EquipTool(EquipedShovel)
  679. if tool ~= nil then
  680. local sandblock = GetBestSandBlock()
  681. MineSandBlock(sandblock, tool)
  682. end
  683. elseif On and workspace.Settings.Closed.Value then
  684. local tool = EquipTool(EquipedShovel)
  685. if tool == nil then return end
  686. if tool.Parent == MyChar then
  687. tool.Parent = MyPack
  688. end
  689.  
  690. return
  691. end
  692. wait(0.25)
  693. end
  694. end))
  695. if not succ then
  696. error(out)
  697. end
  698.  
  699. workspace.SandBlocks.ChildAdded:connect(function(Obj)
  700. local tool = EquipTool(EquipedShovel)
  701. if workspace.Settings.Closed.Value then
  702. if tool.Parent == MyChar then
  703. tool.Parent = MyPack
  704. end
  705.  
  706. return
  707. end
  708.  
  709. tool.Parent = MyChar
  710. if Obj.Material == Enum.Material.Plastic then
  711. MineSandBlock(Obj, tool)
  712. end
  713. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement