B0NDIAS

Treasure Hunt GUI

Apr 14th, 2019
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.80 KB | None | 0 0
  1. -- Made By alfie30034 . If you are going to put this on your channel do the following instructions.
  2. -- 1: Give credit to Silent18 for making this.
  3. -- 2: Give credit to That Guy Who Makes Stuff for sharing this script (You must have a link to his channel.)
  4. -- 3: Do not take over credit for this. This is made by Silent18.
  5. -- You may get banned for using this. Don't blame anyone but yourself
  6. -- SUBSCRIBE TO THAT GUY WHO MAKES STUFF FOR MORE SCRIPTS
  7.  
  8. local ScreenGui = Instance.new("ScreenGui")
  9. local Frame = Instance.new("Frame")
  10. local Close = Instance.new("TextButton")
  11. local ChestTp = Instance.new("TextButton")
  12. local TextLabel = Instance.new("TextLabel")
  13. local Dig = Instance.new("TextButton")
  14. local TextLabel_2 = Instance.new("TextLabel")
  15. local TextLabel_3 = Instance.new("TextLabel")
  16. local TextLabel_4 = Instance.new("TextLabel")
  17. local Open = Instance.new("TextButton")
  18.  
  19. -- Properties
  20.  
  21. ScreenGui.Parent = game.CoreGui
  22.  
  23. Frame.Parent = ScreenGui
  24. Frame.BackgroundColor3 = Color3.new(0.282353, 0.282353, 0.282353)
  25. Frame.BackgroundTransparency = 0.40000000596046
  26. Frame.Draggable = true
  27. Frame.Position = UDim2.new(0, 440, 0, 350)
  28. Frame.Size = UDim2.new(0, 230, 0, 220)
  29. Frame.Visible = false
  30.  
  31. Close.Name = "Close"
  32. Close.Parent = Frame
  33. Close.BackgroundColor3 = Color3.new(0.337255, 0.333333, 0.337255)
  34. Close.Size = UDim2.new(0, 20, 0, 20)
  35. Close.Font = Enum.Font.SciFi
  36. Close.Text = "X"
  37. Close.TextColor3 = Color3.new(1, 0, 0)
  38. Close.TextScaled = true
  39. Close.TextSize = 14
  40. Close.TextWrapped = true
  41. Close.MouseButton1Click:connect(function()
  42.     if game.CoreGui.ScreenGui.Frame.Visible == true then
  43.        game.CoreGui.ScreenGui.Frame.Visible = false
  44.     end
  45. end)
  46. ChestTp.Name = "Chest Tp"
  47. ChestTp.Parent = Frame
  48. ChestTp.BackgroundColor3 = Color3.new(0, 0, 0)
  49. ChestTp.BackgroundTransparency = 0.40000000596046
  50. ChestTp.Position = UDim2.new(0, 0, 0, 50)
  51. ChestTp.Size = UDim2.new(0, 230, 0, 40)
  52. ChestTp.Font = Enum.Font.SciFi
  53. ChestTp.Text = "Teleport Chest"
  54. ChestTp.TextColor3 = Color3.new(1, 0, 0)
  55. ChestTp.TextScaled = true
  56. ChestTp.TextSize = 14
  57. ChestTp.TextWrapped = true
  58. ChestTp.MouseButton1Click:connect(function()
  59.     while true do
  60. wait(.1)
  61. for _,v in pairs(game.Workspace.SandBlocks:GetChildren()) do
  62. if v:FindFirstChild("BasicChest") or v:FindFirstChild("EpicChest") or v:FindFirstChild("RareChest") then
  63. v.CanCollide = false
  64. v.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame+Vector3.new(math.random(0,0),0,math.random(0,0))
  65. end
  66. end
  67. end
  68. end)
  69. TextLabel.Parent = ChestTp
  70. TextLabel.BackgroundColor3 = Color3.new(0.345098, 0.337255, 0.345098)
  71. TextLabel.BackgroundTransparency = 0.30000001192093
  72. TextLabel.Position = UDim2.new(0, 0, 0, 40)
  73. TextLabel.Size = UDim2.new(0, 230, 0, 20)
  74. TextLabel.Font = Enum.Font.SourceSans
  75. TextLabel.Text = "Credits To Yvu!"
  76. TextLabel.TextColor3 = Color3.new(0, 1, 0)
  77. TextLabel.TextSize = 28
  78.  
  79. Dig.Name = "Dig"
  80. Dig.Parent = Frame
  81. Dig.BackgroundColor3 = Color3.new(0, 0, 0)
  82. Dig.BackgroundTransparency = 0.40000000596046
  83. Dig.Position = UDim2.new(0, 0, 0, 110)
  84. Dig.Size = UDim2.new(0, 230, 0, 40)
  85. Dig.Font = Enum.Font.SciFi
  86. Dig.Text = "Dig Faster!"
  87. Dig.TextColor3 = Color3.new(1, 0, 0)
  88. Dig.TextScaled = true
  89. Dig.TextSize = 14
  90. Dig.TextWrapped = true
  91. Dig.MouseButton1Click:connect(function()
  92.     local Clicking = false
  93. local Mouse = game.Players.LocalPlayer:GetMouse()
  94. local RS = game:GetService("RunService").RenderStepped
  95. _G.digSpeed = 0
  96. local ClicksPerLoop = 5
  97.  
  98. function FindTool()
  99. local found = false
  100. local tool = nil
  101. for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  102. if v.ClassName=="Tool" then
  103. found = true
  104. tool = v
  105. end
  106. end
  107. if found then
  108. return true, tool
  109. end
  110. end
  111.  
  112. function Dig()
  113. local pass, tool = FindTool()
  114. while Clicking and pass do
  115. RS:wait(_G.digSpeed)
  116. if not Mouse.Target:FindFirstChild("Rock") then
  117. for i=1,ClicksPerLoop do
  118. tool.RemoteClick:FireServer(Mouse.Target)
  119. end
  120. end
  121. end
  122. end
  123.  
  124. Mouse.Button1Down:Connect(function()
  125. Clicking = true
  126. Dig()
  127. end)
  128.  
  129. Mouse.Button1Up:Connect(function()
  130. Clicking = false
  131. end)
  132. end)
  133. TextLabel_2.Parent = Dig
  134. TextLabel_2.BackgroundColor3 = Color3.new(0.345098, 0.337255, 0.345098)
  135. TextLabel_2.BackgroundTransparency = 0.30000001192093
  136. TextLabel_2.Position = UDim2.new(0, 0, 0, 40)
  137. TextLabel_2.Size = UDim2.new(0, 230, 0, 20)
  138. TextLabel_2.Font = Enum.Font.SourceSans
  139. TextLabel_2.Text = "Credits To Drstattik! "
  140. TextLabel_2.TextColor3 = Color3.new(0, 1, 0)
  141. TextLabel_2.TextSize = 28
  142.  
  143. TextLabel_3.Parent = Dig
  144. TextLabel_3.BackgroundColor3 = Color3.new(0.345098, 0.337255, 0.345098)
  145. TextLabel_3.BackgroundTransparency = 0.30000001192093
  146. TextLabel_3.Position = UDim2.new(0, 0, 0, 60)
  147. TextLabel_3.Size = UDim2.new(0, 230, 0, 50)
  148. TextLabel_3.Font = Enum.Font.SourceSans
  149. TextLabel_3.Text = "Made By Silent18! Check scripts for more credits!"
  150. TextLabel_3.TextColor3 = Color3.new(0, 0, 1)
  151. TextLabel_3.TextSize = 28
  152.  
  153. TextLabel_4.Parent = Frame
  154. TextLabel_4.BackgroundColor3 = Color3.new(0.337255, 0.329412, 0.337255)
  155. TextLabel_4.BackgroundTransparency = 0.40000000596046
  156. TextLabel_4.Position = UDim2.new(0, 0, 0, 20)
  157. TextLabel_4.Size = UDim2.new(0, 230, 0, 30)
  158. TextLabel_4.Font = Enum.Font.SciFi
  159. TextLabel_4.Text = "Treasure Hunt Sim mini GUI"
  160. TextLabel_4.TextColor3 = Color3.new(0, 0, 0)
  161. TextLabel_4.TextScaled = true
  162. TextLabel_4.TextSize = 28
  163. TextLabel_4.TextWrapped = true
  164.  
  165. Open.Name = "Open"
  166. Open.Parent = ScreenGui
  167. Open.BackgroundColor3 = Color3.new(0, 0, 0)
  168. Open.BackgroundTransparency = 0.30000001192093
  169. Open.Position = UDim2.new(0, 0, 0, 340)
  170. Open.Size = UDim2.new(0, 100, 0, 30)
  171. Open.Font = Enum.Font.SciFi
  172. Open.Text = "Open"
  173. Open.TextColor3 = Color3.new(0, 1, 1)
  174. Open.TextScaled = true
  175. Open.TextSize = 14
  176. Open.TextWrapped = true
  177. Open.MouseButton1Click:connect(function()
  178.     if game.CoreGui.ScreenGui.Frame.Visible == false then
  179.        game.CoreGui.ScreenGui.Frame.Visible = true
  180.     end
  181. end)
Add Comment
Please, Sign In to add comment