The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
Attack on Titan: Freedom Awaits script pastebin roblox
By LINK GAME on 2024-09-20 08:00 am | Syntax: LUA | Views: 10



New Script | Raw | Show/Hide line no. | Copy text to clipboard
  1.  
  2.  
  3. local Players = game:GetService("Players")
  4. local LocalPlayer = Players.LocalPlayer
  5. local RS = game:GetService("RunService")
  6.  
  7. --// Studs between player and position
  8. local function getDistance(position)
  9.    local hrp = LocalPlayer.Character.HumanoidRootPart
  10.    return (position - hrp.Position).Magnitude
  11. end
  12.  
  13. --// Auto attack loop
  14. _G.autofarm = true
  15. spawn(function()
  16.    while _G.autofarm do
  17.        for _, titan in pairs(workspace.Titans:GetChildren()) do
  18.            for _, hitbox in pairs(titan.Hitboxes.Player:GetChildren()) do
  19.                if hitbox.Name == "Nape" then
  20.                    local LPChar = LocalPlayer.Character
  21.                    if LPChar then
  22.                        local hrp = LPChar:FindFirstChild("HumanoidRootPart")
  23.                        if hrp and getDistance(hitbox.Position) < 50 then
  24.                            local args = {
  25.                                [1] = {
  26.                                    [1] = hitbox
  27.                                },
  28.                                [2] = 9e9 -- power ?
  29.                            }
  30.  
  31.                            game:GetService("ReplicatedStorage").Assets.Remotes.Blade:FireServer(unpack(args))
  32.                        end
  33.                    end
  34.                end
  35.            end
  36.        end
  37.        RS.Heartbeat:Wait()
  38.    end
  39. end)
  40.  
  41. --// Teleport loop
  42. spawn(function()
  43.    while _G.autofarm do
  44.        for _, titan in pairs(workspace.Titans:GetChildren()) do
  45.            for _, hitbox in pairs(titan.Hitboxes.Player:GetChildren()) do
  46.                if hitbox.Name == "Nape" then
  47.                local LPChar = LocalPlayer.Character
  48.                local titanHum = hitbox:FindFirstChild("HP")
  49.                    if LPChar and titanHum and titanHum.Value > 0 then
  50.                        local hrp = LPChar:FindFirstChild("HumanoidRootPart")
  51.                        if hrp then
  52.                            repeat
  53.                                hrp.CFrame = CFrame.new(hitbox.Position + Vector3.new(0,6,0), hitbox.Position)
  54.                                RS.Heartbeat:Wait()
  55.                            until
  56.                                titanHum.Value <= 0 or _G.autofarm == false
  57.                        end
  58.                    end
  59.                end
  60.            end
  61.        end
  62.        RS.Heartbeat:Wait()
  63.    end
  64. end)
  65.  
  66. --// Anti Afk
  67. local VirtualUser=game:GetService('VirtualUser')
  68. game:service('Players').LocalPlayer.Idled:Connect(function()
  69.     VirtualUser:CaptureController()
  70.     VirtualUser:ClickButton2(Vector2.new())
  71. end)