Advertisement
oofoof13

snow shoveling simulator autofarm

Jun 20th, 2019
677
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.99 KB | None | 0 0
  1. if game.CoreGui:FindFirstChild("UI Workspace") then game.CoreGui:FindFirstChild("UI Workspace"):Destroy() end
  2. repeat wait() until game:GetService("Players").LocalPlayer and game:GetService("Players").LocalPlayer.Character
  3. local plr, char = game:GetService("Players").LocalPlayer, game:GetService("Players").LocalPlayer.Character
  4.  
  5. local globalStop = false
  6. local globalColor = 33/255
  7. local util = {}
  8.  
  9. -- Objects
  10.  
  11. local UIWorkspace = Instance.new("ScreenGui")
  12. local TextLabel = Instance.new("TextLabel")
  13. local TextBox = Instance.new("TextBox")
  14.  
  15. -- Properties
  16.  
  17. UIWorkspace.Archivable = false
  18. UIWorkspace.Name = "UI Workspace"
  19. UIWorkspace.Parent = game.CoreGui
  20.  
  21. TextLabel.Parent = UIWorkspace
  22. TextLabel.BackgroundColor3 = Color3.new(globalColor, globalColor, globalColor)
  23. TextLabel.BackgroundTransparency = 0.05
  24. TextLabel.BorderSizePixel = 0
  25. TextLabel.Position = UDim2.new(0, 0, 0.800000012, 0)
  26. TextLabel.Size = UDim2.new(0, 80, 0, 30)
  27. TextLabel.Font = Enum.Font.SourceSans
  28. TextLabel.FontSize = Enum.FontSize.Size28
  29. TextLabel.Text = ">"
  30. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  31. TextLabel.TextSize = 26
  32. TextLabel.TextXAlignment = Enum.TextXAlignment.Right
  33.  
  34. TextBox.Parent = UIWorkspace
  35. TextBox.BackgroundColor3 = Color3.new(globalColor, globalColor, globalColor)
  36. TextBox.BackgroundTransparency = 0.05
  37. TextBox.BorderSizePixel = 0
  38. TextBox.Position = UDim2.new(0, 85, 0.800000012, 0)
  39. TextBox.Size = UDim2.new(1, 0, 0, 30)
  40. TextBox.Font = Enuqm.Font.SciFi
  41. TextBox.FontSize = Enum.FontSize.Size18
  42. TextBox.TextColor3 = Color3.new(1, 1, 1)
  43. TextBox.TextSize = 18
  44. TextBox.TextXAlignment = Enum.TextXAlignment.Left
  45.  
  46. local mouse = game.Players.LocalPlayer:GetMouse()
  47. mouse.KeyDown:Connect(function(Key)
  48. if string.byte(Key) == 13 then
  49. TextBox:CaptureFocus()
  50. TextBox.Text = ""
  51. end
  52. end)
  53.  
  54. --==--==--==--==--==--==--==--
  55. --EDIT STUFF HERE--
  56. local cmds = {
  57. "PRINT COMMANDS | [cmds]",
  58. "FARM SNOW | [farm] [delay] (delay is optional.)",
  59. "(increasing the delay makes farming slower but less laggy.)",
  60. "STOP EVERYTHING | [stop]",
  61. }
  62. --END--
  63. --==--==--==--==--==--==
  64.  
  65. TextBox.FocusLost:connect(function(enterPressed)
  66. if enterPressed then
  67. secondaryInit()
  68. local args = util.splitArgs(TextBox.Text)
  69.  
  70. --==--==--==--==--==--==--==--
  71. --EDIT STUFF HERE--
  72. if #args > 0 then
  73.  
  74. if args[1] == "farm" then
  75. globalStop = false
  76. local maxSnow = {
  77. ["small"] = 45,
  78. ["medium"] = 90,
  79. ["large"] = 230,
  80. ["huge"] = 550,
  81. ["tech"] = 950,
  82. ["tardis"] = 700,
  83. ["star"] = 4000,
  84. }
  85. local delayA = 0
  86. if #args > 1 then
  87. if tonumber(args[2]) then
  88. delayA = tonumber(args[2])
  89. end
  90. end
  91. repeat wait(1)
  92. for _, v in pairs(workspace.Sidewalks:children()) do
  93. for _, p in pairs(v:children()) do
  94. if p.Name == "Snow" and p:IsA("Part") and not globalStop then
  95. repeat wait(delayA)
  96. local curSnow = plr.Stats.currentSnow.Value
  97. local maxSnowB = nil
  98. char:FindFirstChild("HumanoidRootPart").CFrame = p.CFrame
  99. game.ReplicatedStorage.RemoteEvents.Shovel:FireServer(p)
  100. for i, k in pairs(maxSnow) do
  101. if string.find(string.lower(plr.Stats.lastWornBackpack.Value), i) then
  102. maxSnowB = k
  103. end
  104. end
  105. if maxSnowB ~= 0 then
  106. util.log("FARMING: "..curSnow.."/"..maxSnowB)
  107. if curSnow == maxSnowB then
  108. char:FindFirstChild("HumanoidRootPart").CFrame = CFrame.new(Vector3.new(394.763, 2.3, -68.564))
  109. wait(1)
  110. game.ReplicatedStorage.RemoteEvents.SellSnow:FireServer(true)
  111. repeat wait(delayA)
  112. curSnow = plr.Stats.currentSnow.Value
  113. util.log("SELLING: "..curSnow.."/"..maxSnowB)
  114. char:FindFirstChild("HumanoidRootPart").CFrame = CFrame.new(Vector3.new(394.763, 2.3, -68.564))
  115. until curSnow == 0 or globalStop
  116. end
  117. else
  118. util.log("ERROR BACKPACK NOT FOUND.")
  119. globalStop = true
  120. end
  121. until p.Size.Y <= 0.1 or globalStop
  122. end
  123. end
  124. end
  125. until globalStop
  126. end
  127.  
  128.  
  129.  
  130. if args[1] == "cmds" then
  131. if game.CoreGui:FindFirstChild("CatchMeIfYaCan") then
  132. game.CoreGui:FindFirstChild("CatchMeIfYaCan"):Destroy()
  133. end
  134. local curOff = -20
  135. local ScrGui = Instance.new("ScreenGui", game.CoreGui)
  136. ScrGui.Name = "CatchMeIfYaCan"
  137. local Frame = Instance.new("Frame")
  138. local ScrollingFrame = Instance.new("ScrollingFrame")
  139. local TextButton = Instance.new("TextButton")
  140.  
  141. Frame.Parent = ScrGui
  142. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  143. Frame.BackgroundTransparency = 0.5
  144. Frame.BorderSizePixel = 0
  145. Frame.Position = UDim2.new(0.200000003, 0, 0.200000003, 0)
  146. Frame.Size = UDim2.new(0, 400, 0, 20)
  147. Frame.Active = true
  148. Frame.Draggable = true
  149.  
  150. ScrollingFrame.Parent = Frame
  151. ScrollingFrame.BackgroundColor3 = Color3.new(0, 0, 0)
  152. ScrollingFrame.BackgroundTransparency = 0.20000000298023
  153. ScrollingFrame.BorderSizePixel = 0
  154. ScrollingFrame.Position = UDim2.new(0, 0, 0, 20)
  155. ScrollingFrame.Size = UDim2.new(0, 400, 0, 200)
  156. ScrollingFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
  157.  
  158. for i, v in pairs(cmds) do
  159. curOff = curOff + 20
  160. local TextLabel = Instance.new("TextLabel")
  161. ScrollingFrame.CanvasSize = UDim2.new(0,0,0,curOff + 20)
  162. TextLabel.Parent = ScrollingFrame
  163. TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  164. TextLabel.BackgroundTransparency = 1
  165. TextLabel.BorderSizePixel = 0
  166. TextLabel.Position = UDim2.new(0, 10, 0, curOff)
  167. TextLabel.Size = UDim2.new(0, 350, 0, 20)
  168. TextLabel.Font = Enum.Font.SourceSans
  169. TextLabel.FontSize = Enum.FontSize.Size14
  170. TextLabel.Text = v
  171. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  172. TextLabel.TextSize = 14
  173. TextLabel.TextXAlignment = Enum.TextXAlignment.Left
  174. end
  175.  
  176. TextButton.Parent = Frame
  177. TextButton.BackgroundColor3 = Color3.new(1, 1, 1)
  178. TextButton.BorderSizePixel = 0
  179. TextButton.Position = UDim2.new(0, 380, 0, 0)
  180. TextButton.Size = UDim2.new(0, 20, 0, 20)
  181. TextButton.Font = Enum.Font.SourceSans
  182. TextButton.FontSize = Enum.FontSize.Size18
  183. TextButton.Text = "X"
  184. TextButton.TextSize = 16
  185. TextButton.MouseButton1Down:connect(function(closecmds)
  186. ScrGui:Destroy()
  187. end)
  188. end
  189.  
  190. if args[1] == "stop" then
  191. globalStop = true
  192. end
  193.  
  194. end
  195. --END--
  196. --==--==--==--==--==--==--==--
  197.  
  198. end
  199. end)
  200.  
  201. function init()
  202. repeat wait() until game:GetService("Players").LocalPlayer and game:GetService("Players").LocalPlayer.Character
  203. plr, char = game:GetService("Players").LocalPlayer, game:GetService("Players").LocalPlayer.Character
  204. util.printf("Welcome, "..plr.Name)
  205.  
  206. --==--==--==--==--==--==--==--
  207. --EDIT STUFF HERE--
  208. util.log("GAME INFO: SNOW SHOVELING SIMULATOR.")
  209. util.log("COMMANDS (not case-sensitive):")
  210. for i = 1, #cmds do
  211. util.log(i.." | "..cmds[i])
  212. end
  213. --END--
  214. --==--==--==--==--==--==--==--
  215.  
  216. end
  217.  
  218. function secondaryInit()
  219. repeat wait() until game:GetService("Players").LocalPlayer and game:GetService("Players").LocalPlayer.Character
  220. plr, char = game:GetService("Players").LocalPlayer, game:GetService("Players").LocalPlayer.Character
  221. end
  222.  
  223. function util.findPlayer(str)
  224. for i, v in pairs(game:GetService("Players"):GetPlayers()) do
  225. if string.lower(v.Name) == string.lower(str) or string.find(string.lower(v.Name), string.lower(str)) then
  226. return v
  227. end
  228. end
  229. end
  230.  
  231. function util.splitArgs(str)
  232. local tempArgs = {}
  233. for i in string.gmatch(str, "%S+") do
  234. table.insert(tempArgs, string.lower(i))
  235. end
  236. return tempArgs
  237. end
  238.  
  239. function util.printf(str)
  240. TextBox.Text = ""
  241. for i = 1, #str do
  242. TextBox.Text = TextBox.Text..string.sub(str, i, i)
  243. wait(.05)
  244. end
  245. wait(1)
  246. TextBox.Text = ""
  247. end
  248.  
  249. function util.log(str)
  250. print("[--INORI--] "..str)
  251. end
  252.  
  253. init()
  254. char:FindFirstChild("Humanoid").Died:connect(function()
  255. secondaryInit()
  256. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement