Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Rex. E#6809
- -- 10/22/2022
- -- Updated 1/23/2023
- -- Made for synapse
- -- How it works: When an enemy is in range, it dies. With specific enemies they take longer to die because of a thing called Network ownership, and they will take longer most likely due to the joint sizes on their body. An example being the gear 4 dungeon boss. Just wait a minute in the air and you'll win.
- -- A 0ne piece game Raid/Dungeon Autofarm. Must enter the game to use, will make loop dungeons entirely auto in the future.
- -- Game: https://www.roblox.com/games/8396586868/x5-A-0ne-Piece-Game
- local Players = game:GetService("Players")
- local Player = Players.LocalPlayer
- local Enemies = workspace.Entities
- local RenderStepped = game:GetService("RunService").RenderStepped
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local Stepped = game:GetService("RunService").Stepped
- local Char = Player.Character
- local Root = Char:FindFirstChild("HumanoidRootPart")
- local TweenService = game:GetService("TweenService")
- local Remotes = ReplicatedStorage.Remotes
- local RequestAbility = Remotes.requestAbility
- local Clip = false
- local DungeonSafeFrame = CFrame.new(136.988327, 15304.5391, 1494.77112)
- local FarmType = "Auto" -- Farmtype Weapon is for xp and more reliable farm, while Farmtype auto is for sitting in the air and waiting, not getting much xp.
- local WeaponTypes = {DF = "Devil Fruit", SW = "Sword Style", FS = "Fighting Style"}
- local WeaponType = SW
- _G.AutoSafepoint = true -- Networkowner reliance is a bitch.
- function SetHp()
- for i,Enemy in pairs(Enemies:GetChildren()) do
- if Players:GetPlayerFromCharacter(Enemy) == nil or false then
- if Enemy:FindFirstChildOfClass("Humanoid") then
- local Hum = Enemy:FindFirstChildOfClass("Humanoid")
- if _G.AutoSafepoint then
- Hum.Health = 0
- --Hum.Health = 5
- else
- if Enemy:FindFirstChild("HumanoidRootPart") then
- if isnetworkowner(Enemy:FindFirstChild("HumanoidRootPart")) == false then
- Root.CFrame = Enemy:FindFirstChild("HumanoidRootPart").CFrame
- Hum.Health = 0
- --wait()
- --Hum.Health = 5
- Root.CFrame = DungeonSafeFrame
- end
- end
- end
- end
- end
- end
- end
- function MakeTween()
- local Finish = {CFrame = CFrame.new(136.988327, 15304.5391, 1494.77112)}
- local Info = TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.In)
- local Tween = TweenService:Create(Root,Info,Finish)
- Tween:Play()
- Tween.Completed:Connect(function()
- repeat RenderStepped:Wait()
- if _G.AutoSafepoint then
- Root.CFrame = DungeonSafeFrame
- Root.Anchored = true
- else
- end
- until nil
- end)
- end
- function NoclipLoop()
- if Clip == false and Player.Character ~= nil then
- for _, child in pairs(Player.Character:GetDescendants()) do
- if child:IsA("BasePart") and child.CanCollide == true and child.Name ~= floatName then
- child.CanCollide = false
- end
- end
- end
- end
- function firerequest(Type,Key)
- pcall(function()
- RequestAbility:FireServer(Type,Key,Root.CFrame,Root,5)
- end)
- end
- function AutoHit()
- for i,Enemy in pairs(Enemies:GetChildren()) do
- if Players:GetPlayerFromCharacter(Enemy) == nil or false then
- for i,Hitbox in pairs(Char:GetDescendants()) do
- if Hitbox.Name == "Handle" or Hitbox.Name == "Blade" and WeaponType == SW then
- firetouchinterest(Hitbox, Enemy:FindFirstChild("HumanoidRootPart"), 0)
- firetouchinterest(Hitbox, Enemy:FindFirstChild("HumanoidRootPart"), 1)
- elseif Hitbox.Name == "Right Arm" or Hitbox.Name == "Left Arm" or Hitbox.Name == "Torso" and WeaponType == DF then
- firetouchinterest(Hitbox, Enemy:FindFirstChild("HumanoidRootPart"), 0)
- firetouchinterest(Hitbox, Enemy:FindFirstChild("HumanoidRootPart"), 1)
- elseif Hitbox.Name == "Right Arm" or Hitbox.Name == "Left Arm" or Hitbox.Name == "Right Leg" or Hitbox.Name == "Left Leg" or Hitbox.Name == "Torso" and WeaponType == FS then
- firetouchinterest(Hitbox, Enemy:FindFirstChild("HumanoidRootPart"), 0)
- firetouchinterest(Hitbox, Enemy:FindFirstChild("HumanoidRootPart"), 1)
- end
- end
- end
- end
- if WeaponType == "FS" then
- firerequest("Fighting Style", "Q")
- firerequest("Fighting Style", "E")
- firerequest("Fighting Style", "R")
- elseif WeaponType == "SW" then
- firerequest("Sword Style", "Q")
- firerequest("Sword Style", "R")
- firerequest("Sword Style", "F")
- elseif WeaponType == "DF" then
- firerequest("Devil Fruit", "Q")
- firerequest("Devil Fruit", "E")
- firerequest("Devil Fruit", "R")
- firerequest("Devil Fruit", "F")
- end
- end
- if game.PlaceId == 9812430518 then
- MakeTween()
- Noclipping = Stepped:Connect(NoclipLoop)
- end
- while RenderStepped:wait() do
- if FarmType == "Auto" then
- SetHp()
- elseif FarmType == "Weapon" then
- AutoHit()
- end
- if game.PlaceId == 9812430518 then
- --Root.Anchored = false
- --MakeTween()
- --Root.CFrame = Root.CFrame
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement