Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Plrs = game:GetService("Players")
- local Run = game:GetService("RunService")
- local Rep = game:GetService("ReplicatedStorage")
- local Input = game:GetService("UserInputService")
- local CoreGui = game:GetService("CoreGui")
- local MyPlr = Plrs.LocalPlayer
- local MyGui = MyPlr.PlayerGui
- local MyPack = MyPlr.Backpack
- local MyCoins = MyPlr.leaderstats.Coins
- local MyChar = MyPlr.Character
- local Events = Rep.Events
- local On = false
- local DigSiteAboutToCollapse = false
- local Shovels = {
- ["Bucket"] = nil,
- ["Spade"] = 100,
- ["Toy Shovel"] = 250,
- ["Small Shovel"] = 600,
- ["Medium Shovel"] = 2100,
- ["Large Shovel"] = 8800,
- ["Big Scooper"] = 24000,
- ["Vacuum"] = 65000,
- ["Giant Shovel"] = 250000,
- ["Metal Detector"] = 500000,
- ["Jack Hammer"] = 3000000,
- ["Golden Spoon"] = 10000000
- }
- local Backpacks = {
- ["Starterpack"] = nil,
- ["Small Bag"] = 150,
- ["Medium Bag"] = 375,
- ["Large Bag"] = 900,
- ["XL Bag"] = 3150,
- ["XXL Bag"] = 13200,
- ["Sand Safe"] = 150000,
- ["Sand Vault"] = 350000,
- ["Small Canister"] = 1500000,
- ["Medium Canister"] = 4000000,
- ["Large Canister"] = 8000000,
- ["Infinite"] = nil
- }
- local EquipedShovel = "Bucket"
- local EquipedBackpack = "Starterpack"
- local SelectedShovel = "Bucket"
- local SelectedBackpack = "Starterpack"
- function BackpackFull()
- local FindBackpack = MyChar:FindFirstChild(EquipedBackpack)
- if FindBackpack then
- local GUI = FindBackpack.Counter.SurfaceGui.TextLabel
- local CurSand, MaxSand = string.match(GUI.Text, "(%d+)/(%d+)")
- if tonumber(CurSand) >= tonumber(MaxSand) then
- print("BACKPACK FULL")
- return true
- else
- return false
- end
- end
- return false
- end
- function EquipTool(Tool)
- local Find = MyPack:FindFirstChild(Tool)
- if not Find then
- Events.EquipShovel:FireServer(Tool)
- Find = MyPack:FindFirstChild(Tool)
- if Find then
- Find.Parent = MyChar
- end
- else
- Find.Parent = MyChar
- end
- end
- function EquipBackpack(Item)
- Events.EquipBackpack:FireServer(Item)
- end
- function UnEquipTool(Tool)
- local Find = MyChar:FindFirstChild(Tool)
- if Find then
- Find.Parent = MyPack
- end
- end
- function BuyToolBackpack(Item, IsATool)
- local Table = nil
- if IsATool then Table = Shovels else Table = Backpacks end
- local OwnsItem = Events.CheckIfOwned:InvokeServer(Item)
- if not OwnsItem then
- if IsATool then
- if MyCoins.Value >= Shovels[Item] then
- Events.Checkout:FireServer(Item)
- EquipTool(Item)
- EquipedShovel = Item
- else
- return nil
- end
- else
- if MyCoins.Value >= Backpacks[Item] then
- Events.Checkout:FireServer(Item)
- EquipBackpack(Item)
- else
- return nil
- end
- end
- else
- if IsATool then
- EquipTool(Item)
- EquipedShovel = Item
- else
- EquipBackpack(Item)
- end
- end
- end
- function MineSandBlock(Block, Tool)
- local FindHealth = Block:FindFirstChild("Health")
- if Block.Material == Enum.Material.Plastic then
- Tool.RemoteClick:FireServer(Block)
- end
- if FindHealth then
- for i = 0, (FindHealth.Value + 1) do
- Tool.Parent = MyChar
- if BackpackFull() then break end
- Tool.RemoteClick:FireServer(Block)
- Run.RenderStepped:wait()
- end
- else
- return
- end
- end
- function Init()
- -- Objects
- local TreasureHuntGUI = Instance.new("ScreenGui")
- local MainFrame = Instance.new("Frame")
- local title = Instance.new("TextLabel")
- local design = Instance.new("Frame")
- local buttons = Instance.new("Frame")
- local toolSelectionFrame = Instance.new("Frame")
- local toolSelectionText = Instance.new("TextLabel")
- local toolSelectionRight_B = Instance.new("ImageButton")
- local toolSelectionLeft_B = Instance.new("ImageButton")
- local backpackSelectionFrame = Instance.new("Frame")
- local backpackSelectionText = Instance.new("TextLabel")
- local backpackSelectionRight_B = Instance.new("ImageButton")
- local backpackSelectionLeft_B = Instance.new("ImageButton")
- local buyequiptoolbackpack_B = Instance.new("TextButton")
- local toggleautomine_B = Instance.new("TextButton")
- -- Properties
- TreasureHuntGUI.Name = "TreasureHuntGUI"
- TreasureHuntGUI.Parent = CoreGui
- TreasureHuntGUI.ResetOnSpawn = false
- MainFrame.Name = "MainFrame"
- MainFrame.Parent = TreasureHuntGUI
- MainFrame.Active = true
- MainFrame.BackgroundColor3 = Color3.new(0.164706, 0.172549, 0.192157)
- MainFrame.BorderSizePixel = 0
- MainFrame.Draggable = true
- MainFrame.LayoutOrder = 2
- MainFrame.Position = UDim2.new(0.5, -150, 0.5, -105)
- MainFrame.Size = UDim2.new(0, 300, 0, 210)
- title.Name = "title"
- title.Parent = MainFrame
- title.BackgroundColor3 = Color3.new(1, 1, 1)
- title.BackgroundTransparency = 1
- title.Size = UDim2.new(1, 0, 0, 40)
- title.Font = Enum.Font.SourceSansBold
- title.Text = "Treasure Hunt Simulator Exploit \nby Racist Dolphin#5199"
- title.TextColor3 = Color3.new(1, 1, 1)
- title.TextSize = 14
- design.Name = "design"
- design.Parent = MainFrame
- design.BackgroundColor3 = Color3.new(0.258824, 0.270588, 0.286275)
- design.BorderSizePixel = 0
- design.Position = UDim2.new(0, 5, 0, 45)
- design.Size = UDim2.new(1, -10, 0, 1)
- buttons.Name = "buttons"
- buttons.Parent = MainFrame
- buttons.BackgroundColor3 = Color3.new(1, 1, 1)
- buttons.BackgroundTransparency = 1
- buttons.Position = UDim2.new(0, 10, 0, 50)
- buttons.Size = UDim2.new(1, -20, 1, -60)
- toolSelectionFrame.Name = "toolSelectionFrame"
- toolSelectionFrame.Parent = buttons
- toolSelectionFrame.BackgroundColor3 = Color3.new(1, 1, 1)
- toolSelectionFrame.BackgroundTransparency = 1
- toolSelectionFrame.Size = UDim2.new(1, 0, 0, 40)
- toolSelectionText.Name = "toolSelectionText"
- toolSelectionText.Parent = toolSelectionFrame
- toolSelectionText.BackgroundColor3 = Color3.new(0.282353, 0.294118, 0.317647)
- toolSelectionText.BorderSizePixel = 0
- toolSelectionText.Position = UDim2.new(0.5, -85, 0.5, -15)
- toolSelectionText.Size = UDim2.new(0, 170, 0, 30)
- toolSelectionText.Font = Enum.Font.SourceSans
- toolSelectionText.Text = SelectedShovel .. " ($" .. tostring(Shovels[SelectedShovel]) .. ")"
- toolSelectionText.TextColor3 = Color3.new(0.694118, 0.705882, 0.72549)
- toolSelectionText.TextSize = 18
- toolSelectionRight_B.Name = "toolSelectionRight_B"
- toolSelectionRight_B.Parent = toolSelectionFrame
- toolSelectionRight_B.BackgroundColor3 = Color3.new(1, 1, 1)
- toolSelectionRight_B.BackgroundTransparency = 1
- toolSelectionRight_B.Position = UDim2.new(1, -35, 0.5, -15)
- toolSelectionRight_B.Size = UDim2.new(0, 30, 0, 30)
- toolSelectionRight_B.Image = "rbxassetid://1380733312"
- toolSelectionRight_B.ImageColor3 = Color3.new(0.494118, 0.501961, 0.517647)
- toolSelectionLeft_B.Name = "toolSelectionLeft_B"
- toolSelectionLeft_B.Parent = toolSelectionFrame
- toolSelectionLeft_B.BackgroundColor3 = Color3.new(1, 1, 1)
- toolSelectionLeft_B.BackgroundTransparency = 1
- toolSelectionLeft_B.Position = UDim2.new(0, 5, 0.5, -15)
- toolSelectionLeft_B.Size = UDim2.new(0, 30, 0, 30)
- toolSelectionLeft_B.Image = "rbxassetid://1380733079"
- toolSelectionLeft_B.ImageColor3 = Color3.new(0.494118, 0.501961, 0.517647)
- backpackSelectionFrame.Name = "backpackSelectionFrame"
- backpackSelectionFrame.Parent = buttons
- backpackSelectionFrame.BackgroundColor3 = Color3.new(1, 1, 1)
- backpackSelectionFrame.BackgroundTransparency = 1
- backpackSelectionFrame.Position = UDim2.new(0, 0, 0, 40)
- backpackSelectionFrame.Size = UDim2.new(1, 0, 0, 40)
- backpackSelectionText.Name = "backpackSelectionText"
- backpackSelectionText.Parent = backpackSelectionFrame
- backpackSelectionText.BackgroundColor3 = Color3.new(0.282353, 0.294118, 0.317647)
- backpackSelectionText.BorderSizePixel = 0
- backpackSelectionText.Position = UDim2.new(0.5, -85, 0.5, -15)
- backpackSelectionText.Size = UDim2.new(0, 170, 0, 30)
- backpackSelectionText.Font = Enum.Font.SourceSans
- backpackSelectionText.Text = SelectedBackpack .. " ($" .. tostring(Backpacks[SelectedBackpack]) .. ")"
- backpackSelectionText.TextColor3 = Color3.new(0.694118, 0.705882, 0.72549)
- backpackSelectionText.TextSize = 18
- backpackSelectionRight_B.Name = "backpackSelectionRight_B"
- backpackSelectionRight_B.Parent = backpackSelectionFrame
- backpackSelectionRight_B.BackgroundColor3 = Color3.new(1, 1, 1)
- backpackSelectionRight_B.BackgroundTransparency = 1
- backpackSelectionRight_B.Position = UDim2.new(1, -35, 0.5, -15)
- backpackSelectionRight_B.Size = UDim2.new(0, 30, 0, 30)
- backpackSelectionRight_B.Image = "rbxassetid://1380733312"
- backpackSelectionRight_B.ImageColor3 = Color3.new(0.494118, 0.501961, 0.517647)
- backpackSelectionLeft_B.Name = "backpackSelectionLeft_B"
- backpackSelectionLeft_B.Parent = backpackSelectionFrame
- backpackSelectionLeft_B.BackgroundColor3 = Color3.new(1, 1, 1)
- backpackSelectionLeft_B.BackgroundTransparency = 1
- backpackSelectionLeft_B.Position = UDim2.new(0, 5, 0.5, -15)
- backpackSelectionLeft_B.Size = UDim2.new(0, 30, 0, 30)
- backpackSelectionLeft_B.Image = "rbxassetid://1380733079"
- backpackSelectionLeft_B.ImageColor3 = Color3.new(0.494118, 0.501961, 0.517647)
- buyequiptoolbackpack_B.Name = "buyequiptoolbackpack_B"
- buyequiptoolbackpack_B.Parent = buttons
- buyequiptoolbackpack_B.BackgroundColor3 = Color3.new(0.282353, 0.294118, 0.317647)
- buyequiptoolbackpack_B.BorderSizePixel = 0
- buyequiptoolbackpack_B.Position = UDim2.new(0, 0, 0, 85)
- buyequiptoolbackpack_B.Size = UDim2.new(1, 0, 0, 30)
- buyequiptoolbackpack_B.Font = Enum.Font.SourceSansBold
- buyequiptoolbackpack_B.Text = "Buy & Equip Tool/Backpack"
- buyequiptoolbackpack_B.TextColor3 = Color3.new(0.694118, 0.705882, 0.72549)
- buyequiptoolbackpack_B.TextSize = 18
- toggleautomine_B.Name = "toggleautomine_B"
- toggleautomine_B.Parent = buttons
- toggleautomine_B.BackgroundColor3 = Color3.new(0.282353, 0.294118, 0.317647)
- toggleautomine_B.BorderSizePixel = 0
- toggleautomine_B.Position = UDim2.new(0, 0, 0, 120)
- toggleautomine_B.Size = UDim2.new(1, 0, 0, 30)
- toggleautomine_B.Font = Enum.Font.SourceSansBold
- toggleautomine_B.Text = "Toggle Auto Mine"
- toggleautomine_B.TextColor3 = Color3.new(0.694118, 0.705882, 0.72549)
- toggleautomine_B.TextSize = 18
- toolSelectionRight_B.MouseButton1Click:connect(function()
- if SelectedShovel == "Bucket" then
- SelectedShovel = "Spade"
- elseif SelectedShovel == "Spade" then
- SelectedShovel = "Toy Shovel"
- elseif SelectedShovel == "Toy Shovel" then
- SelectedShovel = "Small Shovel"
- elseif SelectedShovel == "Small Shovel" then
- SelectedShovel = "Medium Shovel"
- elseif SelectedShovel == "Medium Shovel" then
- SelectedShovel = "Large Shovel"
- elseif SelectedShovel == "Large Shovel" then
- SelectedShovel = "Big Scooper"
- elseif SelectedShovel == "Big Scooper" then
- SelectedShovel = "Vacuum"
- elseif SelectedShovel == "Vacuum" then
- SelectedShovel = "Giant Shovel"
- elseif SelectedShovel == "Giant Shovel" then
- SelectedShovel = "Metal Detector"
- elseif SelectedShovel == "Metal Detector" then
- SelectedShovel = "Jack Hammer"
- elseif SelectedShovel == "Jack Hammer" then
- SelectedShovel = "Golden Spoon"
- elseif SelectedShovel == "Golden Spoon" then
- SelectedShovel = "Bucket"
- end
- toolSelectionText.Text = SelectedShovel .. " ($" .. tostring(Shovels[SelectedShovel]) .. ")"
- end)
- toolSelectionLeft_B.MouseButton1Click:connect(function()
- if SelectedShovel == "Bucket" then
- SelectedShovel = "Golden Spoon"
- elseif SelectedShovel == "Golden Spoon" then
- SelectedShovel = "Jack Hammer"
- elseif SelectedShovel == "Jack Hammer" then
- SelectedShovel = "Metal Detector"
- elseif SelectedShovel == "Metal Detector" then
- SelectedShovel = "Giant Shovel"
- elseif SelectedShovel == "Giant Shovel" then
- SelectedShovel = "Vacuum"
- elseif SelectedShovel == "Vacuum" then
- SelectedShovel = "Big Scooper"
- elseif SelectedShovel == "Big Scooper" then
- SelectedShovel = "Large Shovel"
- elseif SelectedShovel == "Large Shovel" then
- SelectedShovel = "Medium Shovel"
- elseif SelectedShovel == "Medium Shovel" then
- SelectedShovel = "Small Shovel"
- elseif SelectedShovel == "Small Shovel" then
- SelectedShovel = "Toy Shovel"
- elseif SelectedShovel == "Toy Shovel" then
- SelectedShovel = "Spade"
- elseif SelectedShovel == "Spade" then
- SelectedShovel = "Bucket"
- end
- toolSelectionText.Text = SelectedShovel .. " ($" .. tostring(Shovels[SelectedShovel]) .. ")"
- end)
- backpackSelectionRight_B.MouseButton1Click:connect(function()
- if SelectedBackpack == "Starterpack" then
- SelectedBackpack = "Small Bag"
- elseif SelectedBackpack == "Small Bag" then
- SelectedBackpack = "Medium Bag"
- elseif SelectedBackpack == "Medium Bag" then
- SelectedBackpack = "Large Bag"
- elseif SelectedBackpack == "Large Bag" then
- SelectedBackpack = "XL Bag"
- elseif SelectedBackpack == "XL Bag" then
- SelectedBackpack = "XXL Bag"
- elseif SelectedBackpack == "XXL Bag" then
- SelectedBackpack = "Sand Safe"
- elseif SelectedBackpack == "Sand Safe" then
- SelectedBackpack = "Sand Vault"
- elseif SelectedBackpack == "Sand Vault" then
- SelectedBackpack = "Small Canister"
- elseif SelectedBackpack == "Small Canister" then
- SelectedBackpack = "Medium Canister"
- elseif SelectedBackpack == "Medium Canister" then
- SelectedBackpack = "Large Canister"
- elseif SelectedBackpack == "Large Canister" then
- SelectedBackpack = "Infinite"
- elseif SelectedBackpack == "Infinite" then
- SelectedBackpack = "Starterpack"
- end
- backpackSelectionText.Text = SelectedBackpack .. " ($" .. tostring(Backpacks[SelectedBackpack]) .. ")"
- end)
- backpackSelectionLeft_B.MouseButton1Click:connect(function()
- if SelectedBackpack == "Starterpack" then
- SelectedBackpack = "Infinite"
- elseif SelectedBackpack == "Infinite" then
- SelectedBackpack = "Large Canister"
- elseif SelectedBackpack == "Large Canister" then
- SelectedBackpack = "Medium Canister"
- elseif SelectedBackpack == "Medium Canister" then
- SelectedBackpack = "Small Canister"
- elseif SelectedBackpack == "Small Canister" then
- SelectedBackpack = "Sand Vault"
- elseif SelectedBackpack == "Sand Vault" then
- SelectedBackpack = "Sand Safe"
- elseif SelectedBackpack == "Sand Safe" then
- SelectedBackpack = "XXL Bag"
- elseif SelectedBackpack == "XXL Bag" then
- SelectedBackpack = "XL Bag"
- elseif SelectedBackpack == "XL Bag" then
- SelectedBackpack = "Large Bag"
- elseif SelectedBackpack == "Large Bag" then
- SelectedBackpack = "Medium Bag"
- elseif SelectedBackpack == "Medium Bag" then
- SelectedBackpack = "Small Bag"
- elseif SelectedBackpack == "Small Bag" then
- SelectedBackpack = "Starterpack"
- end
- backpackSelectionText.Text = SelectedBackpack .. " ($" .. tostring(Backpacks[SelectedBackpack]) .. ")"
- end)
- buyequiptoolbackpack_B.MouseButton1Click:connect(function()
- BuyToolBackpack(SelectedShovel, true)
- BuyToolBackpack(SelectedBackpack, false)
- end)
- toggleautomine_B.MouseButton1Click:connect(function()
- On = not On
- if On then
- toggleautomine_B.BackgroundColor3 = Color3.new(0, 116 / 255, 4 / 255)
- else
- toggleautomine_B.BackgroundColor3 = Color3.new(72 / 255, 75 / 255, 81 / 255)
- end
- end)
- end
- Init()
- Run:BindToRenderStep("HAX", Enum.RenderPriority.First.Value - 1, function()
- MyChar = MyPlr.Character
- if not On or workspace.Settings.Closed.Value then return end
- local MyTor = MyChar:FindFirstChild("HumanoidRootPart")
- if MyTor then
- MyTor.CFrame = CFrame.new(Vector3.new(-33.463, 20.608, -13.357))
- end
- local Tool = MyChar:FindFirstChild(EquipedShovel)
- if not Tool then
- EquipTool(EquipedShovel)
- else
- local PickABlock = workspace.SandBlocks:GetChildren()[math.random(1, #workspace.SandBlocks:GetChildren())]
- if PickABlock.Material == Enum.Material.Plastic or PickABlock.Material == Enum.Material.Sand then
- MineSandBlock(PickABlock, Tool)
- end
- end
- end)
- workspace.SandBlocks.ChildAdded:connect(function(Obj)
- if not On or workspace.Settings.Closed.Value then return end
- local Tool = MyChar:FindFirstChild(EquipedShovel)
- if not Tool then
- EquipTool(EquipedShovel)
- else
- if Obj.Material == Enum.Material.Plastic then
- MineSandBlock(Obj, Tool)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement