local Environment = getgenv and getgenv() or _G local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local GuiService = game:GetService("GuiService") local CollectionService = game:GetService("CollectionService") local Player = Players.LocalPlayer local Previous = Environment.CloverSuite local Preferences = Previous and { Flags = table.clone(Previous.Flags), Slot = Previous.Slot, Visible = Previous.Library and Previous.Library.Toggled, Depth = Previous.Depth or Previous.Height } if Previous then Previous:Destroy() end local Suite = { Version = "2026-11-29.10", Flags = {Farm = false, Aura = false, Bosses = false}, Slot = "Auto", Depth = 5, Native = {}, Connections = {}, Enemies = {}, QuestBlocked = {}, ZoneVisits = {}, NativeStatus = "Waiting for native systems", Status = "Automation off", CombatStatus = "Aura off", NextLoad = 0, NextAttack = 0, NextStream = 0, Dead = false } if Preferences then for Key in Suite.Flags do Suite.Flags[Key] = Preferences.Flags[Key] == true end Suite.Slot = Preferences.Slot if type(Preferences.Depth) == "number" and Preferences.Depth == Preferences.Depth then Suite.Depth = math.clamp(Preferences.Depth, 1, 50) end end Environment.CloverSuite = Suite local AimSlope = 0.35 local AimCosine = 1 / math.sqrt(1 + AimSlope * AimSlope) local AimSine = AimSlope * AimCosine local LaunchUp = Vector3.new(0, 1, 0) local LaunchForward = 3 local function PredictionVelocity(Target, Profile) local Velocity = Target.Root.AssemblyLinearVelocity return Profile.Speed and Velocity.Magnitude < math.min(120, Profile.Speed * AimCosine) and Velocity or Vector3.zero end local function ProjectileAim(Position, Target, Velocity, Profile) local Offset = Target - Position - LaunchUp local Distance = Offset:Dot(Offset) - LaunchForward * LaunchForward if Distance <= 0 or not Profile.Speed or Profile.Speed <= 0 then return nil end local Coefficient = Velocity:Dot(Velocity) - Profile.Speed * Profile.Speed local Linear = 2 * (Offset:Dot(Velocity) - LaunchForward * Profile.Speed) local Discriminant = Linear * Linear - 4 * Coefficient * Distance if Coefficient >= 0 or Discriminant < 0 then return nil end local Time = 2 * Distance / (math.sqrt(Discriminant) - Linear) if Time < 0 or Time * Profile.Speed > Profile.Range + 0.00001 then return nil end local Hit = Target + Velocity * Time local Direction = Hit - Position - LaunchUp local Horizontal = Vector3.new(Direction.X, 0, Direction.Z).Magnitude if Horizontal < 1 or math.abs(Direction.Y) > Horizontal * AimSlope + 0.00001 then return nil end return Hit - LaunchUp end function Suite.CloseDialog(Self) local Dialog = Self.OwnedDialog Self.OwnedDialog = nil if Dialog and Dialog.Parent then Dialog.Visible = false end end function Suite.SetDepth(Self, Value) if type(Value) ~= "number" or Value ~= Value or math.abs(Value) == math.huge then return end Self.Depth = math.clamp(math.floor(Value * 2 + 0.5) / 2, 1, 50) local Control = Self.Controls and Self.Controls.Depth if Control and Control:Get() ~= Self.Depth then Control:Set(Self.Depth) end end function Suite.StopMotion(Self, ReturnToSurface) local Motion = Self.Motion if not Motion then return end Self.Motion = nil for Index, Connection in Motion.Connections do Connection:Disconnect() end table.clear(Motion.Connections) local SameCharacter = Player.Character == Motion.Character and Motion.Root.Parent and Motion.Humanoid.Parent == Motion.Character if ReturnToSurface and SameCharacter and Motion.Humanoid.Health > 0 and not Motion.Root.Anchored and Player:GetAttribute("Warping") ~= true then local Exit = Motion.ReturnFrame if Motion.LastCombatPosition then local Surface = Self:Ground(Motion.LastCombatPosition + Vector3.new(10, 0, 0)) if Surface then Exit = CFrame.new(Surface) * Motion.Upright end end Motion.Root.CFrame = Exit Motion.Root.AssemblyLinearVelocity = Vector3.zero Motion.Root.AssemblyAngularVelocity = Vector3.zero end if Motion.Velocity then Motion.Velocity:Destroy() end if Motion.Attachment then Motion.Attachment:Destroy() end for PartObject, CanCollide in Motion.Parts do pcall(function() if PartObject.CanCollide == false then PartObject.CanCollide = CanCollide end end) end if Motion.Humanoid.Parent then if Motion.Humanoid.AutoRotate == false then Motion.Humanoid.AutoRotate = Motion.AutoRotate end if Motion.Humanoid.PlatformStand == true then Motion.Humanoid.PlatformStand = Motion.PlatformStand end if SameCharacter and Motion.Humanoid.Health > 0 and not Motion.Humanoid.PlatformStand and not Motion.Root.Anchored then Motion.Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp) end end end function Suite.MotionStep(Self) local Motion = Self.Motion if not Motion then return end if Self.Dead or not Self.Flags.Farm or Player.Character ~= Motion.Character or not Motion.Root.Parent or Motion.Humanoid.Parent ~= Motion.Character or not Motion.Character:IsDescendantOf(workspace) or Motion.Humanoid.Health <= 0 then Self:StopMotion(false) return end if Player:GetAttribute("Warping") == true or Player:GetAttribute("InCreation") ~= false then Self:StopMotion(false) return end local Held = Self.Native.Kit.isHolding() Motion.Velocity.Enabled = not Held if Held or Motion.Root.Anchored then return end local Target = Motion.Target if Target and not Self:ValidEnemy(Target) then Motion.Target = nil Target = nil end local Profile = Motion.Profile if Target and Profile and not Self.Paused then local Forward = Vector3.new(Target.Root.CFrame.LookVector.X, 0, Target.Root.CFrame.LookVector.Z) if Forward.Magnitude > 0.001 then Target.Forward = Forward.Unit end Forward = Target.Forward or Vector3.new(0, 0, -1) local Rise = Self.Depth + 0.6 - LaunchUp.Y local Offset = 4 * Profile.Reach local Velocity = PredictionVelocity(Target, Profile) Motion.Aim = nil if Profile.Projectile and Profile.Speed and Profile.Speed > 0 then local Earliest = 0.001 / Profile.Speed local Latest = Profile.Range / Profile.Speed for Index = 1, 2 do local Sign = Index == 1 and 1 or -1 local Rate = Sign * Velocity.Y - AimSine * Profile.Speed local Bound = LaunchForward * AimSine - Sign * Rise if math.abs(Rate) < 0.00000001 then if Bound < 0 then Latest = -1 end elseif Rate > 0 then Latest = math.min(Latest, Bound / Rate) else Earliest = math.max(Earliest, Bound / Rate) end end Offset = math.max(math.abs(Rise) / AimSlope, math.sqrt(math.max(0, LaunchForward * LaunchForward - Rise * Rise))) + 0.001 if Earliest <= Latest then local Length = LaunchForward + Profile.Speed * Earliest local Vertical = Rise + Velocity.Y * Earliest local Along = Velocity:Dot(Forward) local Across = Vector3.new(Velocity.X, 0, Velocity.Z) - Forward * Along local Squared = Length * Length - Vertical * Vertical - Across:Dot(Across) * Earliest * Earliest if Squared >= 0 then Offset = Along * Earliest + math.sqrt(Squared) + 0.001 end end end Motion.LastCombatPosition = Target.Root.Position Motion.Position = Target.Root.Position + Forward * Offset - Vector3.new(0, Self.Depth, 0) Motion.Upright = CFrame.lookAt(Vector3.zero, -Forward) if Profile.Projectile then Motion.Aim = ProjectileAim(Motion.Position, Target.Root.Position + Vector3.new(0, 0.6, 0), Velocity, Profile) end end for PartObject in Motion.Parts do if PartObject.CanCollide then PartObject.CanCollide = false end end Motion.Humanoid.AutoRotate = false Motion.Humanoid.PlatformStand = true Motion.Root.AssemblyLinearVelocity = Vector3.zero Motion.Root.AssemblyAngularVelocity = Vector3.zero if (not Target or Self.Paused) and Motion.Root.CFrame.UpVector.Y > 0.999 then Motion.Upright = Motion.Root.CFrame.Rotation end Motion.Root.CFrame = CFrame.new(Motion.Position) * Motion.Upright end function Suite.EnsureMotion(Self) if Self.Motion then if Self.Motion.Character == Self.Character and Self.Motion.Root == Self.Root and Self.Motion.Humanoid == Self.Humanoid then return true end Self:StopMotion(false) end if not Self.Flags.Farm or not Self.Root or not Self.Humanoid or Self.Root.Anchored or Self.Humanoid.Health <= 0 then return false end local Direction = Vector3.new(Self.Root.CFrame.LookVector.X, 0, Self.Root.CFrame.LookVector.Z) local Upright = Direction.Magnitude > 0.001 and CFrame.lookAt(Vector3.zero, Direction) or CFrame.new() local Motion = { Character = Self.Character, Root = Self.Root, Humanoid = Self.Humanoid, AutoRotate = Self.Humanoid.AutoRotate, PlatformStand = Self.Humanoid.PlatformStand, ReturnFrame = CFrame.new(Self.Root.Position) * Upright, Upright = Upright, Position = Self.Root.Position, Connections = {}, Parts = {} } Self.Motion = Motion local function Register(Object) if Object:IsA("BasePart") and Motion.Parts[Object] == nil then Motion.Parts[Object] = Object.CanCollide Object.CanCollide = false end end for Index, Object in Motion.Character:GetDescendants() do Register(Object) end table.insert(Motion.Connections, Motion.Character.DescendantAdded:Connect(Register)) table.insert(Motion.Connections, Motion.Character.DescendantRemoving:Connect(function(Object) local CanCollide = Motion.Parts[Object] if CanCollide ~= nil then if Object.CanCollide == false then Object.CanCollide = CanCollide end Motion.Parts[Object] = nil end end)) local Attachment = Instance.new("Attachment") Attachment.Name = "CloverFarmAttachment" Attachment.Parent = Motion.Root Motion.Attachment = Attachment local Velocity = Instance.new("LinearVelocity") Velocity.Name = "CloverFarmFloat" Velocity.Attachment0 = Attachment Velocity.RelativeTo = Enum.ActuatorRelativeTo.World Velocity.VelocityConstraintMode = Enum.VelocityConstraintMode.Vector Velocity.ForceLimitsEnabled = true Velocity.MaxForce = 100000000 Velocity.VectorVelocity = Vector3.zero Velocity.Parent = Motion.Root Motion.Velocity = Velocity table.insert(Motion.Connections, RunService.PreSimulation:Connect(function() Self:MotionStep() end)) Self:MotionStep() return true end function Suite.StopFollowing(Self) if Self.Motion then Self.Motion.Target = nil Self.Motion.Profile = nil Self.Motion.Aim = nil end end function Suite.CancelWork(Self) Self:StopMotion(true) Self.PendingQuest = nil Self.Target = nil Self:CloseDialog() end function Suite.Set(Self, Key, Value) if Self.Flags[Key] == nil then return end local Control = Self.Controls and Self.Controls[Key] if Control and Control:Get() ~= (Value == true) then Control:Set(Value == true) return end Self.Flags[Key] = Value == true if Key == "Farm" and not Value then Self:CancelWork() end end function Suite.Destroy(Self) if Self.Dead then return end Self.Dead = true Self:CancelWork() for Index, Connection in Self.Connections do Connection:Disconnect() end table.clear(Self.Connections) if Self.EnemyConnections then for Index, Connection in Self.EnemyConnections do Connection:Disconnect() end table.clear(Self.EnemyConnections) end for Model, Record in Self.Enemies do for Index, Connection in Record.Connections do Connection:Disconnect() end table.clear(Record.Connections) end table.clear(Self.Enemies) if Self.AimAdapter and Self.Native.Combat and Self.Native.Combat.aim == Self.AimAdapter then Self.Native.Combat.aim = Self.OriginalAim end if Self.Library then pcall(Self.Library.Destroy, Self.Library) end end function Suite.LoadNative(Self) if Self.NativeReady or os.clock() < Self.NextLoad then return end Self.NextLoad = os.clock() + 2 Player = Players.LocalPlayer local Shared = ReplicatedStorage:FindFirstChild("Shared") local Data = Shared and Shared:FindFirstChild("Data") local Scripts = Player and Player:FindFirstChildOfClass("PlayerScripts") local Client = Scripts and Scripts:FindFirstChild("Client") local Controllers = Client and Client:FindFirstChild("Controllers") local Effects = Client and Client:FindFirstChild("VFX") local M1 = Effects and Effects:FindFirstChild("M1") local Remotes = ReplicatedStorage:FindFirstChild("Remotes") local Quest = Remotes and Remotes:FindFirstChild("Quest") local Dialog = Remotes and Remotes:FindFirstChild("Dialog") if not Data or not Controllers or not Quest or not Dialog then return end local Ready = true Self.NativeStatus = "Waiting for native systems" for Key, Path in { State = {Client, "State"}, Combat = {Controllers, "CombatController"}, HubRules = {Client, "HubRules"}, Kit = {Effects, "Kit"}, Flight = {Client, "Flight"}, Tune = {M1, "Tune"}, Weapons = {Data, "Weapons"}, Quests = {Data, "Quests"}, Enemies = {Data, "Enemies"}, World = {Data, "World"}, Regions = {Data, "Regions"}, Styles = {Data, "FightingStyles"}, Blades = {Data, "AntiMagicBlades"}, Codes = {Data, "Codes"}, Realm = {Shared, "Realm"}, Config = {Shared, "Config"} } do if not Self.Native[Key] then local Object = Path[1] and Path[1]:FindFirstChild(Path[2]) if Object and Object:IsA("ModuleScript") then local Success, Result = pcall(require, Object) if Self.Dead then return end if Success and type(Result) == "table" then Self.Native[Key] = Result else Self.NativeStatus = Key .. ": " .. string.sub(tostring(Result), 1, 120) end end end if not Self.Native[Key] and Key ~= "Codes" then Ready = false end end if not Ready then return end local Combat = Self.Native.Combat Self.OriginalAim = Combat.aim Self.AimAdapter = function(...) if not Self.Dead and Self.AttackThread == coroutine.running() and Self.AttackAim then return Self.AttackAim end return Self.OriginalAim(...) end Combat.aim = Self.AimAdapter Self.QuestRemote = Quest table.insert(Self.Connections, Dialog.OnClientEvent:Connect(function(Kind, City) local Pending = Self.PendingQuest if Pending and Pending.Kind == "Accept" and Kind == "Quest" and City == Pending.Quest.city then Pending.Authorized = true end end)) table.insert(Self.Connections, Self.Native.State.changed:Connect(function() Self.Target = nil end)) Self.NativeStatus = "Native combat and quest systems ready" Self.NativeReady = true end function Suite.TrackEnemy(Self, Model) if not Model:IsA("Model") or Self.Enemies[Model] then return end local Record = {Model = Model, Connections = {}} Self.Enemies[Model] = Record local function Refresh() Record.Id = Model:GetAttribute("EnemyId") Record.Root = Model:FindFirstChild("HumanoidRootPart") Record.Humanoid = Model:FindFirstChildOfClass("Humanoid") end Refresh() table.insert(Record.Connections, Model.ChildAdded:Connect(Refresh)) table.insert(Record.Connections, Model.ChildRemoved:Connect(Refresh)) table.insert(Record.Connections, Model:GetAttributeChangedSignal("EnemyId"):Connect(Refresh)) table.insert(Record.Connections, Model.AncestryChanged:Connect(function() if Model.Parent ~= Self.EnemyFolder then for Index, Connection in Record.Connections do Connection:Disconnect() end table.clear(Record.Connections) Self.Enemies[Model] = nil if Self.Target == Record then Self.Target = nil end end end)) end function Suite.TrackWorld(Self) local Folder = workspace:FindFirstChild("Enemies") if Folder == Self.EnemyFolder then return end if Self.EnemyConnections then for Index, Connection in Self.EnemyConnections do Connection:Disconnect() end table.clear(Self.EnemyConnections) end for Model, Record in Self.Enemies do for Index, Connection in Record.Connections do Connection:Disconnect() end table.clear(Record.Connections) end table.clear(Self.Enemies) Self.EnemyFolder = Folder if not Folder then return end Self.EnemyConnections = {} for Index, Model in Folder:GetChildren() do Self:TrackEnemy(Model) end table.insert(Self.EnemyConnections, Folder.ChildAdded:Connect(function(Model) Self:TrackEnemy(Model) end)) end function Suite.ValidEnemy(Self, Record, EnemyId) if not Record or not Record.Root or not Record.Humanoid or Record.Model.Parent ~= Self.EnemyFolder then return false end if not Record.Root:IsA("BasePart") or Record.Humanoid.Health <= 0 or type(Record.Id) ~= "string" then return false end if EnemyId and Record.Id ~= EnemyId then return false end if Record.Model:GetAttribute("TrainingDummy") == true or Record.Model:GetAttribute("Immortal") == true or Record.Model:FindFirstChildOfClass("ForceField") then return false end local Protection = Record.Model:GetAttribute("Untouchable") if type(Protection) == "number" and math.abs(Protection) < math.huge and Protection > workspace:GetServerTimeNow() then return false end return Self.Native.Enemies.get(Record.Id) ~= nil end function Suite.Sight(Self, Root, Target, Position) local Parameters = RaycastParams.new() Parameters.FilterType = Enum.RaycastFilterType.Exclude local Excluded = {Self.Character, Target.Model} local Effects = workspace:FindFirstChild("ClientFX") if Effects then table.insert(Excluded, Effects) end Parameters.FilterDescendantsInstances = Excluded Parameters.RespectCanCollide = true Parameters.IgnoreWater = true local Origin = Root.Position + Vector3.new(0, 0.8, 0) return workspace:Raycast(Origin, Position - Origin, Parameters) == nil end function Suite.EnsureWeapon(Self, Profile) local Current = Self.Native.State.slot local Desired = Self.Slot if Desired == "Auto" then if Current == "Melee" or Current == "Sword" or Current == "Grimoire" then return true end Desired = Profile.equipped and Profile.equipped.sword and "Sword" or "Melee" end if Desired == "Sword" and not (Profile.equipped and Profile.equipped.sword) then Self.CombatStatus = "Equip or buy a sword, or select Auto/Melee" return false end if Desired == "Grimoire" and not Profile.grimoire then Self.CombatStatus = "Obtain a grimoire, or select Auto/Melee" return false end if Current ~= Desired then if os.clock() >= (Self.NextEquip or 0) then Self.NextEquip = os.clock() + 1 Self.Native.Combat.selectSlot(Desired) end return false end return true end function Suite.AttackProfile(Self) local Native = Self.Native if not Self.NativeReady then return nil end local Weapon = Native.Weapons.get(Native.State.currentWeaponId()) if not Weapon then return nil end local Form = Native.Weapons.armourForm(Weapon.id, Player:GetAttribute("Buff")) local Style = Native.Styles.m1(Weapon.id) local Blade = Native.Blades.m1For(Player, Weapon, Player:GetAttribute("SwordSummoned") == true) local Bolt = Weapon.kind == "Grimoire" and Weapon.blade == nil and Form == nil local Slash = Blade and Blade.kind == "slash" local Reach = Blade and Blade.reach or Style and Style.reach or (Weapon.kind == "Sword" or Weapon.blade or Form == "blade" or Form == "claw") and 1.3 or Form == "fist" and (Native.Weapons.armourReach(Player:GetAttribute("Buff")) or 1.45) or Form == "thunder" and 1.2 or 1 local Cooldown = Bolt and Native.Config.BOLT_COOLDOWN or Form == "thunder" and 0.22 or Form == "claw" and 0.3 or Blade and Blade.cooldown or Style and Style.cooldown or Native.Config.M1_COOLDOWN local Range, Speed if Bolt then local Tune = Native.Tune.bolt Range = (Tune and Tune.range or 85) * Native.Config.PROJECTILE_RANGE Speed = Tune and Tune.speed or 150 elseif Slash then Range = Blade.range * Native.Config.PROJECTILE_RANGE Speed = Blade.speed else Range = 10 * Reach end return {Reach = Reach, Range = Range, Cooldown = math.max(0.1, Cooldown), Projectile = Bolt or Slash, Speed = Speed} end function Suite.InReach(Self, Record, Root, Profile) local Offset = Record.Root.Position - Root.Position if Self.Flags.Farm and Self.Motion and Self.Motion.Target == Record and Profile.Projectile then return Self.Motion.Aim ~= nil end if Offset.Magnitude > Profile.Range + (Profile.Projectile and LaunchForward + LaunchUp.Magnitude or 0) then return false end if Self.Flags.Farm and Self.Motion and Self.Motion.Target == Record then return true end if Profile.Projectile then local Aim = ProjectileAim(Root.Position, Record.Root.Position + Vector3.new(0, 0.6, 0), PredictionVelocity(Record, Profile), Profile) return Aim ~= nil and Self:Sight(Root, Record, Aim + LaunchUp) end if math.abs(Offset.Y) > 4 * Profile.Reach then return false end return Self:Sight(Root, Record, Record.Root.Position + Vector3.new(0, 0.6, 0)) end function Suite.FindEnemy(Self, Root, Profile, EnemyId) local Best, Cost for Model, Record in Self.Enemies do if Self:ValidEnemy(Record, EnemyId) then local Distance = (Record.Root.Position - Root.Position).Magnitude if (EnemyId ~= nil or Self:InReach(Record, Root, Profile)) and (not Cost or Distance < Cost) then Best = Record Cost = Distance end end end return Best end function Suite.Attack(Self, Record, Root, Profile) if not Self:ValidEnemy(Record) then return false end if not Self:InReach(Record, Root, Profile) then Self.CombatStatus = Profile.Projectile and "Depth or target motion is outside native projectile limits" or "Selected depth is outside native weapon reach" return false end if os.clock() < Self.NextAttack then return false end if Self.Native.Combat.busy() or Player:GetAttribute("SummonLock") == true then return false end local Aim = Record.Root.Position + Vector3.new(0, 0.6, 0) if Profile.Projectile then if Self.Flags.Farm and Self.Motion and Self.Motion.Target == Record then Aim = Self.Motion.Aim else Aim = ProjectileAim(Root.Position, Aim, PredictionVelocity(Record, Profile), Profile) end if not Aim then Self.CombatStatus = "No native projectile path to the target" return false end end Self.AttackThread = coroutine.running() Self.AttackAim = Aim local Success, Result = pcall(Self.Native.Combat.m1) Self.AttackAim = nil Self.AttackThread = nil Self.NextAttack = os.clock() + Profile.Cooldown Self.CombatStatus = Success and "Attacking " .. Record.Model.Name or "Combat error: " .. string.sub(tostring(Result), 1, 100) return Success end function Suite.ChooseQuest(Self, Profile) local Best local CurrentRealm = Self.Native.Realm.current() for Index, Quest in Self.Native.Quests.all do local Definition = Self.Native.Enemies.get(Quest.enemy) local Region = Self.Native.Regions.get(Quest.city) local Realm = Region and Region.realm or Self.Native.World.getCity(Quest.city) and CurrentRealm local Boss = Definition and Definition.boss == true if Definition and Realm == CurrentRealm and Quest.minLevel <= Profile.level and (Self.Flags.Bosses or not Boss) and os.clock() >= (Self.QuestBlocked[Quest.id] or 0) then if not Best or Quest.minLevel > Best.minLevel or Quest.minLevel == Best.minLevel and Quest.id < Best.id then Best = Quest end end end return Best end function Suite.Ground(Self, Position) local Parameters = RaycastParams.new() Parameters.FilterType = Enum.RaycastFilterType.Exclude local Excluded = {Self.Character} for Index, Name in {"Enemies", "NPCs", "Townsfolk", "RegionNPCs", "ClientFX", "TeacherNpcs", "Familiars"} do local Object = workspace:FindFirstChild(Name) if Object then table.insert(Excluded, Object) end end Parameters.FilterDescendantsInstances = Excluded Parameters.RespectCanCollide = true Parameters.IgnoreWater = false local Origin = Vector3.new(Position.X, math.max(Position.Y + 120, 160), Position.Z) local Best, Cost local Lift = Self.Humanoid.HipHeight + Self.Root.Size.Y * 0.5 for Index = 1, 8 do local Hit = workspace:Raycast(Origin, Vector3.new(0, -(Origin.Y + 100), 0), Parameters) if not Hit then break end if Hit.Material == Enum.Material.Water and not Best then return nil end if Hit.Normal.Y >= 0.55 and Hit.Material ~= Enum.Material.Water then local Distance = math.abs(Hit.Position.Y + Lift - Position.Y) if not Cost or Distance < Cost then Best = Hit.Position + Vector3.new(0, Lift, 0) Cost = Distance end if Distance < 8 then return Best end end if Hit.Position.Y >= Origin.Y then break end Origin = Vector3.new(Position.X, Hit.Position.Y - 0.1, Position.Z) end return Best end function Suite.RequestStream(Self, Position) if os.clock() < Self.NextStream then return end Self.NextStream = os.clock() + 2 task.spawn(function() if not Self.Dead then pcall(Player.RequestStreamAroundAsync, Player, Position, 2) end end) end function Suite.Travel(Self, Position) if not Self:EnsureMotion() then Self.Status = "Waiting for character movement control" return false end Self:RequestStream(Position) local Ground = Self:Ground(Position) local Destination = Ground or Position + Vector3.new(0, Self.Humanoid.HipHeight + Self.Root.Size.Y * 0.5, 0) Self.Motion.Target = nil Self.Motion.Profile = nil Self.Motion.Aim = nil Self.Motion.Position = Destination Self.Root.CFrame = CFrame.new(Destination) * Self.Motion.Upright Self.Root.AssemblyLinearVelocity = Vector3.zero Self.Root.AssemblyAngularVelocity = Vector3.zero if Ground then Self.Motion.ReturnFrame = Self.Root.CFrame end return true end function Suite.Giver(Self, Quest) local Known = ReplicatedStorage:GetAttribute("NpcSpot_" .. Quest.city .. "_Quest") local NearbyPosition, NearbyPrompt, NearbyDistance for Index, FolderName in {"NPCs", "RegionNPCs"} do local Folder = workspace:FindFirstChild(FolderName) if Folder then for Position, Model in Folder:GetChildren() do if Model:IsA("Model") then local Root = Model:FindFirstChild("HumanoidRootPart") or Model.PrimaryPart or Model:FindFirstChildWhichIsA("BasePart", true) local Prompt = Model:FindFirstChildWhichIsA("ProximityPrompt", true) if Root and Prompt and Prompt.Enabled then if Model:GetAttribute("City") == Quest.city and Model:GetAttribute("NPCKind") == "Quest" then return Root.Position, Prompt end local Distance = typeof(Known) == "Vector3" and (Root.Position - Known).Magnitude if Distance and Distance < 8 and Prompt.ActionText == "Talk" and (not NearbyDistance or Distance < NearbyDistance) then NearbyPosition = Root.Position NearbyPrompt = Prompt NearbyDistance = Distance end end end end end end if NearbyPrompt then return NearbyPosition, NearbyPrompt end if typeof(Known) == "Vector3" then return Known, nil end end function Suite.GetZone(Self, Quest) local Best, Distance for Index, Zone in Self.Native.Enemies.zones do if Zone.enemy == Quest.enemy then local Position = Zone.center local Region = Self.Native.Regions.get(Quest.city) if Region and Region.minY then local Island, Cost for Key, Candidate in Self.Native.Regions.islands or {} do local Center = Candidate.center local Length = Vector3.new(Center.X - Position.X, 0, Center.Z - Position.Z).Magnitude if not Cost or Length < Cost then Island = Candidate Cost = Length end end Position = Vector3.new(Position.X, Island and Island.center.Y or Region.center.Y, Position.Z) end local Cost = (Position - Self.Root.Position).Magnitude + math.max(0, (Self.ZoneVisits[Zone.id] or 0) - os.clock()) * 20 if not Distance or Cost < Distance then Best = {Position = Position, Id = Zone.id} Distance = Cost end end end if not Best then local Position = Self.Native.Regions.timedSpot(Quest.enemy) if Position then Best = {Position = Position, Id = Quest.enemy} end end return Best end function Suite.QuestRequest(Self, Quest, Profile) local Now = os.clock() local Pending = Self.PendingQuest if Pending then if Pending.Authorized and not Pending.Sent then local Gui = Player:FindFirstChildOfClass("PlayerGui") local Shops = Gui and Gui:FindFirstChild("Shops") for Index, Dialog in CollectionService:GetTagged("NpcDialogue") do if Shops and Dialog:IsDescendantOf(Shops) and Dialog:IsA("GuiObject") and Dialog.Visible then Self.OwnedDialog = Dialog break end end Self.QuestRemote:FireServer("accept", Quest.id) Pending.Sent = true Pending.Started = Now Self:CloseDialog() end if Now - Pending.Started > 5 then Self.QuestBlocked[Quest.id] = Now + 15 Self.PendingQuest = nil Self:CloseDialog() Self.Status = "Quest not confirmed; waiting before another request" else Self.Status = Pending.Sent and "Waiting for the server to accept the quest" or "Waiting for the quest-giver dialogue" end return end if Profile.lastQuest == Quest.id and Player:GetAttribute("Pass_QuestAnywhere") == true then Self.PendingQuest = {Quest = Quest, Kind = "Restart", Sent = true, Started = Now} Self.QuestRemote:FireServer("restart") return end local Position, Prompt = Self:Giver(Quest) if not Position then Self.QuestBlocked[Quest.id] = Now + 10 Self.Status = "Waiting for the quest-giver location" return end local Range = Prompt and math.max(2, Prompt.MaxActivationDistance - 2) or 9 if (Position - Self.Root.Position).Magnitude > Range then Self.Status = "Travelling to the " .. Quest.city .. " quest giver" if not Self:Travel(Position) then Self.QuestBlocked[Quest.id] = Now + 20 end return end Self:StopFollowing() if not Prompt then Self:RequestStream(Position) Self.Status = "Loading the live quest-giver prompt" return end Self.PendingQuest = {Quest = Quest, Kind = "Accept", Started = Now} Prompt:InputHoldBegin() task.delay(math.max(0, Prompt.HoldDuration) + 0.05, function() if Prompt.Parent then pcall(Prompt.InputHoldEnd, Prompt) end end) end function Suite.FarmTick(Self, Profile, AttackProfile) local Active = Profile.quest local Quest = Active and Self.Native.Quests.get(Active.id) if Active and not Quest then Self:StopFollowing() Self.Status = "The active quest is not a supported city kill quest" return nil end if not Active then Quest = Self.PendingQuest and Self.PendingQuest.Quest or Self:ChooseQuest(Profile) if Quest then Self:QuestRequest(Quest, Profile) else Self.Status = "No eligible quest in this kingdom" Self:StopFollowing() end return nil end Self.PendingQuest = nil Self:CloseDialog() if (Active.progress or 0) >= Quest.count then Self:StopFollowing() Self.Status = "Waiting for confirmed quest completion" return nil end local Record = Self.Target local Valid = Self:ValidEnemy(Record, Quest.enemy) if not Valid or os.clock() >= (Self.NextTarget or 0) then local Candidate = Self:FindEnemy(Self.Root, AttackProfile, Quest.enemy) if not Valid or Candidate and (Candidate.Root.Position - Self.Root.Position).Magnitude + 8 < (Record.Root.Position - Self.Root.Position).Magnitude then Record = Candidate end Self.Target = Record Self.NextTarget = os.clock() + 0.4 end if Record then Self:RequestStream(Record.Root.Position) if not Self:EnsureMotion() then Self.Status = "Waiting for character movement control" return nil end Self.Motion.Target = Record Self.Motion.Profile = AttackProfile Self:MotionStep() Self.Status = string.format("Farming %s / %.1f studs below", Record.Model.Name, Self.Depth) return Record end if os.clock() < (Self.NextScout or 0) then Self.Status = "Waiting for " .. Quest.enemy .. " to spawn" return nil end local Zone = Self:GetZone(Quest) if not Zone then Self:StopFollowing() Self.Status = "No spawn area available for " .. Quest.enemy return nil end Self.Status = "Loading " .. Quest.enemy .. " spawn area" if Self:Travel(Zone.Position) then Self.ZoneVisits[Zone.Id] = os.clock() + 8 Self.NextScout = os.clock() + 1 Self.Status = "Waiting for " .. Quest.enemy .. " to spawn" end return nil end function Suite.Tick(Self) if Self.Dead then return end Self:LoadNative() if not Self.NativeReady then Self.Status = Self.NativeStatus return end Self:TrackWorld() local Character = Player.Character local Root = Character and Character:FindFirstChild("HumanoidRootPart") local Humanoid = Character and Character:FindFirstChildOfClass("Humanoid") if Self.Character ~= Character then Self:CancelWork() Self.Character = Character end Self.Root = Root Self.Humanoid = Humanoid local Profile = Self.Native.State.profile if not Self.Flags.Farm and not Self.Flags.Aura then Self.Status = "Automation off" Self.CombatStatus = "Aura off" return end if not Root or not Humanoid or Humanoid.Health <= 0 or not Profile then Self:StopMotion(true) Self.Status = "Waiting for the character and native profile" return end local Pending = Self.PendingQuest Self.Paused = GuiService.MenuIsOpen or UserInputService:GetFocusedTextBox() ~= nil or Player:GetAttribute("InCreation") ~= false or Player:GetAttribute("Warping") == true or Character:GetAttribute("Possessed") == true or Self.Native.Kit.isHolding() or Self.Native.HubRules.blocked() if not (Pending and Pending.Authorized) then for Index, Dialog in CollectionService:GetTagged("NpcDialogue") do if Dialog:IsA("GuiObject") and Dialog.Visible and Dialog:IsDescendantOf(Player:FindFirstChildOfClass("PlayerGui")) then Self.Paused = true break end end end if Self.Paused then Self:StopFollowing() Self.Status = "Paused for the game menu, character or cinematic state" return end if Root.Anchored then Self:StopFollowing() Self.Status = "Waiting for native streaming or movement control" return end if Self.Native.Flight.active() then if Self.Flags.Farm then Self.Native.Combat.land() else Self:StopFollowing() Self.Status = "Automatic actions pause during your manual flight" return end end if not Self.Motion and (Humanoid.PlatformStand or Humanoid.Sit) then Self.Status = "Waiting for native movement control" return end if not Self:EnsureWeapon(Profile) then Self:StopFollowing() return end if not Self.Flags.Farm and os.clock() < Self.NextAttack then return end local AttackProfile = Self:AttackProfile() if not AttackProfile then Self.Status = "Waiting for an equipped weapon profile" return end local Target if Self.Flags.Farm then Target = Self:FarmTick(Profile, AttackProfile) else Self.Status = "Standalone aura active" end if not Target and Self.Flags.Aura and not Self.Flags.Farm and not Self.PendingQuest then Target = Self:FindEnemy(Root, AttackProfile, nil) end if Target then Self:Attack(Target, Root, AttackProfile) else Self.CombatStatus = "Waiting for a visible enemy in native reach" end end do local Success, Library = pcall(function() local Cached = Environment.CloverWally local Source = type(Cached) == "table" and Cached.Revision == "305b055f1e18f140d82a8debe509c99d31423805" and Cached.NativeConnections == true and Cached.Source if type(Source) ~= "string" then local Parts = {} for Index = 1, 4 do Parts[Index] = game:HttpGet("https://raw.githubusercontent.com/theneutral0ne/wally-modified/305b055f1e18f140d82a8debe509c99d31423805/wally-modified-parts/part" .. Index .. ".lua") if Suite.Dead then return nil end end Source = table.concat(Parts, "\n") local Replaced Source, Replaced = string.gsub(Source, "(\n%s*)(UserInputService%.[%w]+:Connect%b())", "%1table.insert(Library.InternalConnections, %2)") assert(Replaced == 4, "Wally input connections were not found") Source, Replaced = string.gsub(Source, "Library%.GlobalToggleConnection = UserInputService%.InputBegan:Connect%(function%(Key, Gpe%)", "Library.NativeToggleInput = function(Key, Gpe)", 1) assert(Replaced == 1, "Wally toggle handler was not found") Source, Replaced = string.gsub(Source, "end%);%s*table%.insert%(Library%.InternalConnections, Library%.GlobalToggleConnection%);", [[ end; Library.GlobalToggleConnection = UserInputService.InputBegan:Connect(Library.NativeToggleInput); table.insert(Library.InternalConnections, Library.GlobalToggleConnection);]], 1) assert(Replaced == 1, "Wally toggle connection was not found") Source = string.gsub(Source, "if %(not Gpe%) then", "if not Gpe and not UserInputService:GetFocusedTextBox() then", 1) end local Chunk, Failure = loadstring(Source, "CloverWally") assert(Chunk, Failure) Environment.CloverWally = {Revision = "305b055f1e18f140d82a8debe509c99d31423805", NativeConnections = true, Source = Source} return Chunk() end) if Suite.Dead then return Suite end if not Success then Suite:Destroy() error("Wally Modified failed to load: " .. tostring(Library), 0) end Suite.Library = Library local Ready, Failure = pcall(function() local WindowOptions = { itemspacing = 2, persistwindow = false, usehiddengui = true, underlinecolor = "rainbow", togglestyle = "checkmark", mintextsize = 8 } local Window = Library:CreateWindow("Clover Adventure", WindowOptions) Suite.Interface = Library.RootGui Suite.Interface.Name = "CloverSuite" Suite.Interface.DisplayOrder = 1000 Suite.Interface.ScreenInsets = Enum.ScreenInsets.CoreUISafeInsets local Controls = {} Suite.Controls = Controls local Main = Window:Tab("Main") Controls.Codes = Main:Button("Claim all codes", function() if Suite.Dead or Suite.ClaimingCodes then return end local Remotes = ReplicatedStorage:FindFirstChild("Remotes") local Remote = Remotes and Remotes:FindFirstChild("Code") if not Suite.Native.Codes or not Remote or not Remote:IsA("RemoteFunction") then Library:NotifyError("Codes", "Code data or redemption is unavailable.", 6) return end local Codes = {} for Code, Reward in Suite.Native.Codes do if not Reward.expired then table.insert(Codes, Code) end end table.sort(Codes) Suite.ClaimingCodes = true task.spawn(function() local Claimed = 0 local Message = "No unexpired codes found." local Index = 1 local Retries = 0 while Index <= #Codes and not Suite.Dead do local Code = Codes[Index] local Success, Result = pcall(Remote.InvokeServer, Remote, Code) if Suite.Dead then break end if Success and type(Result) == "table" then if Result.ok == true then Claimed += 1 end local Reply = tostring(Result.message or "No message returned.") Message = Code .. ": " .. Reply if Result.needGroup then break end if Result.ok ~= true and string.find(string.lower(Reply), "slow down", 1, true) then Retries += 1 if Retries >= 3 then Message ..= "\nStopped: the server is still limiting requests." break end Library:NotifyWarn("Codes", Message .. "\nRetrying in " .. 5 * Retries .. " seconds...", 6) task.wait(5 * Retries) continue end if Result.ok ~= true then Library:NotifyWarn("Codes", Message, 6) end else Message = Code .. ": could not reach the server." Library:NotifyError("Codes", Message, 6) end Retries = 0 Index += 1 if Index <= #Codes then task.wait(3) end end Suite.ClaimingCodes = false if not Suite.Dead then Library:Notify("Codes", "Claimed " .. Claimed .. "/" .. #Codes .. ".\n" .. (Index <= #Codes and Message or "Finished checking codes."), 6, {level = Claimed < #Codes and "warn" or "success"}) end end) end) Main:Section("Farm") Controls.Farm = Main:Toggle("Quest autofarm", {flag = "Farm", default = Suite.Flags.Farm}, function(Value) Suite:Set("Farm", Value) end) Controls.Aura = Main:Toggle("Kill aura", {flag = "Aura", default = Suite.Flags.Aura}, function(Value) Suite:Set("Aura", Value) end) Controls.Bosses = Main:Toggle("Include boss quests", {flag = "Bosses", default = Suite.Flags.Bosses}, function(Value) Suite:Set("Bosses", Value) end) Controls.Depth = Main:Slider("Farm depth", {flag = "Depth", min = 1, max = 50, default = Suite.Depth, precise = true, decimals = 1, step = 0.5}, function(Value) Suite:SetDepth(Value) end) Controls.Slot = Main:Dropdown("Attack slot", {flag = "Slot", list = {"Auto", "Melee", "Sword", "Grimoire"}}, function(Value) Suite.Slot = Value Suite.NextEquip = 0 end) Controls.Slot:Set(Suite.Slot, false) Main:Label("Right Shift / Ctrl or CLOVER to hide.", {textSize = 11}) local Settings = Window:Tab("Settings") Controls.Unload = Settings:Button("Unload", function() Suite:Destroy() end) Controls.InterfaceKey = Settings:Bind("UI shortcut", {flag = "InterfaceKey", default = Enum.KeyCode.RightShift, kbonly = true, mode = "press"}, function(Input, Previous, Action) if Action == "press" and Input.KeyCode ~= Enum.KeyCode.RightControl then Library.NativeToggleInput({KeyCode = Enum.KeyCode.RightControl}, false) end end) local Launcher = Library:Create("TextButton", { Name = "Launcher", Parent = Suite.Interface, Text = "CLOVER", Size = UDim2.fromOffset(80, 44), Position = UDim2.new(1, -12, 0, 12), AnchorPoint = Vector2.new(1, 0), BackgroundColor3 = Library.Options.btncolor, TextColor3 = Library.Options.textcolor, Font = Library.Options.font, TextSize = Library.Options.fontsize }) table.insert(Suite.Connections, Launcher.Activated:Connect(function() Library.NativeToggleInput({KeyCode = Enum.KeyCode.RightControl}, false) end)) table.insert(Suite.Connections, Suite.Interface:GetPropertyChangedSignal("AbsoluteSize"):Connect(function() if Library.Toggled then Window:Center() end end)) table.insert(Suite.Connections, Window.container:GetPropertyChangedSignal("Size"):Connect(function() if Library.Toggled then Window:Center() end end)) local Touch, Drag, Start, Origin, DragWindow local Track = Controls.Depth.Root:FindFirstChild("Container", true) local function Slide(Input) local Width = math.max(1, Track.AbsoluteSize.X - 42) Controls.Depth:Set(1 + 49 * math.clamp((Input.Position.X - Track.AbsolutePosition.X - 42) / Width, 0, 1)) end table.insert(Suite.Connections, Controls.Depth.Root.InputBegan:Connect(function(Input) if Input.UserInputType == Enum.UserInputType.Touch then Touch = Input Slide(Input) end end)) table.insert(Suite.Connections, Window.object.InputBegan:Connect(function(Input) if Input.UserInputType == Enum.UserInputType.Touch then Drag = Input DragWindow = Window Start = Input.Position Origin = Window.object.Position end end)) table.insert(Suite.Connections, UserInputService.InputChanged:Connect(function(Input) if Input == Touch then Slide(Input) elseif Input == Drag then local Offset = Input.Position - Start DragWindow:SetPosition(Origin.X.Offset + Offset.X, Origin.Y.Offset + Offset.Y) end end)) table.insert(Suite.Connections, UserInputService.InputEnded:Connect(function(Input) if Input == Touch then Touch = nil end if Input == Drag then Drag = nil end end)) table.insert(Suite.Connections, UserInputService.WindowFocusReleased:Connect(function() Touch = nil Drag = nil end)) Controls.UISettings = Settings:Button("UI settings", function() if Suite.UISettings then local Object = Suite.UISettings.Window.object Object.Visible = not Object.Visible return end Suite.UISettings = Library:SettingsWindows({ title = "UI settings", windowOptions = WindowOptions, scriptFolder = "CloverAdventure", presets = {extension = ".json", clearOnLoad = true, separateByPlace = true} }) local SettingsWindow = Suite.UISettings.Window local Body = SettingsWindow.container local Scroll = Library:Create("ScrollingFrame", { Name = "SettingsScroll", Parent = SettingsWindow.object, Position = UDim2.new(0, 0, 1, 0), BackgroundTransparency = 1, BorderSizePixel = 0, ScrollBarThickness = 4, AutomaticCanvasSize = Enum.AutomaticSize.Y, CanvasSize = UDim2.new() }) Body.Parent = Scroll Body.Position = UDim2.new() local function FitSettings() Scroll.Size = UDim2.new(1, 0, 0, math.min(Body.Size.Y.Offset, math.max(80, Suite.Interface.AbsoluteSize.Y - 80))) end table.insert(Suite.Connections, Body:GetPropertyChangedSignal("Size"):Connect(FitSettings)) table.insert(Suite.Connections, Suite.Interface:GetPropertyChangedSignal("AbsoluteSize"):Connect(function() FitSettings() SettingsWindow:SetPosition(0, 0) end)) table.insert(Suite.Connections, SettingsWindow.object.InputBegan:Connect(function(Input) if Input.UserInputType == Enum.UserInputType.Touch then Drag = Input DragWindow = SettingsWindow Start = Input.Position Origin = SettingsWindow.object.Position end end)) SettingsWindow:Button("Close settings", function() SettingsWindow.object.Visible = false end) SettingsWindow:SetPosition(0, 0) SettingsWindow:BringToFront() FitSettings() end) Window:Center() if Preferences and Preferences.Visible == false then Library.NativeToggleInput({KeyCode = Enum.KeyCode.RightControl}, false) end end) if not Ready then Suite:Destroy() error("Wally Modified setup failed: " .. tostring(Failure), 0) end end task.spawn(function() if setthreadidentity then setthreadidentity(2) end while not Suite.Dead do if game:IsLoaded() then local Success, Result = pcall(Suite.Tick, Suite) if not Success then Suite:StopMotion(true) Suite.Status = "Worker error: " .. string.sub(tostring(Result), 1, 150) end end task.wait((Suite.Flags.Farm or Suite.Flags.Aura) and 0.1 or 0.5) end end) return Suite