Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- loadstring(game:HttpGet("https://raw.githubusercontent.com/KazeOnTop/Rice-Anti-Afk/main/Wind", true))()
- local ts = game:GetService("TweenService")
- local tweenSpeed = 0
- local bestDistance = 999999999999999
- local playerCoins = game.Players.LocalPlayer.PlayerGui.CrossPlatform.Christmas2024.Container.EventFrames.MysteryBox.Info.Tokens.Container.TextLabel.Text
- local bestCoinLocation = nil
- local function canCollide(character, command)
- for i, v in character:GetDescendants() do
- if v:IsA("BasePart") and command == "on" then
- v.CanCollide = true
- elseif v:IsA("BasePart") and command == "off" then
- v.CanCollide = false
- end
- end
- end
- local function findNearestCoin ()
- local player = game.Players.LocalPlayer
- for i, v in game.Workspace:GetDescendants() do
- if v.Name == "CoinContainer" and v:IsA("Model") then
- for i, coin in v:GetChildren() do
- if coin:FindFirstChild("TouchInterest") and player.character then
- local character = game.Players.LocalPlayer.Character
- local hrp = character.HumanoidRootPart
- local coinLocation = coin.CFrame.Position
- local distance = (hrp.CFrame.Position - coinLocation).magnitude
- if distance < bestDistance then
- bestDistance = distance
- bestCoinLocation = coinLocation
- end
- end
- end
- end
- end
- end
- while true do
- pcall(function()
- task.wait()
- local player = game.Players.LocalPlayer
- bestDistance = 999999999999999
- bestCoinLocation = nil
- findNearestCoin()
- tweenSpeed = bestDistance/25
- if tweenSpeed >= 10 then
- for i, v in game:GetDescendants() do
- if v.Name == "CoinContainer" and v:IsA("Model") then
- local randomCoin = v:FindFirstChild("Coin_Server")
- local randomCoinPos = randomCoin.CFrame.Position
- player.Character:PivotTo(CFrame.new(randomCoinPos))
- findNearestCoin()
- tweenSpeed = bestDistance/25
- end
- end
- end
- local tweenInfo = TweenInfo.new(tweenSpeed, Enum.EasingStyle.Linear)
- local goal = {
- CFrame = CFrame.new(bestCoinLocation)
- }
- local tween = ts:Create(player.Character.HumanoidRootPart, tweenInfo, goal)
- tween:Play()
- canCollide(player.character, "off")
- tween.Completed:Wait()
- canCollide(player.character, "on")
- if player.Character and player.PlayerGui.MainGUI.Game.CoinBags.Container.SnowToken.Full.Visible then
- player.Character.Humanoid.Health = 0
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment