Advertisement
Guest User

treasher hunt simulator roblox

a guest
Mar 18th, 2018
1,513
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.26 KB | None | 0 0
  1. --[[
  2. Scripting by: @Racist Dolphin#5199
  3. Gui by: REQUESTED TO BE HIDDEN
  4.  
  5. NOTE: STILL IN BETA, YOU MAY ENCOUNTER PROBLEMS.
  6.  
  7. How to use:
  8. 1) Execute with a level 7 LUA NOT LUA-C exploit.
  9. 2) Select the Tool and Backpack you have equipped. It will automatically buy the tool and backpack if you don't own it.
  10. 2) That's it.
  11. ]]
  12.  
  13. local Plrs = game:GetService("Players")
  14. local Run = game:GetService("RunService")
  15. local Rep = game:GetService("ReplicatedStorage")
  16. local Input = game:GetService("UserInputService")
  17. local CoreGui = game:GetService("CoreGui")
  18. local MyPlr = Plrs.LocalPlayer
  19. local MyGui = MyPlr.PlayerGui
  20. local MyPack = MyPlr.Backpack
  21. local MyCoins = MyPlr.leaderstats.Coins
  22. local MyChar = MyPlr.Character
  23. local Events = Rep.Events
  24.  
  25. local On = false
  26. local DigSiteAboutToCollapse = false
  27.  
  28. local Shovels = {
  29. ["Bucket"] = nil,
  30. ["Spade"] = 100,
  31. ["Toy Shovel"] = 250,
  32. ["Small Shovel"] = 600,
  33. ["Medium Shovel"] = 2100,
  34. ["Large Shovel"] = 8800,
  35. ["Big Scooper"] = 24000,
  36. ["Vacuum"] = 65000,
  37. ["Giant Shovel"] = 250000,
  38. ["Metal Detector"] = 500000,
  39. ["Jack Hammer"] = 3000000,
  40. ["Golden Spoon"] = 10000000
  41. }
  42.  
  43. local Backpacks = {
  44. ["Starterpack"] = nil,
  45. ["Small Bag"] = 150,
  46. ["Medium Bag"] = 375,
  47. ["Large Bag"] = 900,
  48. ["XL Bag"] = 3150,
  49. ["XXL Bag"] = 13200,
  50. ["Sand Safe"] = 150000,
  51. ["Sand Vault"] = 350000,
  52. ["Small Canister"] = 1500000,
  53. ["Medium Canister"] = 4000000,
  54. ["Large Canister"] = 8000000,
  55. ["Infinite"] = nil
  56. }
  57.  
  58. local EquipedShovel = "Bucket"
  59. local EquipedBackpack = "Starterpack"
  60.  
  61. local SelectedShovel = "Bucket"
  62. local SelectedBackpack = "Starterpack"
  63.  
  64.  
  65.  
  66. function BackpackFull()
  67. local FindBackpack = MyChar:FindFirstChild(EquipedBackpack)
  68. if FindBackpack then
  69. local GUI = FindBackpack.Counter.SurfaceGui.TextLabel
  70. local CurSand, MaxSand = string.match(GUI.Text, "(%d+)/(%d+)")
  71. if tonumber(CurSand) >= tonumber(MaxSand) then
  72. print("BACKPACK FULL")
  73. return true
  74. else
  75. return false
  76. end
  77. end
  78.  
  79. return false
  80. end
  81.  
  82.  
  83. function EquipTool(Tool)
  84. local Find = MyPack:FindFirstChild(Tool)
  85. if not Find then
  86. Events.EquipShovel:FireServer(Tool)
  87. Find = MyPack:FindFirstChild(Tool)
  88. if Find then
  89. Find.Parent = MyChar
  90. end
  91. else
  92. Find.Parent = MyChar
  93. end
  94. end
  95.  
  96. function EquipBackpack(Item)
  97. Events.EquipBackpack:FireServer(Item)
  98. end
  99.  
  100. function UnEquipTool(Tool)
  101. local Find = MyChar:FindFirstChild(Tool)
  102. if Find then
  103. Find.Parent = MyPack
  104. end
  105. end
  106.  
  107. function BuyToolBackpack(Item, IsATool)
  108. local Table = nil
  109.  
  110. if IsATool then Table = Shovels else Table = Backpacks end
  111.  
  112. local OwnsItem = Events.CheckIfOwned:InvokeServer(Item)
  113. if not OwnsItem then
  114. if IsATool then
  115. if MyCoins.Value >= Shovels[Item] then
  116. Events.Checkout:FireServer(Item)
  117. EquipTool(Item)
  118. EquipedShovel = Item
  119. else
  120. return nil
  121. end
  122. else
  123. if MyCoins.Value >= Backpacks[Item] then
  124. Events.Checkout:FireServer(Item)
  125. EquipBackpack(Item)
  126. else
  127. return nil
  128. end
  129. end
  130. else
  131. if IsATool then
  132. EquipTool(Item)
  133. EquipedShovel = Item
  134. else
  135. EquipBackpack(Item)
  136. end
  137. end
  138. end
  139.  
  140. function MineSandBlock(Block, Tool)
  141. local FindHealth = Block:FindFirstChild("Health")
  142. if Block.Material == Enum.Material.Plastic then
  143. Tool.RemoteClick:FireServer(Block)
  144. end
  145.  
  146. if FindHealth then
  147. for i = 0, (FindHealth.Value + 1) do
  148. Tool.Parent = MyChar
  149. if BackpackFull() then break end
  150. Tool.RemoteClick:FireServer(Block)
  151. Run.RenderStepped:wait()
  152. end
  153. else
  154. return
  155. end
  156. end
  157.  
  158. function Init()
  159. -- Objects
  160.  
  161. local TreasureHuntGUI = Instance.new("ScreenGui")
  162. local MainFrame = Instance.new("Frame")
  163. local title = Instance.new("TextLabel")
  164. local design = Instance.new("Frame")
  165. local buttons = Instance.new("Frame")
  166. local toolSelectionFrame = Instance.new("Frame")
  167. local toolSelectionText = Instance.new("TextLabel")
  168. local toolSelectionRight_B = Instance.new("ImageButton")
  169. local toolSelectionLeft_B = Instance.new("ImageButton")
  170. local backpackSelectionFrame = Instance.new("Frame")
  171. local backpackSelectionText = Instance.new("TextLabel")
  172. local backpackSelectionRight_B = Instance.new("ImageButton")
  173. local backpackSelectionLeft_B = Instance.new("ImageButton")
  174. local buyequiptoolbackpack_B = Instance.new("TextButton")
  175. local toggleautomine_B = Instance.new("TextButton")
  176.  
  177. -- Properties
  178.  
  179. TreasureHuntGUI.Name = "TreasureHuntGUI"
  180. TreasureHuntGUI.Parent = CoreGui
  181. TreasureHuntGUI.ResetOnSpawn = false
  182.  
  183. MainFrame.Name = "MainFrame"
  184. MainFrame.Parent = TreasureHuntGUI
  185. MainFrame.Active = true
  186. MainFrame.BackgroundColor3 = Color3.new(0.164706, 0.172549, 0.192157)
  187. MainFrame.BorderSizePixel = 0
  188. MainFrame.Draggable = true
  189. MainFrame.LayoutOrder = 2
  190. MainFrame.Position = UDim2.new(0.5, -150, 0.5, -105)
  191. MainFrame.Size = UDim2.new(0, 300, 0, 210)
  192.  
  193. title.Name = "title"
  194. title.Parent = MainFrame
  195. title.BackgroundColor3 = Color3.new(1, 1, 1)
  196. title.BackgroundTransparency = 1
  197. title.Size = UDim2.new(1, 0, 0, 40)
  198. title.Font = Enum.Font.SourceSansBold
  199. title.Text = "Treasure Hunt Simulator Exploit \nby Racist Dolphin#5199"
  200. title.TextColor3 = Color3.new(1, 1, 1)
  201. title.TextSize = 14
  202.  
  203. design.Name = "design"
  204. design.Parent = MainFrame
  205. design.BackgroundColor3 = Color3.new(0.258824, 0.270588, 0.286275)
  206. design.BorderSizePixel = 0
  207. design.Position = UDim2.new(0, 5, 0, 45)
  208. design.Size = UDim2.new(1, -10, 0, 1)
  209.  
  210. buttons.Name = "buttons"
  211. buttons.Parent = MainFrame
  212. buttons.BackgroundColor3 = Color3.new(1, 1, 1)
  213. buttons.BackgroundTransparency = 1
  214. buttons.Position = UDim2.new(0, 10, 0, 50)
  215. buttons.Size = UDim2.new(1, -20, 1, -60)
  216.  
  217. toolSelectionFrame.Name = "toolSelectionFrame"
  218. toolSelectionFrame.Parent = buttons
  219. toolSelectionFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  220. toolSelectionFrame.BackgroundTransparency = 1
  221. toolSelectionFrame.Size = UDim2.new(1, 0, 0, 40)
  222.  
  223. toolSelectionText.Name = "toolSelectionText"
  224. toolSelectionText.Parent = toolSelectionFrame
  225. toolSelectionText.BackgroundColor3 = Color3.new(0.282353, 0.294118, 0.317647)
  226. toolSelectionText.BorderSizePixel = 0
  227. toolSelectionText.Position = UDim2.new(0.5, -85, 0.5, -15)
  228. toolSelectionText.Size = UDim2.new(0, 170, 0, 30)
  229. toolSelectionText.Font = Enum.Font.SourceSans
  230. toolSelectionText.Text = SelectedShovel .. " ($" .. tostring(Shovels[SelectedShovel]) .. ")"
  231. toolSelectionText.TextColor3 = Color3.new(0.694118, 0.705882, 0.72549)
  232. toolSelectionText.TextSize = 18
  233.  
  234. toolSelectionRight_B.Name = "toolSelectionRight_B"
  235. toolSelectionRight_B.Parent = toolSelectionFrame
  236. toolSelectionRight_B.BackgroundColor3 = Color3.new(1, 1, 1)
  237. toolSelectionRight_B.BackgroundTransparency = 1
  238. toolSelectionRight_B.Position = UDim2.new(1, -35, 0.5, -15)
  239. toolSelectionRight_B.Size = UDim2.new(0, 30, 0, 30)
  240. toolSelectionRight_B.Image = "rbxassetid://1380733312"
  241. toolSelectionRight_B.ImageColor3 = Color3.new(0.494118, 0.501961, 0.517647)
  242.  
  243. toolSelectionLeft_B.Name = "toolSelectionLeft_B"
  244. toolSelectionLeft_B.Parent = toolSelectionFrame
  245. toolSelectionLeft_B.BackgroundColor3 = Color3.new(1, 1, 1)
  246. toolSelectionLeft_B.BackgroundTransparency = 1
  247. toolSelectionLeft_B.Position = UDim2.new(0, 5, 0.5, -15)
  248. toolSelectionLeft_B.Size = UDim2.new(0, 30, 0, 30)
  249. toolSelectionLeft_B.Image = "rbxassetid://1380733079"
  250. toolSelectionLeft_B.ImageColor3 = Color3.new(0.494118, 0.501961, 0.517647)
  251.  
  252. backpackSelectionFrame.Name = "backpackSelectionFrame"
  253. backpackSelectionFrame.Parent = buttons
  254. backpackSelectionFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  255. backpackSelectionFrame.BackgroundTransparency = 1
  256. backpackSelectionFrame.Position = UDim2.new(0, 0, 0, 40)
  257. backpackSelectionFrame.Size = UDim2.new(1, 0, 0, 40)
  258.  
  259. backpackSelectionText.Name = "backpackSelectionText"
  260. backpackSelectionText.Parent = backpackSelectionFrame
  261. backpackSelectionText.BackgroundColor3 = Color3.new(0.282353, 0.294118, 0.317647)
  262. backpackSelectionText.BorderSizePixel = 0
  263. backpackSelectionText.Position = UDim2.new(0.5, -85, 0.5, -15)
  264. backpackSelectionText.Size = UDim2.new(0, 170, 0, 30)
  265. backpackSelectionText.Font = Enum.Font.SourceSans
  266. backpackSelectionText.Text = SelectedBackpack .. " ($" .. tostring(Backpacks[SelectedBackpack]) .. ")"
  267. backpackSelectionText.TextColor3 = Color3.new(0.694118, 0.705882, 0.72549)
  268. backpackSelectionText.TextSize = 18
  269.  
  270. backpackSelectionRight_B.Name = "backpackSelectionRight_B"
  271. backpackSelectionRight_B.Parent = backpackSelectionFrame
  272. backpackSelectionRight_B.BackgroundColor3 = Color3.new(1, 1, 1)
  273. backpackSelectionRight_B.BackgroundTransparency = 1
  274. backpackSelectionRight_B.Position = UDim2.new(1, -35, 0.5, -15)
  275. backpackSelectionRight_B.Size = UDim2.new(0, 30, 0, 30)
  276. backpackSelectionRight_B.Image = "rbxassetid://1380733312"
  277. backpackSelectionRight_B.ImageColor3 = Color3.new(0.494118, 0.501961, 0.517647)
  278.  
  279. backpackSelectionLeft_B.Name = "backpackSelectionLeft_B"
  280. backpackSelectionLeft_B.Parent = backpackSelectionFrame
  281. backpackSelectionLeft_B.BackgroundColor3 = Color3.new(1, 1, 1)
  282. backpackSelectionLeft_B.BackgroundTransparency = 1
  283. backpackSelectionLeft_B.Position = UDim2.new(0, 5, 0.5, -15)
  284. backpackSelectionLeft_B.Size = UDim2.new(0, 30, 0, 30)
  285. backpackSelectionLeft_B.Image = "rbxassetid://1380733079"
  286. backpackSelectionLeft_B.ImageColor3 = Color3.new(0.494118, 0.501961, 0.517647)
  287.  
  288. buyequiptoolbackpack_B.Name = "buyequiptoolbackpack_B"
  289. buyequiptoolbackpack_B.Parent = buttons
  290. buyequiptoolbackpack_B.BackgroundColor3 = Color3.new(0.282353, 0.294118, 0.317647)
  291. buyequiptoolbackpack_B.BorderSizePixel = 0
  292. buyequiptoolbackpack_B.Position = UDim2.new(0, 0, 0, 85)
  293. buyequiptoolbackpack_B.Size = UDim2.new(1, 0, 0, 30)
  294. buyequiptoolbackpack_B.Font = Enum.Font.SourceSansBold
  295. buyequiptoolbackpack_B.Text = "Buy & Equip Tool/Backpack"
  296. buyequiptoolbackpack_B.TextColor3 = Color3.new(0.694118, 0.705882, 0.72549)
  297. buyequiptoolbackpack_B.TextSize = 18
  298.  
  299. toggleautomine_B.Name = "toggleautomine_B"
  300. toggleautomine_B.Parent = buttons
  301. toggleautomine_B.BackgroundColor3 = Color3.new(0.282353, 0.294118, 0.317647)
  302. toggleautomine_B.BorderSizePixel = 0
  303. toggleautomine_B.Position = UDim2.new(0, 0, 0, 120)
  304. toggleautomine_B.Size = UDim2.new(1, 0, 0, 30)
  305. toggleautomine_B.Font = Enum.Font.SourceSansBold
  306. toggleautomine_B.Text = "Toggle Auto Mine"
  307. toggleautomine_B.TextColor3 = Color3.new(0.694118, 0.705882, 0.72549)
  308. toggleautomine_B.TextSize = 18
  309.  
  310. toolSelectionRight_B.MouseButton1Click:connect(function()
  311. if SelectedShovel == "Bucket" then
  312. SelectedShovel = "Spade"
  313. elseif SelectedShovel == "Spade" then
  314. SelectedShovel = "Toy Shovel"
  315. elseif SelectedShovel == "Toy Shovel" then
  316. SelectedShovel = "Small Shovel"
  317. elseif SelectedShovel == "Small Shovel" then
  318. SelectedShovel = "Medium Shovel"
  319. elseif SelectedShovel == "Medium Shovel" then
  320. SelectedShovel = "Large Shovel"
  321. elseif SelectedShovel == "Large Shovel" then
  322. SelectedShovel = "Big Scooper"
  323. elseif SelectedShovel == "Big Scooper" then
  324. SelectedShovel = "Vacuum"
  325. elseif SelectedShovel == "Vacuum" then
  326. SelectedShovel = "Giant Shovel"
  327. elseif SelectedShovel == "Giant Shovel" then
  328. SelectedShovel = "Metal Detector"
  329. elseif SelectedShovel == "Metal Detector" then
  330. SelectedShovel = "Jack Hammer"
  331. elseif SelectedShovel == "Jack Hammer" then
  332. SelectedShovel = "Golden Spoon"
  333. elseif SelectedShovel == "Golden Spoon" then
  334. SelectedShovel = "Bucket"
  335. end
  336.  
  337. toolSelectionText.Text = SelectedShovel .. " ($" .. tostring(Shovels[SelectedShovel]) .. ")"
  338. end)
  339.  
  340. toolSelectionLeft_B.MouseButton1Click:connect(function()
  341. if SelectedShovel == "Bucket" then
  342. SelectedShovel = "Golden Spoon"
  343. elseif SelectedShovel == "Golden Spoon" then
  344. SelectedShovel = "Jack Hammer"
  345. elseif SelectedShovel == "Jack Hammer" then
  346. SelectedShovel = "Metal Detector"
  347. elseif SelectedShovel == "Metal Detector" then
  348. SelectedShovel = "Giant Shovel"
  349. elseif SelectedShovel == "Giant Shovel" then
  350. SelectedShovel = "Vacuum"
  351. elseif SelectedShovel == "Vacuum" then
  352. SelectedShovel = "Big Scooper"
  353. elseif SelectedShovel == "Big Scooper" then
  354. SelectedShovel = "Large Shovel"
  355. elseif SelectedShovel == "Large Shovel" then
  356. SelectedShovel = "Medium Shovel"
  357. elseif SelectedShovel == "Medium Shovel" then
  358. SelectedShovel = "Small Shovel"
  359. elseif SelectedShovel == "Small Shovel" then
  360. SelectedShovel = "Toy Shovel"
  361. elseif SelectedShovel == "Toy Shovel" then
  362. SelectedShovel = "Spade"
  363. elseif SelectedShovel == "Spade" then
  364. SelectedShovel = "Bucket"
  365. end
  366.  
  367. toolSelectionText.Text = SelectedShovel .. " ($" .. tostring(Shovels[SelectedShovel]) .. ")"
  368. end)
  369.  
  370. backpackSelectionRight_B.MouseButton1Click:connect(function()
  371. if SelectedBackpack == "Starterpack" then
  372. SelectedBackpack = "Small Bag"
  373. elseif SelectedBackpack == "Small Bag" then
  374. SelectedBackpack = "Medium Bag"
  375. elseif SelectedBackpack == "Medium Bag" then
  376. SelectedBackpack = "Large Bag"
  377. elseif SelectedBackpack == "Large Bag" then
  378. SelectedBackpack = "XL Bag"
  379. elseif SelectedBackpack == "XL Bag" then
  380. SelectedBackpack = "XXL Bag"
  381. elseif SelectedBackpack == "XXL Bag" then
  382. SelectedBackpack = "Sand Safe"
  383. elseif SelectedBackpack == "Sand Safe" then
  384. SelectedBackpack = "Sand Vault"
  385. elseif SelectedBackpack == "Sand Vault" then
  386. SelectedBackpack = "Small Canister"
  387. elseif SelectedBackpack == "Small Canister" then
  388. SelectedBackpack = "Medium Canister"
  389. elseif SelectedBackpack == "Medium Canister" then
  390. SelectedBackpack = "Large Canister"
  391. elseif SelectedBackpack == "Large Canister" then
  392. SelectedBackpack = "Infinite"
  393. elseif SelectedBackpack == "Infinite" then
  394. SelectedBackpack = "Starterpack"
  395. end
  396.  
  397. backpackSelectionText.Text = SelectedBackpack .. " ($" .. tostring(Backpacks[SelectedBackpack]) .. ")"
  398. end)
  399.  
  400. backpackSelectionLeft_B.MouseButton1Click:connect(function()
  401. if SelectedBackpack == "Starterpack" then
  402. SelectedBackpack = "Infinite"
  403. elseif SelectedBackpack == "Infinite" then
  404. SelectedBackpack = "Large Canister"
  405. elseif SelectedBackpack == "Large Canister" then
  406. SelectedBackpack = "Medium Canister"
  407. elseif SelectedBackpack == "Medium Canister" then
  408. SelectedBackpack = "Small Canister"
  409. elseif SelectedBackpack == "Small Canister" then
  410. SelectedBackpack = "Sand Vault"
  411. elseif SelectedBackpack == "Sand Vault" then
  412. SelectedBackpack = "Sand Safe"
  413. elseif SelectedBackpack == "Sand Safe" then
  414. SelectedBackpack = "XXL Bag"
  415. elseif SelectedBackpack == "XXL Bag" then
  416. SelectedBackpack = "XL Bag"
  417. elseif SelectedBackpack == "XL Bag" then
  418. SelectedBackpack = "Large Bag"
  419. elseif SelectedBackpack == "Large Bag" then
  420. SelectedBackpack = "Medium Bag"
  421. elseif SelectedBackpack == "Medium Bag" then
  422. SelectedBackpack = "Small Bag"
  423. elseif SelectedBackpack == "Small Bag" then
  424. SelectedBackpack = "Starterpack"
  425. end
  426.  
  427. backpackSelectionText.Text = SelectedBackpack .. " ($" .. tostring(Backpacks[SelectedBackpack]) .. ")"
  428. end)
  429.  
  430. buyequiptoolbackpack_B.MouseButton1Click:connect(function()
  431. BuyToolBackpack(SelectedShovel, true)
  432. BuyToolBackpack(SelectedBackpack, false)
  433. end)
  434.  
  435. toggleautomine_B.MouseButton1Click:connect(function()
  436. On = not On
  437. if On then
  438. toggleautomine_B.BackgroundColor3 = Color3.new(0, 116 / 255, 4 / 255)
  439. else
  440. toggleautomine_B.BackgroundColor3 = Color3.new(72 / 255, 75 / 255, 81 / 255)
  441. end
  442. end)
  443. end
  444.  
  445. Init()
  446.  
  447. Run:BindToRenderStep("HAX", Enum.RenderPriority.First.Value - 1, function()
  448. MyChar = MyPlr.Character
  449. if not On or workspace.Settings.Closed.Value then return end
  450.  
  451. local MyTor = MyChar:FindFirstChild("HumanoidRootPart")
  452. if MyTor then
  453. MyTor.CFrame = CFrame.new(Vector3.new(-33.463, 20.608, -13.357))
  454. end
  455.  
  456. local Tool = MyChar:FindFirstChild(EquipedShovel)
  457. if not Tool then
  458. EquipTool(EquipedShovel)
  459. else
  460. local PickABlock = workspace.SandBlocks:GetChildren()[math.random(1, #workspace.SandBlocks:GetChildren())]
  461. if PickABlock.Material == Enum.Material.Plastic or PickABlock.Material == Enum.Material.Sand then
  462. MineSandBlock(PickABlock, Tool)
  463. end
  464. end
  465. end)
  466.  
  467. workspace.SandBlocks.ChildAdded:connect(function(Obj)
  468. if not On or workspace.Settings.Closed.Value then return end
  469.  
  470. local Tool = MyChar:FindFirstChild(EquipedShovel)
  471. if not Tool then
  472. EquipTool(EquipedShovel)
  473. else
  474. if Obj.Material == Enum.Material.Plastic then
  475. MineSandBlock(Obj, Tool)
  476. end
  477. end
  478. end)
  479. RAW Paste Data
  480.  
  481. --[[
  482. Scripting by: @Racist Dolphin#5199
  483. Gui by: REQUESTED TO BE HIDDEN
  484.  
  485. NOTE: STILL IN BETA, YOU MAY ENCOUNTER PROBLEMS.
  486.  
  487. How to use:
  488. 1) Execute with a level 7 LUA NOT LUA-C exploit.
  489. 2) Select the Tool and Backpack you have equipped. It will automatically buy the tool and backpack if you don't own it.
  490. 2) That's it.
  491. ]]
  492.  
  493. local Plrs = game:GetService("Players")
  494. local Run = game:GetService("RunService")
  495. local Rep = game:GetService("ReplicatedStorage")
  496. local Input = game:GetService("UserInputService")
  497. local CoreGui = game:GetService("CoreGui")
  498. local MyPlr = Plrs.LocalPlayer
  499. local MyGui = MyPlr.PlayerGui
  500. local MyPack = MyPlr.Backpack
  501. local MyCoins = MyPlr.leaderstats.Coins
  502. local MyChar = MyPlr.Character
  503. local Events = Rep.Events
  504.  
  505. local On = false
  506. local DigSiteAboutToCollapse = false
  507.  
  508. local Shovels = {
  509. ["Bucket"] = nil,
  510. ["Spade"] = 100,
  511. ["Toy Shovel"] = 250,
  512. ["Small Shovel"] = 600,
  513. ["Medium Shovel"] = 2100,
  514. ["Large Shovel"] = 8800,
  515. ["Big Scooper"] = 24000,
  516. ["Vacuum"] = 65000,
  517. ["Giant Shovel"] = 250000,
  518. ["Metal Detector"] = 500000,
  519. ["Jack Hammer"] = 3000000,
  520. ["Golden Spoon"] = 10000000
  521. }
  522.  
  523. local Backpacks = {
  524. ["Starterpack"] = nil,
  525. ["Small Bag"] = 150,
  526. ["Medium Bag"] = 375,
  527. ["Large Bag"] = 900,
  528. ["XL Bag"] = 3150,
  529. ["XXL Bag"] = 13200,
  530. ["Sand Safe"] = 150000,
  531. ["Sand Vault"] = 350000,
  532. ["Small Canister"] = 1500000,
  533. ["Medium Canister"] = 4000000,
  534. ["Large Canister"] = 8000000,
  535. ["Infinite"] = nil
  536. }
  537.  
  538. local EquipedShovel = "Bucket"
  539. local EquipedBackpack = "Starterpack"
  540.  
  541. local SelectedShovel = "Bucket"
  542. local SelectedBackpack = "Starterpack"
  543.  
  544.  
  545.  
  546. function BackpackFull()
  547. local FindBackpack = MyChar:FindFirstChild(EquipedBackpack)
  548. if FindBackpack then
  549. local GUI = FindBackpack.Counter.SurfaceGui.TextLabel
  550. local CurSand, MaxSand = string.match(GUI.Text, "(%d+)/(%d+)")
  551. if tonumber(CurSand) >= tonumber(MaxSand) then
  552. print("BACKPACK FULL")
  553. return true
  554. else
  555. return false
  556. end
  557. end
  558.  
  559. return false
  560. end
  561.  
  562.  
  563. function EquipTool(Tool)
  564. local Find = MyPack:FindFirstChild(Tool)
  565. if not Find then
  566. Events.EquipShovel:FireServer(Tool)
  567. Find = MyPack:FindFirstChild(Tool)
  568. if Find then
  569. Find.Parent = MyChar
  570. end
  571. else
  572. Find.Parent = MyChar
  573. end
  574. end
  575.  
  576. function EquipBackpack(Item)
  577. Events.EquipBackpack:FireServer(Item)
  578. end
  579.  
  580. function UnEquipTool(Tool)
  581. local Find = MyChar:FindFirstChild(Tool)
  582. if Find then
  583. Find.Parent = MyPack
  584. end
  585. end
  586.  
  587. function BuyToolBackpack(Item, IsATool)
  588. local Table = nil
  589.  
  590. if IsATool then Table = Shovels else Table = Backpacks end
  591.  
  592. local OwnsItem = Events.CheckIfOwned:InvokeServer(Item)
  593. if not OwnsItem then
  594. if IsATool then
  595. if MyCoins.Value >= Shovels[Item] then
  596. Events.Checkout:FireServer(Item)
  597. EquipTool(Item)
  598. EquipedShovel = Item
  599. else
  600. return nil
  601. end
  602. else
  603. if MyCoins.Value >= Backpacks[Item] then
  604. Events.Checkout:FireServer(Item)
  605. EquipBackpack(Item)
  606. else
  607. return nil
  608. end
  609. end
  610. else
  611. if IsATool then
  612. EquipTool(Item)
  613. EquipedShovel = Item
  614. else
  615. EquipBackpack(Item)
  616. end
  617. end
  618. end
  619.  
  620. function MineSandBlock(Block, Tool)
  621. local FindHealth = Block:FindFirstChild("Health")
  622. if Block.Material == Enum.Material.Plastic then
  623. Tool.RemoteClick:FireServer(Block)
  624. end
  625.  
  626. if FindHealth then
  627. for i = 0, (FindHealth.Value + 1) do
  628. Tool.Parent = MyChar
  629. if BackpackFull() then break end
  630. Tool.RemoteClick:FireServer(Block)
  631. Run.RenderStepped:wait()
  632. end
  633. else
  634. return
  635. end
  636. end
  637.  
  638. function Init()
  639. -- Objects
  640.  
  641. local TreasureHuntGUI = Instance.new("ScreenGui")
  642. local MainFrame = Instance.new("Frame")
  643. local title = Instance.new("TextLabel")
  644. local design = Instance.new("Frame")
  645. local buttons = Instance.new("Frame")
  646. local toolSelectionFrame = Instance.new("Frame")
  647. local toolSelectionText = Instance.new("TextLabel")
  648. local toolSelectionRight_B = Instance.new("ImageButton")
  649. local toolSelectionLeft_B = Instance.new("ImageButton")
  650. local backpackSelectionFrame = Instance.new("Frame")
  651. local backpackSelectionText = Instance.new("TextLabel")
  652. local backpackSelectionRight_B = Instance.new("ImageButton")
  653. local backpackSelectionLeft_B = Instance.new("ImageButton")
  654. local buyequiptoolbackpack_B = Instance.new("TextButton")
  655. local toggleautomine_B = Instance.new("TextButton")
  656.  
  657. -- Properties
  658.  
  659. TreasureHuntGUI.Name = "TreasureHuntGUI"
  660. TreasureHuntGUI.Parent = CoreGui
  661. TreasureHuntGUI.ResetOnSpawn = false
  662.  
  663. MainFrame.Name = "MainFrame"
  664. MainFrame.Parent = TreasureHuntGUI
  665. MainFrame.Active = true
  666. MainFrame.BackgroundColor3 = Color3.new(0.164706, 0.172549, 0.192157)
  667. MainFrame.BorderSizePixel = 0
  668. MainFrame.Draggable = true
  669. MainFrame.LayoutOrder = 2
  670. MainFrame.Position = UDim2.new(0.5, -150, 0.5, -105)
  671. MainFrame.Size = UDim2.new(0, 300, 0, 210)
  672.  
  673. title.Name = "title"
  674. title.Parent = MainFrame
  675. title.BackgroundColor3 = Color3.new(1, 1, 1)
  676. title.BackgroundTransparency = 1
  677. title.Size = UDim2.new(1, 0, 0, 40)
  678. title.Font = Enum.Font.SourceSansBold
  679. title.Text = "Treasure Hunt Simulator Exploit \nby Racist Dolphin#5199"
  680. title.TextColor3 = Color3.new(1, 1, 1)
  681. title.TextSize = 14
  682.  
  683. design.Name = "design"
  684. design.Parent = MainFrame
  685. design.BackgroundColor3 = Color3.new(0.258824, 0.270588, 0.286275)
  686. design.BorderSizePixel = 0
  687. design.Position = UDim2.new(0, 5, 0, 45)
  688. design.Size = UDim2.new(1, -10, 0, 1)
  689.  
  690. buttons.Name = "buttons"
  691. buttons.Parent = MainFrame
  692. buttons.BackgroundColor3 = Color3.new(1, 1, 1)
  693. buttons.BackgroundTransparency = 1
  694. buttons.Position = UDim2.new(0, 10, 0, 50)
  695. buttons.Size = UDim2.new(1, -20, 1, -60)
  696.  
  697. toolSelectionFrame.Name = "toolSelectionFrame"
  698. toolSelectionFrame.Parent = buttons
  699. toolSelectionFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  700. toolSelectionFrame.BackgroundTransparency = 1
  701. toolSelectionFrame.Size = UDim2.new(1, 0, 0, 40)
  702.  
  703. toolSelectionText.Name = "toolSelectionText"
  704. toolSelectionText.Parent = toolSelectionFrame
  705. toolSelectionText.BackgroundColor3 = Color3.new(0.282353, 0.294118, 0.317647)
  706. toolSelectionText.BorderSizePixel = 0
  707. toolSelectionText.Position = UDim2.new(0.5, -85, 0.5, -15)
  708. toolSelectionText.Size = UDim2.new(0, 170, 0, 30)
  709. toolSelectionText.Font = Enum.Font.SourceSans
  710. toolSelectionText.Text = SelectedShovel .. " ($" .. tostring(Shovels[SelectedShovel]) .. ")"
  711. toolSelectionText.TextColor3 = Color3.new(0.694118, 0.705882, 0.72549)
  712. toolSelectionText.TextSize = 18
  713.  
  714. toolSelectionRight_B.Name = "toolSelectionRight_B"
  715. toolSelectionRight_B.Parent = toolSelectionFrame
  716. toolSelectionRight_B.BackgroundColor3 = Color3.new(1, 1, 1)
  717. toolSelectionRight_B.BackgroundTransparency = 1
  718. toolSelectionRight_B.Position = UDim2.new(1, -35, 0.5, -15)
  719. toolSelectionRight_B.Size = UDim2.new(0, 30, 0, 30)
  720. toolSelectionRight_B.Image = "rbxassetid://1380733312"
  721. toolSelectionRight_B.ImageColor3 = Color3.new(0.494118, 0.501961, 0.517647)
  722.  
  723. toolSelectionLeft_B.Name = "toolSelectionLeft_B"
  724. toolSelectionLeft_B.Parent = toolSelectionFrame
  725. toolSelectionLeft_B.BackgroundColor3 = Color3.new(1, 1, 1)
  726. toolSelectionLeft_B.BackgroundTransparency = 1
  727. toolSelectionLeft_B.Position = UDim2.new(0, 5, 0.5, -15)
  728. toolSelectionLeft_B.Size = UDim2.new(0, 30, 0, 30)
  729. toolSelectionLeft_B.Image = "rbxassetid://1380733079"
  730. toolSelectionLeft_B.ImageColor3 = Color3.new(0.494118, 0.501961, 0.517647)
  731.  
  732. backpackSelectionFrame.Name = "backpackSelectionFrame"
  733. backpackSelectionFrame.Parent = buttons
  734. backpackSelectionFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  735. backpackSelectionFrame.BackgroundTransparency = 1
  736. backpackSelectionFrame.Position = UDim2.new(0, 0, 0, 40)
  737. backpackSelectionFrame.Size = UDim2.new(1, 0, 0, 40)
  738.  
  739. backpackSelectionText.Name = "backpackSelectionText"
  740. backpackSelectionText.Parent = backpackSelectionFrame
  741. backpackSelectionText.BackgroundColor3 = Color3.new(0.282353, 0.294118, 0.317647)
  742. backpackSelectionText.BorderSizePixel = 0
  743. backpackSelectionText.Position = UDim2.new(0.5, -85, 0.5, -15)
  744. backpackSelectionText.Size = UDim2.new(0, 170, 0, 30)
  745. backpackSelectionText.Font = Enum.Font.SourceSans
  746. backpackSelectionText.Text = SelectedBackpack .. " ($" .. tostring(Backpacks[SelectedBackpack]) .. ")"
  747. backpackSelectionText.TextColor3 = Color3.new(0.694118, 0.705882, 0.72549)
  748. backpackSelectionText.TextSize = 18
  749.  
  750. backpackSelectionRight_B.Name = "backpackSelectionRight_B"
  751. backpackSelectionRight_B.Parent = backpackSelectionFrame
  752. backpackSelectionRight_B.BackgroundColor3 = Color3.new(1, 1, 1)
  753. backpackSelectionRight_B.BackgroundTransparency = 1
  754. backpackSelectionRight_B.Position = UDim2.new(1, -35, 0.5, -15)
  755. backpackSelectionRight_B.Size = UDim2.new(0, 30, 0, 30)
  756. backpackSelectionRight_B.Image = "rbxassetid://1380733312"
  757. backpackSelectionRight_B.ImageColor3 = Color3.new(0.494118, 0.501961, 0.517647)
  758.  
  759. backpackSelectionLeft_B.Name = "backpackSelectionLeft_B"
  760. backpackSelectionLeft_B.Parent = backpackSelectionFrame
  761. backpackSelectionLeft_B.BackgroundColor3 = Color3.new(1, 1, 1)
  762. backpackSelectionLeft_B.BackgroundTransparency = 1
  763. backpackSelectionLeft_B.Position = UDim2.new(0, 5, 0.5, -15)
  764. backpackSelectionLeft_B.Size = UDim2.new(0, 30, 0, 30)
  765. backpackSelectionLeft_B.Image = "rbxassetid://1380733079"
  766. backpackSelectionLeft_B.ImageColor3 = Color3.new(0.494118, 0.501961, 0.517647)
  767.  
  768. buyequiptoolbackpack_B.Name = "buyequiptoolbackpack_B"
  769. buyequiptoolbackpack_B.Parent = buttons
  770. buyequiptoolbackpack_B.BackgroundColor3 = Color3.new(0.282353, 0.294118, 0.317647)
  771. buyequiptoolbackpack_B.BorderSizePixel = 0
  772. buyequiptoolbackpack_B.Position = UDim2.new(0, 0, 0, 85)
  773. buyequiptoolbackpack_B.Size = UDim2.new(1, 0, 0, 30)
  774. buyequiptoolbackpack_B.Font = Enum.Font.SourceSansBold
  775. buyequiptoolbackpack_B.Text = "Buy & Equip Tool/Backpack"
  776. buyequiptoolbackpack_B.TextColor3 = Color3.new(0.694118, 0.705882, 0.72549)
  777. buyequiptoolbackpack_B.TextSize = 18
  778.  
  779. toggleautomine_B.Name = "toggleautomine_B"
  780. toggleautomine_B.Parent = buttons
  781. toggleautomine_B.BackgroundColor3 = Color3.new(0.282353, 0.294118, 0.317647)
  782. toggleautomine_B.BorderSizePixel = 0
  783. toggleautomine_B.Position = UDim2.new(0, 0, 0, 120)
  784. toggleautomine_B.Size = UDim2.new(1, 0, 0, 30)
  785. toggleautomine_B.Font = Enum.Font.SourceSansBold
  786. toggleautomine_B.Text = "Toggle Auto Mine"
  787. toggleautomine_B.TextColor3 = Color3.new(0.694118, 0.705882, 0.72549)
  788. toggleautomine_B.TextSize = 18
  789.  
  790. toolSelectionRight_B.MouseButton1Click:connect(function()
  791. if SelectedShovel == "Bucket" then
  792. SelectedShovel = "Spade"
  793. elseif SelectedShovel == "Spade" then
  794. SelectedShovel = "Toy Shovel"
  795. elseif SelectedShovel == "Toy Shovel" then
  796. SelectedShovel = "Small Shovel"
  797. elseif SelectedShovel == "Small Shovel" then
  798. SelectedShovel = "Medium Shovel"
  799. elseif SelectedShovel == "Medium Shovel" then
  800. SelectedShovel = "Large Shovel"
  801. elseif SelectedShovel == "Large Shovel" then
  802. SelectedShovel = "Big Scooper"
  803. elseif SelectedShovel == "Big Scooper" then
  804. SelectedShovel = "Vacuum"
  805. elseif SelectedShovel == "Vacuum" then
  806. SelectedShovel = "Giant Shovel"
  807. elseif SelectedShovel == "Giant Shovel" then
  808. SelectedShovel = "Metal Detector"
  809. elseif SelectedShovel == "Metal Detector" then
  810. SelectedShovel = "Jack Hammer"
  811. elseif SelectedShovel == "Jack Hammer" then
  812. SelectedShovel = "Golden Spoon"
  813. elseif SelectedShovel == "Golden Spoon" then
  814. SelectedShovel = "Bucket"
  815. end
  816.  
  817. toolSelectionText.Text = SelectedShovel .. " ($" .. tostring(Shovels[SelectedShovel]) .. ")"
  818. end)
  819.  
  820. toolSelectionLeft_B.MouseButton1Click:connect(function()
  821. if SelectedShovel == "Bucket" then
  822. SelectedShovel = "Golden Spoon"
  823. elseif SelectedShovel == "Golden Spoon" then
  824. SelectedShovel = "Jack Hammer"
  825. elseif SelectedShovel == "Jack Hammer" then
  826. SelectedShovel = "Metal Detector"
  827. elseif SelectedShovel == "Metal Detector" then
  828. SelectedShovel = "Giant Shovel"
  829. elseif SelectedShovel == "Giant Shovel" then
  830. SelectedShovel = "Vacuum"
  831. elseif SelectedShovel == "Vacuum" then
  832. SelectedShovel = "Big Scooper"
  833. elseif SelectedShovel == "Big Scooper" then
  834. SelectedShovel = "Large Shovel"
  835. elseif SelectedShovel == "Large Shovel" then
  836. SelectedShovel = "Medium Shovel"
  837. elseif SelectedShovel == "Medium Shovel" then
  838. SelectedShovel = "Small Shovel"
  839. elseif SelectedShovel == "Small Shovel" then
  840. SelectedShovel = "Toy Shovel"
  841. elseif SelectedShovel == "Toy Shovel" then
  842. SelectedShovel = "Spade"
  843. elseif SelectedShovel == "Spade" then
  844. SelectedShovel = "Bucket"
  845. end
  846.  
  847. toolSelectionText.Text = SelectedShovel .. " ($" .. tostring(Shovels[SelectedShovel]) .. ")"
  848. end)
  849.  
  850. backpackSelectionRight_B.MouseButton1Click:connect(function()
  851. if SelectedBackpack == "Starterpack" then
  852. SelectedBackpack = "Small Bag"
  853. elseif SelectedBackpack == "Small Bag" then
  854. SelectedBackpack = "Medium Bag"
  855. elseif SelectedBackpack == "Medium Bag" then
  856. SelectedBackpack = "Large Bag"
  857. elseif SelectedBackpack == "Large Bag" then
  858. SelectedBackpack = "XL Bag"
  859. elseif SelectedBackpack == "XL Bag" then
  860. SelectedBackpack = "XXL Bag"
  861. elseif SelectedBackpack == "XXL Bag" then
  862. SelectedBackpack = "Sand Safe"
  863. elseif SelectedBackpack == "Sand Safe" then
  864. SelectedBackpack = "Sand Vault"
  865. elseif SelectedBackpack == "Sand Vault" then
  866. SelectedBackpack = "Small Canister"
  867. elseif SelectedBackpack == "Small Canister" then
  868. SelectedBackpack = "Medium Canister"
  869. elseif SelectedBackpack == "Medium Canister" then
  870. SelectedBackpack = "Large Canister"
  871. elseif SelectedBackpack == "Large Canister" then
  872. SelectedBackpack = "Infinite"
  873. elseif SelectedBackpack == "Infinite" then
  874. SelectedBackpack = "Starterpack"
  875. end
  876.  
  877. backpackSelectionText.Text = SelectedBackpack .. " ($" .. tostring(Backpacks[SelectedBackpack]) .. ")"
  878. end)
  879.  
  880. backpackSelectionLeft_B.MouseButton1Click:connect(function()
  881. if SelectedBackpack == "Starterpack" then
  882. SelectedBackpack = "Infinite"
  883. elseif SelectedBackpack == "Infinite" then
  884. SelectedBackpack = "Large Canister"
  885. elseif SelectedBackpack == "Large Canister" then
  886. SelectedBackpack = "Medium Canister"
  887. elseif SelectedBackpack == "Medium Canister" then
  888. SelectedBackpack = "Small Canister"
  889. elseif SelectedBackpack == "Small Canister" then
  890. SelectedBackpack = "Sand Vault"
  891. elseif SelectedBackpack == "Sand Vault" then
  892. SelectedBackpack = "Sand Safe"
  893. elseif SelectedBackpack == "Sand Safe" then
  894. SelectedBackpack = "XXL Bag"
  895. elseif SelectedBackpack == "XXL Bag" then
  896. SelectedBackpack = "XL Bag"
  897. elseif SelectedBackpack == "XL Bag" then
  898. SelectedBackpack = "Large Bag"
  899. elseif SelectedBackpack == "Large Bag" then
  900. SelectedBackpack = "Medium Bag"
  901. elseif SelectedBackpack == "Medium Bag" then
  902. SelectedBackpack = "Small Bag"
  903. elseif SelectedBackpack == "Small Bag" then
  904. SelectedBackpack = "Starterpack"
  905. end
  906.  
  907. backpackSelectionText.Text = SelectedBackpack .. " ($" .. tostring(Backpacks[SelectedBackpack]) .. ")"
  908. end)
  909.  
  910. buyequiptoolbackpack_B.MouseButton1Click:connect(function()
  911. BuyToolBackpack(SelectedShovel, true)
  912. BuyToolBackpack(SelectedBackpack, false)
  913. end)
  914.  
  915. toggleautomine_B.MouseButton1Click:connect(function()
  916. On = not On
  917. if On then
  918. toggleautomine_B.BackgroundColor3 = Color3.new(0, 116 / 255, 4 / 255)
  919. else
  920. toggleautomine_B.BackgroundColor3 = Color3.new(72 / 255, 75 / 255, 81 / 255)
  921. end
  922. end)
  923. end
  924.  
  925. Init()
  926.  
  927. Run:BindToRenderStep("HAX", Enum.RenderPriority.First.Value - 1, function()
  928. MyChar = MyPlr.Character
  929. if not On or workspace.Settings.Closed.Value then return end
  930.  
  931. local MyTor = MyChar:FindFirstChild("HumanoidRootPart")
  932. if MyTor then
  933. MyTor.CFrame = CFrame.new(Vector3.new(-33.463, 20.608, -13.357))
  934. end
  935.  
  936. local Tool = MyChar:FindFirstChild(EquipedShovel)
  937. if not Tool then
  938. EquipTool(EquipedShovel)
  939. else
  940. local PickABlock = workspace.SandBlocks:GetChildren()[math.random(1, #workspace.SandBlocks:GetChildren())]
  941. if PickABlock.Material == Enum.Material.Plastic or PickABlock.Material == Enum.Material.Sand then
  942. MineSandBlock(PickABlock, Tool)
  943. end
  944. end
  945. end)
  946.  
  947. workspace.SandBlocks.ChildAdded:connect(function(Obj)
  948. if not On or workspace.Settings.Closed.Value then return end
  949.  
  950. local Tool = MyChar:FindFirstChild(EquipedShovel)
  951. if not Tool then
  952. EquipTool(EquipedShovel)
  953. else
  954. if Obj.Material == Enum.Material.Plastic then
  955. MineSandBlock(Obj, Tool)
  956. end
  957. end
  958. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement