Shoujo_Ingrid

MM2 autofarm testing

Dec 23rd, 2024 (edited)
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.81 KB | None | 0 0
  1. loadstring(game:HttpGet("https://raw.githubusercontent.com/KazeOnTop/Rice-Anti-Afk/main/Wind", true))()
  2.  
  3. local ts = game:GetService("TweenService")
  4.  
  5. local tweenSpeed = 0
  6.  
  7. local bestDistance = 999999999999999
  8.  
  9. local playerCoins = game.Players.LocalPlayer.PlayerGui.CrossPlatform.Christmas2024.Container.EventFrames.MysteryBox.Info.Tokens.Container.TextLabel.Text
  10.  
  11. local bestCoinLocation = nil
  12.  
  13. local roundStartCheck = false
  14. local roundGoingOn = false
  15.  
  16. task.spawn(function()
  17. while true do
  18. task.wait(1)
  19. for i, v in game.Workspace:GetDescendants() do
  20. if v.Name == "CoinContainer" and v:IsA("Model") then
  21. roundGoingOn = true
  22. roundStartCheck = true
  23. elseif v.Name ~= "CoinContainer" and roundStartCheck == false then
  24. roundGoingOn = false
  25. end
  26. end
  27. roundStartCheck = false
  28. end
  29. end)
  30.  
  31. local function canCollide(character, command)
  32. for i, v in character:GetDescendants() do
  33. if v:IsA("BasePart") and command == "on" then
  34. v.CanCollide = true
  35. elseif v:IsA("BasePart") and command == "off" then
  36. v.CanCollide = false
  37. end
  38. end
  39. end
  40.  
  41. local function findNearestCoin ()
  42. local player = game.Players.LocalPlayer
  43. for i, v in game.Workspace:GetDescendants() do
  44. if v.Name == "CoinContainer" and v:IsA("Model") then
  45. for i, coin in v:GetChildren() do
  46. if coin:FindFirstChild("TouchInterest") and player.character then
  47. local character = game.Players.LocalPlayer.Character
  48. local hrp = character.HumanoidRootPart
  49. local coinLocation = coin.CFrame.Position
  50.  
  51. local distance = (hrp.CFrame.Position - coinLocation).magnitude
  52.  
  53. if distance < bestDistance then
  54. bestDistance = distance
  55. bestCoinLocation = coinLocation
  56. end
  57. end
  58. end
  59. end
  60. end
  61. end
  62.  
  63. while roundGoingOn == true do
  64. pcall(function()
  65. task.wait()
  66. local player = game.Players.LocalPlayer
  67. bestDistance = 999999999999999
  68.  
  69. bestCoinLocation = nil
  70.  
  71. findNearestCoin()
  72.  
  73. tweenSpeed = bestDistance/25
  74.  
  75. if tweenSpeed >= 10 then
  76. for i, v in game:GetDescendants() do
  77. if v.Name == "CoinContainer" and v:IsA("Model") then
  78. local randomCoin = v:FindFirstChild("Coin_Server")
  79. local randomCoinPos = randomCoin.CFrame.Position
  80. player.Character:PivotTo(CFrame.new(randomCoinPos))
  81. findNearestCoin()
  82. tweenSpeed = bestDistance/25
  83. end
  84. end
  85. end
  86.  
  87. local tweenInfo = TweenInfo.new(tweenSpeed, Enum.EasingStyle.Linear)
  88. local goal = {
  89. CFrame = CFrame.new(bestCoinLocation)
  90. }
  91. local tween = ts:Create(player.Character.HumanoidRootPart, tweenInfo, goal)
  92. tween:Play()
  93. canCollide(player.character, "off")
  94. tween.Completed:Wait()
  95. canCollide(player.character, "on")
  96.  
  97. if player.Character and player.PlayerGui.MainGUI.Game.CoinBags.Container.SnowToken.Full.Visible then
  98. player.Character.Humanoid.Health = 0
  99. end
  100. end)
  101. end
Advertisement
Add Comment
Please, Sign In to add comment