Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _G.turnedOn = true
- _G.autofarm = true
- _G.waitTime = 0.5
- local Player = game.Players.LocalPlayer --get the local player
- game:GetService("RunService").RenderStepped:connect(function()
- game:GetService("ReplicatedStorage").ThisGame.Calls.collectSnow:FireServer()
- end)
- function collectSnow()
- while Player.localData.snowballs.Value < Player.localData.sackStorage.Value do
- game.ReplicatedStorage.ThisGame.Calls['snowballController']:FireServer("startRoll")
- wait(_G.waitTime)
- game.ReplicatedStorage.ThisGame.Calls['snowballControllerFunc']:InvokeServer("stopRoll")
- print("Rolling Snow:" .. Player.localData.snowballs.Value .. "/" .. Player.localData.sackStorage.Value)
- end
- end
- function addSnowToSnowman()
- if Player.localData.snowballs.Value == Player.localData.sackStorage.Value then
- game.ReplicatedStorage.ThisGame.Calls['snowballControllerFunc']:InvokeServer("stopRoll")
- game.ReplicatedStorage.ThisGame.Calls['snowballController']:FireServer("addToSnowman")
- wait(2)
- end
- end
- function killSnowMen()
- for i, snowman in ipairs(Workspace.minionsHolder:GetChildren()) do
- while snowman.hitCount.Value > 0 and (snowman.hitBox.Position - Player.Character.HumanoidRootPart.Position).magnitude < 20 do
- game.ReplicatedStorage.ThisGame.Calls['minionHelper']:FireServer("minionHit",snowman)
- wait()
- end
- end
- end
- function pickUpCanes()
- for i, cane in ipairs(Workspace.gameCandyCanes:GetChildren()) do
- if (cane:FindFirstChild("cane").Position - Player.Character.HumanoidRootPart.Position).magnitude < 20 then
- Player.Character.HumanoidRootPart.CFrame = cane:FindFirstChild("cane").CFrame
- wait(0.3)
- end
- end
- end
- function Main()
- while _G.turnedOn do
- if _G.autofarm then
- collectSnow()
- addSnowToSnowman()
- else
- killSnowMen()
- pickUpCanes()
- end
- wait()
- end
- end
- print("Loaded")
- Main()
Add Comment
Please, Sign In to add comment