Scriptorz5

Snowman Simulator | Auto Kill + more

Dec 14th, 2018
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. _G.turnedOn = true
  2. _G.autofarm = true
  3. _G.waitTime = 0.5
  4.  
  5. local Player = game.Players.LocalPlayer --get the local player
  6. game:GetService("RunService").RenderStepped:connect(function()
  7. game:GetService("ReplicatedStorage").ThisGame.Calls.collectSnow:FireServer()
  8. end)
  9.  
  10. function collectSnow()
  11. while Player.localData.snowballs.Value < Player.localData.sackStorage.Value do
  12. game.ReplicatedStorage.ThisGame.Calls['snowballController']:FireServer("startRoll")
  13. wait(_G.waitTime)
  14. game.ReplicatedStorage.ThisGame.Calls['snowballControllerFunc']:InvokeServer("stopRoll")
  15. print("Rolling Snow:" .. Player.localData.snowballs.Value .. "/" .. Player.localData.sackStorage.Value)
  16. end
  17. end
  18.  
  19. function addSnowToSnowman()
  20. if Player.localData.snowballs.Value == Player.localData.sackStorage.Value then
  21. game.ReplicatedStorage.ThisGame.Calls['snowballControllerFunc']:InvokeServer("stopRoll")
  22. game.ReplicatedStorage.ThisGame.Calls['snowballController']:FireServer("addToSnowman")
  23. wait(2)
  24. end
  25. end
  26.  
  27. function killSnowMen()
  28. for i, snowman in ipairs(Workspace.minionsHolder:GetChildren()) do
  29. while snowman.hitCount.Value > 0 and (snowman.hitBox.Position - Player.Character.HumanoidRootPart.Position).magnitude < 20 do
  30. game.ReplicatedStorage.ThisGame.Calls['minionHelper']:FireServer("minionHit",snowman)
  31. wait()
  32. end
  33. end
  34. end
  35.  
  36. function pickUpCanes()
  37. for i, cane in ipairs(Workspace.gameCandyCanes:GetChildren()) do
  38. if (cane:FindFirstChild("cane").Position - Player.Character.HumanoidRootPart.Position).magnitude < 20 then
  39. Player.Character.HumanoidRootPart.CFrame = cane:FindFirstChild("cane").CFrame
  40. wait(0.3)
  41. end
  42. end
  43. end
  44.  
  45.  
  46. function Main()
  47. while _G.turnedOn do
  48. if _G.autofarm then
  49. collectSnow()
  50. addSnowToSnowman()
  51. else
  52. killSnowMen()
  53. pickUpCanes()
  54. end
  55. wait()
  56. end
  57. end
  58. print("Loaded")
  59. Main()
Add Comment
Please, Sign In to add comment