The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
Slap battles AutoFarm script pastebin roblox
By Slap battles AutoFarm on 2024-11-26 08:00 am | Syntax: LUA | Views: 12



New Script | Raw | Show/Hide line no. | Copy text to clipboard
  1. local virtualUser = game:GetService('VirtualUser')
  2. local function getchar()
  3.    char = game.Players.LocalPlayer.Character
  4. end
  5. local function getclosest()
  6.    getchar()
  7.    local hrp = char:WaitForChild("HumanoidRootPart")
  8.    local num = 10000000
  9.    local nam = nil
  10.    for i,v in pairs(game.Players:GetPlayers()) do
  11.        pcall(function()
  12.        if (hrp.Position - v.Character.HumanoidRootPart.Position).Magnitude < num then
  13.            if v.Name ~= char.Name and not v.Character:FindFirstChild("rock") then
  14.                num = (hrp.Position - v.Character.HumanoidRootPart.Position).Magnitude
  15.                nam = v.Name
  16.            end
  17.        end
  18.        end)
  19.    end
  20.    return nam
  21. end
  22. local function stareat(player)
  23.    getchar()
  24.    local plr = game.Workspace:WaitForChild(player)
  25.    if not char:FindFirstChild("HumanoidRootPart") and plr:FindFirstChild("HumanoidRootPart") then return end
  26.    local chrPos=char.PrimaryPart.Position
  27.    local tPos=plr:FindFirstChild("HumanoidRootPart").Position
  28.    local modTPos=Vector3.new(tPos.X,chrPos.Y,tPos.Z)
  29.    local newCF=CFrame.new(chrPos,modTPos)
  30.    char:SetPrimaryPartCFrame(newCF)
  31. end
  32. local function got(playr)
  33.    getchar()
  34.    local uwu = game.Workspace:FindFirstChild(playr).HumanoidRootPart.Position
  35.    char.Humanoid:MoveTo(uwu)
  36. end
  37.  
  38. while wait(0.3) do
  39.    getchar()
  40.    if char:WaitForChild("isInArena").Value == true then
  41.        getchar()
  42.        stareat(getclosest())
  43.        got(getclosest())
  44.        virtualUser:CaptureController()
  45.        virtualUser:ClickButton1(Vector2.new())
  46.    elseif char:WaitForChild("isInArena").Value == false then
  47.        char:MoveTo(game:GetService("Workspace").Lobby.Teleport1.Position)
  48.    end
  49. end



  • Recent Roblox Scripts