LeviTheOtaku

build a boat for trreasure

Oct 27th, 2019
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.30 KB | None | 0 0
  1. local BuildABoatForTreasureFarmGUI = Instance.new("ScreenGui")
  2. local MainFrame = Instance.new("Frame")
  3. local Deco = Instance.new("TextLabel")
  4. local SpeedTextBox = Instance.new("TextBox")
  5. local SpeedDeco = Instance.new("TextLabel")
  6. local OnceButton = Instance.new("TextButton")
  7. local AutofarmButton = Instance.new("TextButton")
  8. local AutofarmDeco = Instance.new("TextLabel")
  9.  
  10. BuildABoatForTreasureFarmGUI.Name = "BuildABoatForTreasureFarmGUI"
  11. BuildABoatForTreasureFarmGUI.Parent = game.CoreGui
  12.  
  13. MainFrame.Name = "MainFrame"
  14. MainFrame.Parent = BuildABoatForTreasureFarmGUI
  15. MainFrame.Active = true
  16. MainFrame.Draggable = true
  17. MainFrame.BackgroundColor3 = Color3.new(0.196078, 0.196078, 0.196078)
  18. MainFrame.BorderSizePixel = 0
  19. MainFrame.Position = UDim2.new(0.25, 0, 0.25, 0)
  20. MainFrame.Size = UDim2.new(0.15, 0, 0.15, 0)
  21.  
  22. Deco.Name = "Deco"
  23. Deco.Parent = MainFrame
  24. Deco.BackgroundColor3 = Color3.new(1, 1, 1)
  25. Deco.BackgroundTransparency = 0.9
  26. Deco.BorderSizePixel = 0
  27. Deco.Size = UDim2.new(1, 0, 0.15, 0)
  28. Deco.Font = Enum.Font.SourceSansBold
  29. Deco.Text = "Build A Boat For Treasure Gold GUI"
  30. Deco.TextColor3 = Color3.new(1, 1, 1)
  31. Deco.TextScaled = true
  32. Deco.TextSize = 14
  33. Deco.TextWrapped = true
  34.  
  35. SpeedTextBox.Name = "SpeedTextBox"
  36. SpeedTextBox.Parent = MainFrame
  37. SpeedTextBox.BackgroundColor3 = Color3.new(1, 1, 1)
  38. SpeedTextBox.BackgroundTransparency = 0.9
  39. SpeedTextBox.Position = UDim2.new(0.55, 0, 0.25, 0)
  40. SpeedTextBox.Size = UDim2.new(0.35, 0, 0.15, 0)
  41. SpeedTextBox.Font = Enum.Font.SourceSansBold
  42. SpeedTextBox.Text = "45"
  43. SpeedTextBox.TextColor3 = Color3.new(1, 1, 1)
  44. SpeedTextBox.TextScaled = true
  45. SpeedTextBox.TextSize = 14
  46. SpeedTextBox.TextWrapped = true
  47.  
  48. SpeedDeco.Name = "SpeedDeco"
  49. SpeedDeco.Parent = MainFrame
  50. SpeedDeco.BackgroundColor3 = Color3.new(1, 1, 1)
  51. SpeedDeco.BackgroundTransparency = 1
  52. SpeedDeco.BorderSizePixel = 0
  53. SpeedDeco.Position = UDim2.new(0.1, 0, 0.25, 0)
  54. SpeedDeco.Size = UDim2.new(0.40, 0, 0.15, 0)
  55. SpeedDeco.Font = Enum.Font.SourceSansBold
  56. SpeedDeco.Text = "Speed"
  57. SpeedDeco.TextColor3 = Color3.new(1, 1, 1)
  58. SpeedDeco.TextScaled = true
  59. SpeedDeco.TextSize = 14
  60. SpeedDeco.TextWrapped = true
  61.  
  62. OnceButton.Name = "OnceButton"
  63. OnceButton.Parent = MainFrame
  64. OnceButton.BackgroundColor3 = Color3.new(0, 0, 0)
  65. OnceButton.BorderSizePixel = 0
  66. OnceButton.Position = UDim2.new(0.1, 0, 0.55, 0)
  67. OnceButton.Size = UDim2.new(0.8, 0, 0.2, 0)
  68. OnceButton.Font = Enum.Font.SourceSans
  69. OnceButton.Text = "Go once"
  70. OnceButton.TextColor3 = Color3.new(1, 0.85098, 0)
  71. OnceButton.TextScaled = true
  72. OnceButton.TextSize = 14
  73. OnceButton.TextWrapped = true
  74.  
  75. AutofarmButton.Name = "AutofarmButton"
  76. AutofarmButton.Parent = MainFrame
  77. AutofarmButton.BackgroundColor3 = Color3.new(0, 0, 0)
  78. AutofarmButton.BorderSizePixel = 0
  79. AutofarmButton.Position = UDim2.new(0.55, 0, 0.8, 0)
  80. AutofarmButton.Size = UDim2.new(0.35, 0, 0.15, 0)
  81. AutofarmButton.Font = Enum.Font.SourceSans
  82. AutofarmButton.Text = "OFF"
  83. AutofarmButton.TextColor3 = Color3.new(1, 0, 0)
  84. AutofarmButton.TextScaled = true
  85. AutofarmButton.TextSize = 14
  86. AutofarmButton.TextWrapped = true
  87.  
  88. AutofarmDeco.Name = "AutofarmDeco"
  89. AutofarmDeco.Parent = MainFrame
  90. AutofarmDeco.BackgroundColor3 = Color3.new(1, 1, 1)
  91. AutofarmDeco.BackgroundTransparency = 1
  92. AutofarmDeco.BorderSizePixel = 0
  93. AutofarmDeco.Position = UDim2.new(0.1, 0, 0.8, 0)
  94. AutofarmDeco.Size = UDim2.new(0.40, 0, 0.15, 0)
  95. AutofarmDeco.Font = Enum.Font.SourceSansBold
  96. AutofarmDeco.Text = "Autofarm"
  97. AutofarmDeco.TextColor3 = Color3.new(1, 1, 1)
  98. AutofarmDeco.TextScaled = true
  99. AutofarmDeco.TextSize = 14
  100. AutofarmDeco.TextWrapped = true
  101.  
  102.  
  103.  
  104. local running = false
  105.  
  106.  
  107. spawn(function()
  108. game:getService("RunService"):BindToRenderStep("", 0,function()
  109. pcall(function()
  110. if not game.Players.LocalPlayer.Character:findFirstChildOfClass("Humanoid") then return end
  111. if not running == true then return end
  112. game.Players.LocalPlayer.Character:findFirstChildOfClass("Humanoid"):ChangeState(11)
  113. end)
  114. end)
  115. end)
  116.  
  117. function doTheThing()
  118. if running == false then
  119. local checks = workspace.BoatTerrains:getDescendants()
  120. for i=1,#checks do
  121. running = true
  122. if checks[i].Name == "DarknessPart" or checks[i].Name == "GatePart" then
  123. if game.Players.LocalPlayer.Character:FindFirstChild("Humanoid") then
  124. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = checks[i].CFrame
  125. end
  126. wait(18.9/tonumber(SpeedTextBox.Text)) -- lol dont ask
  127. end
  128. end
  129. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = workspace.GoldenChest.Collider.CFrame
  130. repeat
  131. if game.Players.LocalPlayer.Character:FindFirstChild("Humanoid") then
  132. game.Players.LocalPlayer.Character.Humanoid.Jump = true
  133. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = workspace.GoldenChest.Collider.CFrame
  134. end
  135. wait()
  136. until not game.Players.LocalPlayer.Character:FindFirstChild("Humanoid")
  137. running = false
  138. end
  139. end
  140.  
  141. OnceButton.MouseButton1Down:connect(function()
  142. doTheThing()
  143. end)
  144.  
  145. local autofarming = false
  146. AutofarmButton.MouseButton1Down:connect(function()
  147. if AutofarmButton.Text == "ON" then
  148. AutofarmButton.Text = "OFF"
  149. AutofarmButton.TextColor3 = Color3.fromRGB(255,0,0)
  150. autofarming = false
  151. running = false
  152. else
  153. AutofarmButton.Text = "ON"
  154. AutofarmButton.TextColor3 = Color3.fromRGB(0,255,0)
  155. autofarming = true
  156. end
  157. end)
  158.  
  159. spawn(function()
  160. while true do
  161. wait(0.1)
  162. if autofarming == true then
  163. doTheThing()
  164. end
  165. end
  166. end)
Add Comment
Please, Sign In to add comment