Advertisement
nassimelb1

Untitled

Mar 18th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.15 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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement