xxxDrez

Untitled

Jun 17th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.33 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local mouse = player:GetMouse()
  3. local gui = Instance.new("ScreenGui",player.PlayerGui)
  4. local act6 = false
  5. local act6temp = false
  6. local resethive = false
  7. local switchingzone = false
  8. local act4 = false
  9. local frame = Instance.new("Frame",gui)
  10. frame.BackgroundTransparency = 0.2
  11. frame.BackgroundColor3 = Color3.fromRGB(255,255,255)
  12. frame.BorderColor3 = Color3.fromRGB(155,155,155)
  13. frame.BorderSizePixel = 3
  14. frame.Position = UDim2.new(0.3,0,.3,0)
  15. frame.Size = UDim2.new(.25,0,.65,0)
  16. frame.Active = true
  17. frame.Draggable = true
  18. frame.ClipsDescendants = false
  19.  
  20. local textbutc = Instance.new("TextButton",frame)
  21. textbutc.BackgroundTransparency = 0
  22. textbutc.BackgroundColor3 = Color3.fromRGB(255,55,55)
  23. textbutc.BorderColor3 = Color3.fromRGB(155,0,0)
  24. textbutc.BorderSizePixel = 3
  25. textbutc.Position = UDim2.new(0.925,0,0,0)
  26. textbutc.Size = UDim2.new(.075,0,.075,0)
  27. textbutc.SizeConstraint = "RelativeXX"
  28. textbutc.TextScaled = true
  29. textbutc.TextColor3 = Color3.fromRGB(255,255,255)
  30. textbutc.Font = "Highway"
  31. textbutc.Text = "X"
  32. textbutc.MouseButton1Click:Connect(function()
  33. gui:Remove()
  34. end)
  35.  
  36. local textauto = Instance.new("TextButton",frame)
  37. textauto.BackgroundTransparency = 0
  38. textauto.BackgroundColor3 = Color3.fromRGB(55,255,155)
  39. textauto.BorderColor3 = Color3.fromRGB(0,155,55)
  40. textauto.BorderSizePixel = 3
  41. --uiscaletext.Position = UDim2.new(0.05,0,.9,0)
  42. textauto.Position = UDim2.new(0.05,0,.025,0)
  43. textauto.Size = UDim2.new(.4,0,.075,0)
  44. textauto.TextScaled = true
  45. textauto.TextColor3 = Color3.fromRGB(255,255,255)
  46. textauto.Font = "Highway"
  47. textauto.Text = "Auto Farm"
  48. textauto.MouseButton1Click:Connect(function()
  49. if act6 then
  50. act6 = false -- выключение
  51. resethive = false
  52. switchingzone = false
  53. textauto.Text = "Auto Farm"
  54. textauto.BackgroundColor3 = Color3.fromRGB(55,255,155)
  55. textauto.BorderColor3 = Color3.fromRGB(0,155,55)
  56. else
  57. act6 = true -- включено
  58. textauto.Text = "Stop"
  59. textauto.BackgroundColor3 = Color3.fromRGB(255,55,55)
  60. textauto.BorderColor3 = Color3.fromRGB(155,0,0)
  61. while true do
  62. wait(0.5)
  63. if resethive then
  64. print("Waiting 35 seconds before AutoFarm resumes")
  65. wait(35)
  66. resethive = false
  67. act6 = true
  68. end
  69. if act6 then
  70. local player = game:GetService("Players").LocalPlayer
  71. while player == nil do wait(0.5) end
  72. local root = player.Character.HumanoidRootPart
  73. if farmzoneswitched and not viciousbeedetected then act6 = false farmzoneswitchback = true end
  74. player = game:GetService("Players").LocalPlayer
  75. local currp
  76. player.Character.Humanoid.Died:connect(function()
  77. resethive = true
  78. act6 = false
  79. print("Player: " ..tostring(player.Name).. " has died")
  80. end)
  81. local pollenLbl = player.Character:FindFirstChild("ProgressLabel",true)
  82. if not pollenLbl then
  83. print("Backpack not found")
  84. end
  85. local maxpollen = tonumber(pollenLbl.Text:match("%d+$"))
  86. local pollenTool = player.Character:FindFirstChildOfClass("Tool") or player.Backpack:FindFirstChildOfClass("Tool")
  87. if pollenTool==nil or pollenTool:FindFirstChild("ClickEvent")==nil then
  88. print("Tool not found")
  89. end
  90. --print("Backpack size: " .. maxpollen)
  91. if act6 then
  92. if act6 == true then
  93. fieldpos = {Vector3.new(93.2, 175.35, -188.49),Vector3.new(93.2, 175.35, -141.98),Vector3.new(59.12, 175.35, -141.98),Vector3.new(59.12, 175.35, -188.49)}
  94. print("Farming Mountain Top Field")
  95. else
  96. if maxpollen < 9999 then
  97. fieldpos = {Vector3.new(-220,3.3,220),Vector3.new(-220,4,180),Vector3.new(-220,4,140),Vector3.new(-220,4,100),Vector3.new(-190,4,126),Vector3.new(-190, 4, 166),Vector3.new(-190, 4, 206)}
  98. print("Farming Sunflower Field")
  99. else
  100. fieldpos = {Vector3.new(93.2, 175.35, -188.49),Vector3.new(93.2, 175.35, -141.98),Vector3.new(59.12, 175.35, -141.98),Vector3.new(59.12, 175.35, -188.49)}
  101. print("Farming Mountain Top Field")
  102. end
  103. end
  104. end
  105. --collect pollen
  106. --print("Farming pollen")
  107. local posIndex = 0
  108. pollenTool.Parent = player.Character
  109. workspace.Collectibles.ChildAdded:Connect(function(part)
  110. if act6 then
  111. local root = game:GetService("Players").LocalPlayer.Character.HumanoidRootPart
  112. if tostring(part) == tostring(game.Players.LocalPlayer.Name) or tostring(part) == "C" then
  113. -- print("token position: " ..tostring(part.Position)) --
  114. -- print("player position: " ..tostring(root.Position)) --
  115. -- print("Distance: " ..tostring((part.Position - root.Position).magnitude)) --
  116. if currp and (part.Position-root.Position).magnitude <= 60 then
  117. root.CFrame = CFrame.new(part.Position.x, root.Position.y, part.Position.z)
  118. wait(0.07) -- 7
  119. root.CFrame = CFrame.new(currp)
  120. wait(0.05)
  121. end
  122. end
  123. end
  124. end)
  125. wait(0.1)
  126. while act6 and tonumber(player.CoreStats.Pollen.Value) < tonumber(maxpollen) do
  127. wait(0.04)
  128. posIndex=posIndex+1
  129. if posIndex>#fieldpos then posIndex=1 end
  130. for rot=1,4 do -- 4
  131. local angle = CFrame.Angles(0,math.pi*.5*rot,0)
  132. currp = fieldpos[posIndex]+angle.lookVector*10
  133. local newrootpos = CFrame.new(currp)*angle
  134. root.CFrame = newrootpos
  135. for i=1,29 do --25
  136. if farmzoneswitched and not viciousbeedetected then act6 = false farmzoneswitchback = true end
  137. if not act6 then break end
  138. wait(0.1)
  139. pollenTool.ClickEvent:FireServer(currp)
  140. pollenTool.ClickEvent:FireServer(currp)
  141. end
  142. player = game:GetService("Players").LocalPlayer
  143. if tonumber(player.CoreStats.Pollen.Value+1) > tonumber(maxpollen) then
  144. print("Total Honey: " ..tostring(player.CoreStats.Honey.Value).. ". Bag Full: " ..tostring(player.CoreStats.Pollen.Value))
  145. break
  146. end
  147. end
  148. end
  149. -- turn pollen to honey --
  150. currp = nil
  151. --print("Teleporting back to Hive to make Honey")
  152. wait(0.1)
  153. game:GetService("Players").LocalPlayer.Character:MoveTo(game:GetService("Players").LocalPlayer.SpawnPos.Value.p)
  154. if not switchingzone then
  155. wait(1)
  156. game:GetService("ReplicatedStorage").Events.PlayerHiveCommand:FireServer("ToggleHoneyMaking")
  157. if act6 then
  158. repeat wait(0.5) until game:GetService("Players").LocalPlayer.CoreStats.Pollen.Value < 1
  159. wait(8)
  160. end
  161. end
  162. end
  163. end
  164. end
  165. end)
  166. local textpollen = Instance.new("TextButton",frame)
  167. textpollen.BackgroundTransparency = 0
  168. textpollen.BackgroundColor3 = Color3.fromRGB(55,255,155)
  169. textpollen.BorderColor3 = Color3.fromRGB(0,155,55)
  170. textpollen.BorderSizePixel = 3
  171. textpollen.Position = UDim2.new(0.05,0,.125,0)
  172. textpollen.Size = UDim2.new(.4,0,.075,0)
  173. textpollen.TextScaled = true
  174. textpollen.TextColor3 = Color3.fromRGB(255,255,255)
  175. textpollen.Font = "Highway"
  176. textpollen.Text = "Token Farm"
  177. textpollen.MouseButton1Click:Connect(function()
  178. if act4 then
  179. act4 = false
  180. textpollen.Text = "Token Farm"
  181. textpollen.BackgroundColor3 = Color3.fromRGB(55,255,155)
  182. textpollen.BorderColor3 = Color3.fromRGB(0,155,55)
  183. else
  184. act4 = true
  185. textpollen.Text = "Stop"
  186. textpollen.BackgroundColor3 = Color3.fromRGB(255,55,55)
  187. textpollen.BorderColor3 = Color3.fromRGB(155,0,0)
  188. local krispy = player.Character.HumanoidRootPart
  189. repeat
  190. local bigboi = krispy.CFrame
  191. for k,v in pairs(workspace.Collectibles:GetChildren()) do
  192. if v.Name == player.Name and not v:FindFirstChild("HeyBigBoi") or tonumber((v.Position - krispy.Position).magnitude) <= 35 and not v:FindFirstChild("HeyBigBoi") then
  193. krispy.CFrame = v.CFrame
  194. local intvalue = Instance.new("IntValue",v)
  195. intvalue.Name = "HeyBigBoi"
  196. wait(.05)
  197. end
  198. end
  199. wait(.1)
  200. krispy.CFrame = bigboi
  201. until not act4
  202. end
  203. end)
  204. local uiscaletext = Instance.new("TextBox",frame)
  205. uiscaletext.BackgroundTransparency = 0
  206. uiscaletext.BackgroundColor3 = Color3.fromRGB(55,155,255)
  207. uiscaletext.BorderColor3 = Color3.fromRGB(0,55,155)
  208. uiscaletext.BorderSizePixel = 3
  209. uiscaletext.Position = UDim2.new(0.55,0,.025,0)
  210. uiscaletext.Size = UDim2.new(.2,0,.075,0)
  211. uiscaletext.TextScaled = true
  212. uiscaletext.TextColor3 = Color3.fromRGB(255,255,255)
  213. uiscaletext.Font = "Highway"
  214. uiscaletext.Text = ".6"
  215. uiscaletext.PlaceholderText = "UIScale"
  216. local ui = Instance.new("UIScale",frame)
  217. ui.Scale = .6
  218. uiscaletext.Changed:Connect(function()
  219. if uiscaletext.Text == "" then
  220. elseif tonumber(uiscaletext.Text) > 1.5 then
  221. ui.Scale = 1.5
  222. else
  223. ui.Scale = tonumber(uiscaletext.Text)
  224. end
  225. end)
  226. uiscaletext.Text = ".6"
Advertisement
Add Comment
Please, Sign In to add comment