Features:
- Auto Farm
- Auto Trainer
- Ro ESP
- Shops
- Auto Points
- & More!
Script:
--[[FrostHook RoGhoul Trainer (OPEN SOURCED)2020/10/29Care for Potential Bugs, this source hasn't been touched in a long while.]]local function GetExecutor()if SentinelBuy thenreturn "Sentinel";elseif LUAPROTECT ~= nil thenreturn "SirHurt";elseif AES ~= nil thenreturn "ProtoSmasher";elseif syn_crypt_encrypt ~= nil thenreturn "Synapse";elsereturn "UNDEFINED";endendCoreGui = game:GetService("CoreGui")HttpService = game:GetService("HttpService")LocalPlayer = game:GetService("Players").LocalPlayerKeys = {key_event = "",train_event = "",}NumberTextValues = {[0] = "Zero",[1] = "One",[2] = "Two",[3] = "Three",[4] = "Four",[5] = "Five",[6] = "Six",[7] = "Seven",[8] = "Eight",[9] = "Nine"}VERSION = "4.0.1"client_log = "";DEV = 1;local _S,_S2,_S3 = "klimrettuB","der kraD","YTIROIRP_ETAIDEMMI"-- BEFORE RUN OPERATIONSif CoreGui:FindFirstChild("[FH] Ro-Ghoul Trainer") or CoreGui:FindFirstChild("Preloading") thenprint("Ro-Ghoul Trainer is already running.");returnend-- VERIFY TEAM SELECTEDdolocal PlayerFolder = LocalPlayer:WaitForChild("PlayerFolder", 0.5);if not PlayerFolder thenlocal LoadingTemplate = Instance.new("ScreenGui", CoreGui);LoadingTemplate.Name = "Preloading"local Label = Instance.new("TextLabel", LoadingTemplate)Label.Text = "[FH] Ro-Ghoull Trainer - Please Select a Team."Label.Size = UDim2.new(1,0,0,50);Label.Position = UDim2.new(0,0,0,125)Label.TextStrokeTransparency = 0.6;Label.Transparency = 0.7;Label.TextColor3 = Color3.new(1,1,1)Label.TextSize = 18;Label.Font = 4;repeat wait() until LocalPlayer:FindFirstChild("PlayerFolder")LoadingTemplate:Destroy();endend-- RUNTIME DEFINITIONSRemotes = game:GetService("ReplicatedStorage"):WaitForChild("Remotes", 1);CharacterRemotes = LocalPlayer.Character:FindFirstChild("Remotes") or LocalPlayer.Character:WaitForChild("Remotes", 5);KeyEvent = CharacterRemotes.KeyEvent;KillScript,ClosestTarget = nil,nil;AutoFarmToggle,AutoTraining,StatFocusToggle = false,false,false;stats = {RC = {Start = 0,Gain = 0},Yen = {Start = 0,Gain = 0},Rep = {Start = 0,Gain = 0},Kill = {Start = 0,Gain = 0}}function appendLog(string)if string.len(client_log) > 200000 thenclient_log = "[CLIENT LOG RESET]";endclient_log = client_log..tostring(string).."\n"end_G.GrabLog = function()syn.write_clipboard(client_log);end-- MODULESlocal interface, PlayerMover, trainer, farm, NPCEsp, config;-- INTERFACE MODULEinterface = {Screen = game:GetObjects("rbxassetid://3473501099")[1],CompleteTrainerFrame = nil,ExampleCTCLabel = nil,CompleteTrainerCount = nil,StartTrainingBtn = nil,StopTrainingBtn = nil,TrainerProgressBar = nil,AutoTrainStatus = nil,AutoFarmStatus = nil,ReqFrame = nil,P3Contents = nil,RunTimeDisp = nil,QuestOutput = nil,StopFarmingBtn = nil,StartFarmingBtn = nil,MonsterTag = nil,PlayerTag = nil,ShopIndicatorNames = {["Ghoul"] = {"SurgeonIndicator", "Kakuhou Surgeon", nil},["CCG"] = {"ShopIndicator", "Drawer", nil},["Mask"] = {"ShopIndicator", "UtaMaskShop", nil},},StatsToView = {"Weapon","Durability","Physical","Speed"},Connections = {},StatConnections = {},VPRotationConstant = 0,ViewingModel = nil,VPCamera = nil,}do -- metadata for interface.local metadata = {}local methods = {Destroy = function(self)if self.Screen thenself.Screen:Destroy();endfor a, b in next, self.Connections dob:Disconnect();endfor a,b in next, self.StatConnections dob:Disconnect();endsetmetatable(self, {})interface = nil;end,StopFarmButtonClick = function(self)self.StopFarmingBtn.Visible = false;self.StartFarmingBtn.Visible = true;stats.RC.Start = 0;stats.RC.Gain = 0;stats.Yen.Start = 0;stats.Yen.Gain = 0;stats.Rep.Start = 0;stats.Rep.Gain = 0;stats.Kill.Start = 0;stats.Kill.Gain = 0;farm.RunTime = nilAutoFarmToggle = false;farm:Start();end,StartFarmButtonClick = function(self)self.StopFarmingBtn.Visible = true;self.StartFarmingBtn.Visible = false;stats.Kill.Start = 0;stats.RC.Start = tonumber(farm.PlayerStats.RC.Value);stats.Yen.Start = tonumber(farm.PlayerStats.Yen.Value);stats.Rep.Start = tonumber(farm.PlayerStats.Reputation.Value);farm.RunTime = tick();AutoFarmToggle = true;farm:Start();end,UpdateCTFrame = function(self)local CompleteTrainerFrame = self.CompleteTrainerFrame;local ExampleCTCLabel = self.ExampleCTCLabel;local CompleteTrainerCount = self.CompleteTrainerCount;local StartTrainingBtn = self.StartTrainingBtn;local StopTrainingBtn = self.StopTrainingBtn;for _, object in next, CompleteTrainerFrame:GetChildren() doif not object:IsA("UIListLayout") and not object:IsA("UIPadding") thenobject:Destroy();endendif tonumber(trainer.Position) == #trainer.Trainers.Available and tonumber(trainer.Progress) >= 100 thenfor i = 1, trainer.Position, 1 dolocal Label = ExampleCTCLabel:Clone();Label.Parent = CompleteTrainerFrame;Label.Text = tostring(trainer.Trainers.Available[i]);endCompleteTrainerCount.Text = tostring(#trainer.Trainers.Available).."/"..tostring(#trainer.Trainers.Available);CompleteTrainerFrame.CanvasSize = UDim2.new(0,0,0,#trainer.Trainers.Available*25)StartTrainingBtn.Visible = false;StopTrainingBtn.Visible = false;elsefor i = 1, trainer.Position-1, 1 dolocal Label = ExampleCTCLabel:Clone();Label.Parent = CompleteTrainerFrame;Label.Text = tostring(trainer.Trainers.Available[i]);endCompleteTrainerCount.Text = tostring(trainer.Position-1).."/"..tostring(#trainer.Trainers.Available);CompleteTrainerFrame.CanvasSize = UDim2.new(0,0,0,(trainer.Position-1)*25)endend,SetTrainStatus = function(self, string)self.AutoTrainStatus.Text = tostring(string);end,UpdateProgressBar = function(self)local TrainerProgressBar = self.TrainerProgressBar;local PercentLabel = TrainerProgressBar.TPBPercentDisplay;local Bar = TrainerProgressBar.TrainerProgressBar;PercentLabel.Text = tostring(trainer.Progress).."%"Bar.Size = UDim2.new((trainer.Progress/100),0,1,0)end,ShowStats = function(self, Player)for a,b in next, self.StatConnections dopcall(function()b:Disconnect();end);endself.StatConnections = {};local PlayerName = self.StatFrame.Title;PlayerName.Text = tostring(Player);local TheirFolder = Player.PlayerFolder;local TheirStats = TheirFolder.Stats;local MaxPoints = config.MaxLevel * 3;local ContentFrame = self.StatFrame.Contents;local CharacterPort = ContentFrame.CharacterPort;if CharacterPort:FindFirstChild("PlayerModel") thenCharacterPort.PlayerModel:Destroy();endPlayer.Character.Archivable = true;self.ViewingModel = Player.Character:Clone();self.ViewingModel.Name = "PlayerModel";Player.Character.Archivable = false;for _,Object in pairs(self.ViewingModel:GetChildren()) doif not Object:IsA("BasePart") and not Object:IsA("Accoutrement") and not Object:IsA("Clothing") and not Object:IsA("Model") thenObject:Destroy();endendif self.ViewingModel.PrimaryPart thenself.ViewingModel:SetPrimaryPartCFrame(CFrame.new(0,0,0))self.ViewingModel.Parent = CharacterPort;self.VPCamera.Parent = CharacterPort;self.VPCamera.CameraSubject = self.ViewingModel;CharacterPort.CurrentCamera = self.VPCamera;local LevelDisplay = ContentFrame.Level;LevelDisplay.Value.Text = TheirStats.Level.Value;table.insert(self.StatConnections, TheirStats.Level.Changed:connect(function(new)LevelDisplay.Value.Text = new;end))local XpDisplay = ContentFrame.XpBar;local function UpdateXpBar()if XpDisplay:FindFirstChild("TextLabel") thenlocal CurrentXp = tonumber(TheirStats.Experience.Value)local MaxXp = tonumber(TheirStats.Level.Value) * 20;if CurrentXp/MaxXp ~= 1 thenXpDisplay.TextLabel.Text = toSuffixString(CurrentXp).."/"..toSuffixString(MaxXp)elseXpDisplay.TextLabel.Text = "MAX"endXpDisplay.Set.Size = UDim2.new(CurrentXp/MaxXp,0,1,0)endendUpdateXpBar();table.insert(self.StatConnections, TheirStats.Experience.Changed:connect(UpdateXpBar))local YenDisplay = ContentFrame.Yen;YenDisplay.Value.Text = toSuffixString(tonumber(TheirStats.Yen.Value));table.insert(self.StatConnections, TheirStats.Yen.Changed:connect(function(new)YenDisplay.Value.Text = toSuffixString(tonumber(new));end))local RCDisplay = ContentFrame.RC;RCDisplay.Value.Text = toSuffixString(tonumber(TheirStats.RC.Value));table.insert(self.StatConnections, TheirStats.RC.Changed:connect(function(new)RCDisplay.Value.Text = toSuffixString(tonumber(new));end))local ReputationDisplay = ContentFrame.Reputation;ReputationDisplay.Value.Text = toSuffixString(tonumber(TheirStats.Reputation.Value));table.insert(self.StatConnections, TheirStats.Reputation.Changed:connect(function(new)ReputationDisplay.Value.Text = toSuffixString(tonumber(new));end))local WeaponDisplay = ContentFrame.Weapon;WeaponDisplay.Text = TheirFolder.Customization.Weapon.Value;table.insert(self.StatConnections, TheirFolder.Customization.Weapon.Changed:connect(function(new)WeaponDisplay.Text = new;end))local StatsDisplay = ContentFrame.Stats;for _,Stat in pairs(self.StatsToView) dolocal TheirStat = TheirStats:FindFirstChild(Stat)local LocalStat = StatsDisplay:FindFirstChild(Stat)if TheirStat and LocalStat thenLocalStat.Bar.Set:TweenSize(UDim2.new((tonumber(TheirStat.Value)/MaxPoints),0,1,0), "Out", "Quad", 0.5, true)LocalStat.Bar.Actual.Text = TheirStat.Value;table.insert(self.StatConnections, TheirStat.Changed:connect(function(new)LocalStat.Bar.Set:TweenSize(UDim2.new((tonumber(new)/MaxPoints),0,1,0), "Out", "Quad", 0.5, true)LocalStat.Bar.Actual.Text = new;end))endendlocal BreakLoop = false;table.insert(self.StatConnections, self.MoveTo.MouseButton1Down:connect(function()if Player and not farm.RunTime thenif Player.Character and LocalPlayer.Character thenBreakLoop = false;local TargetRoot = Player.Character.PrimaryPart;local SelfRoot = LocalPlayer.Character.PrimaryPart;if TargetRoot and SelfRoot thenlocal Distance = math.huge;PlayerMover:Enable();self.MoveTo.Visible = false;self.MoveToCancel.Visible = true;repeatwait();PlayerMover:NextLocation(TargetRoot.CFrame);Distance = (SelfRoot.CFrame.p - TargetRoot.CFrame.p).magnitudeif BreakLoop or not Player.Character or not LocalPlayer.Character thenbreak;enduntil Distance <= 10 or not SelfRoot or not TargetRoot or self.Deadself.MoveTo.Visible = true;self.MoveToCancel.Visible = false;PlayerMover:Disable();endendendend))table.insert(self.StatConnections, self.MoveToCancel.MouseButton1Down:connect(function()BreakLoop = true;end))table.insert(self.StatConnections, Player.AncestryChanged:connect(function()StatFrame.Visible = false;for i,Connection in pairs(self.StatConnections) dopcall(function()Connection:Disconnect();end)endself.StatConnections = {};end))self.StatFrame.Visible = true;endend,OpenShop = function(self, ShopType)local ShopInd, ShopIndData;if ShopType == "Weapon" thenShopIndData = self.ShopIndicatorNames[trainer.TeamString]elseif ShopType == "Mask" thenShopIndData = self.ShopIndicatorNames["Mask"]endShopInd = ShopIndData[3]if ShopInd thenfireclickdetector(ShopInd);elsewarn("[N]: Shop Indicator Not Found..?")endend,SetFarmStatus = function(self, string)self.AutoFarmStatus.Text = tostring(string);end}metadata.__index = function(self, i)if methods[i] thenreturn function(s, ...)return methods[i](self, ...)endendendmetadata.__call = function(self)-- Make sure doesnt get init twice.if CoreGui:FindFirstChild("[FH] Ro-Ghoul Trainer") thenprint("Interface is already initialized.");return false;endif not self.Screen:FindFirstChild("VerticalLinee", true) then--self.Screen:Destroy();elseprint("Found it.")endself.Screen.Name = "[FH] Ro-Ghoul Trainer"self.Screen.Parent = CoreGui;local Window = self.Screen.Window;Window.Active = true;Window.Draggable = true;local WindowContents = Window.Contents;dolocal vers = WindowContents.Brand.Version;local windowsize = WindowContents.Brand.Version.Sizevers.Size = UDim2.new(0, 40, windowsize.Height.Scale,windowsize.Height.Offset);vers.Text = "v"..tostring(VERSION);endlocal PageTabs = WindowContents.PageList;local InterfacePages = WindowContents.InterfacePages;InterfacePages.InterfacePageLayout.ScrollWheelInputEnabled = false;InterfacePages.InterfacePageLayout.TouchInputEnabled = false;InterfacePages.InterfacePageLayout.GamepadInputEnabled = false;local Pages = InterfacePages.Pages;local Info = WindowContents.Info;local Dev = WindowContents.Dev;local MainWindowClose = WindowContents.Close;local MainWindowOpen = self.Screen.Open;local KillSwitch = InterfacePages.Developer.KillSwitch;local ReturnMenuBtns = {Btn1 = InterfacePages.Developer.ReturnBtn_Dev;Btn2 = InterfacePages.Info.ReturnBtn_Info;}local SecondsToHMS;local toSuffixString;-- Viewports;self.VPCamera = Instance.new("Camera")self.VPCamera.Name = "FH_VPC"-- Other ELementsMainWindowClose.MouseButton1Down:connect(function()MainWindowOpen.Visible = true;Window.Visible = false;end)MainWindowOpen.MouseButton1Down:connect(function()MainWindowOpen.Visible = false;Window.Visible = true;end)-- Page 1 Variables (General)local Page1 = Pages.Page1;local MaskFrame = Page1.MaskFrame;local MaskInput = MaskFrame.MaskInputFrame.M_Input;local MaskApply = MaskFrame.M_Apply;local MaskNameFiltered = MaskFrame.Filtered_Out;local ShopFrame = Page1.ShopFrame;local ShopOpen = ShopFrame.OpenShop;local MaskShopFrame = Page1.MaskShopFrame;local MaskShopOpen = MaskShopFrame.OpenMaskShop;local MaskFunction = Remotes.HySy.Nickname;local EspFrame = Page1.ESPFrame;EspFrame.Visible = true;local PlayerTag = EspFrame.PlayerGui;PlayerTag.Parent = nil;local MonsterTag = EspFrame.MonsterGui;MonsterTag.Parent = nil;MonsterTag.MonsterMain.Active = false;MonsterTag.MaxDistance = 1000;local EspDistanceToggle = EspFrame.ESPDistanceToggle;local EspToggleFrame = EspFrame.ESPTFrame;EspToggleFrame.ClipsDescendants = true;local ExampleToggle = EspToggleFrame.ExampleEspToggle;ExampleToggle.Parent = nil;local EspTierToggle = EspFrame.NPCTierToggle;local NametagToggle = EspFrame.ESPNametagToggle;local PlayerAbilityToggle = EspFrame.PABToggle;local PlayerHealthToggle = EspFrame.PHPToggle;local StatFrame = self.Screen.StatFrame;local StatFrameClose = StatFrame.Close;local MoveTo = StatFrame.MoveTo;local MoveToCancel = StatFrame.Cancel;MoveTo.Visible = true;MoveToCancel.Visible = false;local ExampleStatFrame = StatFrame.Contents.Stats.ExampleStat;-- Page 2 Variables; (Training)local Page2 = Pages.Page2;local StartTrainingBtn = Page2.StartTrain;local StopTrainingBtn = Page2.StopTrain;local CurrentTrainerLbl = Page2.Trainer_Out;local AutoTrainStatus = Page2.Status_Out;local TrainerProgressBar = Page2.TrainerProgressBar;local CompleteTrainerFrame = Page2.CTC_List;local CompleteTrainerCount = Page2.CT_LabelCount;local ExampleCTCLabel = CompleteTrainerFrame.CTC_Label:Clone();local UpdateCTFrame;local UpdateProgressBar;local SetTrainStatus;-- Page 3 Variables (Farming)local Page3 = Pages.Page3;local ReqFrame = Page3.Page3_ReqFrame;local P3Contents = Page3.Page3_WorkingContents;local ReqBypass = ReqFrame.Bypass_Btn;local ReqList = ReqFrame.ReqFrame_Disp;local AtkFrame = ReqList.Atk_Frame;local DefFrame = ReqList.Def_Frame;local AtkOut = AtkFrame.Atk_Out;local DefOut = DefFrame.Def_Out;local StartFarmingBtn = P3Contents.StartFarm;local StopFarmingBtn = P3Contents.StopFarm;local AutoFarmStatus = P3Contents.Status3_Out;local AccumResources = P3Contents.AccumulatedResourceslocal YenFrame = AccumResources.Yen_Gain;local YenDisp = YenFrame.Yen_Out;local RCFrame = AccumResources.RC_Gain;local RCDisp = RCFrame.RC_Out;local RDFrame = AccumResources.Rep_Gain;local RDDisp = RDFrame.Rep_Out;local RunFrame = AccumResources.RunTime;local RunTimeDisp = RunFrame.Runtime_Out;local KillFrame = AccumResources.Kill_Gain;local KillDisp = KillFrame.Kill_Out;local TypeSelectFrame = P3Contents.TypeFrame.Type_Select;local ExampleTypeFrame = TypeSelectFrame.SelectFrame:Clone();local P3Toggles = P3Contents.Page3_Toggles;local RepFarmFrame = P3Toggles.Toggle_Select.RepFarm;local RepCheckBx = RepFarmFrame.Rep_CheckBox;local CorpseCollectFrame = P3Toggles.Toggle_Select.CorpseCollect;local CorpseCheckBx = CorpseCollectFrame.Corpse_CheckBox;local BreakFrame = P3Toggles.Toggle_Select.PreventKC;local BreakCheckBx = BreakFrame.KC_CheckBox;local EtoFarmFrame = P3Toggles.Toggle_Select.EtoFarm;local EtoCheckBox = EtoFarmFrame.Eto_CheckBox;if tonumber(farm.PlayerStats.Level.Value) >= 750 thenEtoFarmFrame.Strike:Destroy();elseconfig.ClientPersistentSettings["EtoFarm"] = false;endlocal FarmingDistanceFrame = P3Contents.FarmingDistance;local FarmingDistanceInput = FarmingDistanceFrame.FarmingDistance_Input;local FarmingStageFrame = P3Contents.FarmingStage;local FarmingStageInput = FarmingStageFrame.FarmingDistance_Input;local QuestFrame = P3Contents.QuestFrame;local QuestOutput = QuestFrame.NPC_Label;local SetFarmStatus;-- Page 4 Variables (Stat Focusing)local Page4 = Pages.Page4;local StatPanels = Page4.StatPanels;local StatObject = StatPanels.StatFocPanel;StatObject.Parent = nil;local CurrentFocusLabel = Page4.CurFoc_Out;local StartFocus = Page4.StartFocus;local StopFocus = Page4.StopFocus;-- Page 5 Variables; (Settings)local Page5 = Pages.Page5;local BuildingToggleFrame = Page5.Building_View.ToggleBuildings;local BuildingToggle = BuildingToggleFrame.Building_CheckBox;local AfkToggleFrame = Page5.Anti_Afk.AntiAfk;local AfkToggle = AfkToggleFrame.AA_CheckBox;local StreamerToggleFrame = Page5.Steamer_View.StreamerToggle;local StreamerToggle = StreamerToggleFrame.Streamer_CheckBox;self.MonsterTag = MonsterTag;self.PlayerTag = PlayerTag;self.StatFrame = StatFrame;self.MoveTo = MoveTo; self.MoveToCancel = MoveToCancel;self.CompleteTrainerFrame = CompleteTrainerFrame; self.ExampleCTCLabel = ExampleCTCLabel;self.CompleteTrainerCount = CompleteTrainerCount; self.StartTrainingBtn = StartTrainingBtn;self.StopTrainingBtn = StopTrainingBtn; self.TrainerProgressBar = TrainerProgressBar;self.AutoTrainStatus = AutoTrainStatus; self.AutoFarmStatus = AutoFarmStatus;self.ReqFrame = ReqFrame;self.P3Contents = P3Contents;self.RunTimeDisp = RunTimeDisp;self.YenDisp = YenDisp;self.RCDisp = RCDisp;self.RDDisp = RDDisp;self.KillDisp = KillDisp;self.QuestOutput = QuestOutput;self.StopFarmingBtn = StopFarmingBtn;self.StartFarmingBtn = StartFarmingBtn;-- Page 6 Player Infolocal Page6 = Pages.Page6;local Page6Contents = Page6.Contents;local OnlinePlayers = Page6.OnlinePlayers;local MoveToButton = Page6.MoveTo;local CancelButton = Page6.Cancel;do -- GUI: Faded Lineslocal function CreateFadedLineH(holder)local globtrans = 0holder.BackgroundTransparency = 1;for i=holder.AbsoluteSize.X/2,holder.AbsoluteSize.X,1 doglobtrans = globtrans + (1/(holder.AbsoluteSize.X/2))local p = Instance.new("Frame", holder)p.Size = UDim2.new(0,1,1,0)p.BorderSizePixel = 0;p.Parent = holderp.BackgroundColor3 = holder.BackgroundColor3p.Position = UDim2.new(0,i,0,0)p.BackgroundTransparency = globtransendglobtrans = 1for i=0,holder.AbsoluteSize.X/2,1 doglobtrans = globtrans - (1/(holder.AbsoluteSize.X/2))local p = Instance.new("Frame", holder)p.Size = UDim2.new(0,1,1,0)p.BorderSizePixel = 0;p.Parent = holderp.BackgroundColor3 = holder.BackgroundColor3p.Position = UDim2.new(0,i,0,0)p.BackgroundTransparency = globtransendendlocal function CreateFadedLineV(holder)local globtrans = 0holder.BackgroundTransparency = 1;for i=holder.AbsoluteSize.Y/2,holder.AbsoluteSize.Y,1 doglobtrans = globtrans + (1/(holder.AbsoluteSize.Y/2))local p = Instance.new("Frame", holder)p.Size = UDim2.new(1,0,0,1)p.BorderSizePixel = 0;p.Parent = holderp.BackgroundColor3 = holder.BackgroundColor3p.Position = UDim2.new(0,0,0,i)p.BackgroundTransparency = globtransendglobtrans = 1for i=0,holder.AbsoluteSize.Y/2,1 doglobtrans = globtrans - (1/(holder.AbsoluteSize.Y/2))local p = Instance.new("Frame", holder)p.Size = UDim2.new(1,0,0,1)p.BorderSizePixel = 0;p.Parent = holderp.BackgroundColor3 = holder.BackgroundColor3p.Position = UDim2.new(0,0,0,i)p.BackgroundTransparency = globtransendendfor _, obj in next, self.Screen:GetDescendants() doif obj.Name == "HorizontalLine" thenCreateFadedLineH(obj);endendfor _, obj in next, self.Screen:GetDescendants() doif obj.Name == "VerticalLine" thenCreateFadedLineV(obj);endendenddo -- Image Button Colorsfor _,GuiObject in next, Window:GetDescendants() doif GuiObject:IsA("ImageButton") and GuiObject.Parent ~= PageTabs thenlocal PrimaryColor = GuiObject.ImageColor3;local HoverColor = Color3.new(PrimaryColor.R-0.2,PrimaryColor.G-0.2,PrimaryColor.B-0.2)local ClickColor = Color3.new(PrimaryColor.R-0.3,PrimaryColor.G-0.3,PrimaryColor.B-0.3)table.insert(self.Connections,GuiObject.MouseEnter:connect(function()GuiObject.ImageColor3 = HoverColor;end))table.insert(self.Connections, GuiObject.MouseLeave:connect(function()GuiObject.ImageColor3 = PrimaryColor;end))table.insert(self.Connections, GuiObject.MouseButton1Down:connect(function()GuiObject.ImageColor3 = ClickColor;end))table.insert(self.Connections, GuiObject.MouseButton1Up:connect(function()GuiObject.ImageColor3 = HoverColor;end))elseif GuiObject:IsA("TextButton") and GuiObject.Parent ~= PageTabs thenlocal PrimaryColor = GuiObject.TextColor3;local HoverColor = Color3.new(PrimaryColor.R-0.2,PrimaryColor.G-0.2,PrimaryColor.B-0.2)local ClickColor = Color3.new(PrimaryColor.R-0.3,PrimaryColor.G-0.3,PrimaryColor.B-0.3)table.insert(self.Connections, GuiObject.MouseEnter:connect(function()GuiObject.TextColor3 = HoverColor;end))table.insert(self.Connections, GuiObject.MouseLeave:connect(function()GuiObject.TextColor3 = PrimaryColor;end))table.insert(self.Connections, GuiObject.MouseButton1Down:connect(function()GuiObject.TextColor3 = ClickColor;end))table.insert(self.Connections, GuiObject.MouseButton1Up:connect(function()GuiObject.TextColor3 = HoverColor;end))endendenddo -- Page Swappinglocal TweenService = game:GetService("TweenService");local SelectedPage = 1;local MinSize = 0.85;local TweenTime = 0.25local Tabs = {};local PageLayout = Pages.PageLayout;PageLayout.ScrollWheelInputEnabled = false;PageLayout.TouchInputEnabled = false;PageLayout.GamepadInputEnabled = false;local SelectPage;local TabTween = TweenInfo.new(TweenTime, Enum.EasingStyle.Linear, Enum.EasingDirection.Out);local SelectColor = Color3.new(85/255, 170/255, 255/255)local HoverColor = Color3.new(42/255, 84/255, 127/255)local DefaultColor = Color3.new(109/255, 109/255, 109/255)for _,Object in pairs(PageTabs:GetChildren()) doif Object:IsA("ImageButton") thentable.insert(Tabs, Object);endendfunction SelectPage(Number)for _,Tab in pairs(Tabs) doif Tab.LayoutOrder ~= Number thenlocal TabDefaultTween = TweenService:Create(Tab, TabTween, {BackgroundColor3 = DefaultColor})TabDefaultTween:Play();Tab:TweenSize(UDim2.new(MinSize,0,0,20), "Out", "Quad", TweenTime, true)endendPageLayout:JumpToIndex(SelectedPage-1);endfor _,Tab in pairs(Tabs) dolocal TabPage = Tab.LayoutOrder;local HasMiniStatus,MiniStatus,StatusType = false,nil,nil,nil;local TabSelectTween = TweenService:Create(Tab, TabTween, {BackgroundColor3 = SelectColor})local TabHoverTween = TweenService:Create(Tab, TabTween, {BackgroundColor3 = HoverColor})local TabDefaultTween = TweenService:Create(Tab, TabTween, {BackgroundColor3 = DefaultColor})for _,Child in pairs(Tab:GetChildren()) doif Child.Name:find("MinStatus") thenHasMiniStatus = true;MiniStatus = Child;MiniStatus.Visible = true;StatusType = Tab.Title.Text:gsub(" ", "");endendif HasMiniStatus thenspawn(function()while MiniStatus dowait();local CheckVariable = nil;if StatusType == "Farming" thenCheckVariable = AutoFarmToggle;elseif StatusType == "Trainer" thenCheckVariable = AutoTraining;elseif StatusType == "Focusing" thenCheckVariable = StatFocusToggleendif CheckVariable == true thenMiniStatus.Image = "rbxassetid://"..config.StatusSymbols.Running;MiniStatus.Rotation = MiniStatus.Rotation - 5;elseMiniStatus.Image = "rbxassetid://"..config.StatusSymbols.Stopped;MiniStatus.Rotation = 0;endendend)endtable.insert(self.Connections, Tab.MouseEnter:connect(function()if SelectedPage == TabPage thenreturn;endTabHoverTween:Play();Tab:TweenSize(UDim2.new(1,0,0,20), "Out", "Quad", TweenTime, true)end))table.insert(self.Connections, Tab.MouseLeave:connect(function()if SelectedPage ~= TabPage thenTabDefaultTween:Play();Tab:TweenSize(UDim2.new(MinSize,0,0,20), "Out", "Quad", TweenTime, true)endend))table.insert(self.Connections, Tab.MouseButton1Down:connect(function()SelectedPage = TabPage;TabSelectTween:Play();Tab:TweenSize(UDim2.new(1,0,0,20), "Out", "Quad", TweenTime, true)SelectPage(TabPage);end))endSelectPage(SelectedPage);enddotable.insert(self.Connections, Info.MouseButton1Down:connect(function()InterfacePages.InterfacePageLayout:JumpToIndex(2)end))table.insert(self.Connections, Dev.MouseButton1Down:connect(function()InterfacePages.InterfacePageLayout:JumpToIndex(1)end))for _,Return in pairs(ReturnMenuBtns) dotable.insert(self.Connections, Return.MouseButton1Down:connect(function()InterfacePages.InterfacePageLayout:JumpToIndex(0)end))endInterfacePages.InterfacePageLayout:JumpToIndex(0)endfor index,Statistic in pairs(self.StatsToView) dolocal ThisStat = ExampleStatFrame:Clone();ThisStat.LayoutOrder = index;ThisStat.Name = tostring(Statistic)ThisStat.Stat.Text = tostring(Statistic)ThisStat.Visible = true;ThisStat.Parent = StatFrame.Contents.Stats;endtable.insert(self.Connections, StatFrameClose.MouseButton1Down:connect(function()StatFrame.Visible = false;for i,Connection in pairs(self.StatConnections) doConnection:Disconnect();table.remove(self.StatConnections, i);endend))table.insert(self.Connections, KillSwitch.MouseButton1Down:Connect(KillScript));-- Page 1 ( Training )doCurrentTrainerLbl.Text = tostring(trainer.NPC);table.insert(self.Connections, CurrentTrainerLbl.Changed:Connect(function()if trainer thenCurrentTrainerLbl.Text = tostring(trainer.NPC);endend))table.insert(self.Connections, StartTrainingBtn.MouseButton1Down:Connect(function()StartTrainingBtn.Visible = false;StopTrainingBtn.Visible = true;AutoTraining = true;end))table.insert(self.Connections, StopTrainingBtn.MouseButton1Down:Connect(function()StartTrainingBtn.Visible = true;StopTrainingBtn.Visible = false;AutoTraining = false;self:SetTrainStatus("Off");end))self:SetTrainStatus("Off");self:UpdateProgressBar();self:UpdateCTFrame()end-- Page 2 ( General )doMaskInput.Text = "Input Name";table.insert(self.Connections, MaskInput.FocusLost:Connect(function()local toMaskServer = MaskFunction:InvokeServer("Check", MaskInput.Text);MaskInput.Text = toMaskServer;if MaskInput.Text:find("#") thenMaskNameFiltered.Visible = true;endend))table.insert(self.Connections, MaskInput.Focused:Connect(function()MaskNameFiltered.Visible = false;end))table.insert(self.Connections, MaskApply.MouseButton1Down:Connect(function()local toMask = tostring(MaskInput.Text);MaskInput.Text = "Input Name";MaskFunction:InvokeServer("Confirm", toMask);end))table.insert(self.Connections, ShopOpen.MouseButton1Down:Connect(function()self:OpenShop("Weapon");end))table.insert(self.Connections, MaskShopOpen.MouseButton1Down:Connect(function()self:OpenShop("Mask");end))for _,Object in pairs(workspace:GetDescendants()) dofor Team, ShopData in pairs(self.ShopIndicatorNames) doif Object.Name == ShopData[1] and Object:FindFirstChild("ClickDetector") ~= nil thenlocal ParentHolder = tostring(Object.Parent.Name);if ParentHolder == ShopData[2] thenself.ShopIndicatorNames[Team] = {ShopData[1],ShopData[2],Object:FindFirstChild("ClickDetector"),};endendendendlocal EspTypes = {"Players","Eto"}table.foreach(farm.NPCTypes, function(i,v)table.insert(EspTypes, v)end)local SendTypes = {}EspDistanceToggle.Visible = true;table.insert(self.Connections, EspDistanceToggle.ESPDistance_CheckBox.MouseButton1Down:connect(function()EspDistanceToggle.ESPDistance_CheckBox.ImageTransparency = EspDistanceToggle.ESPDistance_CheckBox.ImageTransparency==1 and 0 or 1;if EspDistanceToggle.ESPDistance_CheckBox.ImageTransparency == 1 thenNPCEsp:UpdateIndicators(false)elseNPCEsp:UpdateIndicators(true)endend))EspDistanceToggle.ESPDistance_CheckBox.ImageTransparency = config.ClientPersistentSettings.Esp.DistanceIndicator==true and 0 or 1;EspTierToggle.Visible = true;table.insert(self.Connections, EspTierToggle.NPCTier_CheckBox.MouseButton1Down:connect(function()EspTierToggle.NPCTier_CheckBox.ImageTransparency = EspTierToggle.NPCTier_CheckBox.ImageTransparency==1 and 0 or 1;if EspTierToggle.NPCTier_CheckBox.ImageTransparency == 1 thenNPCEsp:UpdateTierLabels(false)elseNPCEsp:UpdateTierLabels(true)endend))EspTierToggle.NPCTier_CheckBox.ImageTransparency = config.ClientPersistentSettings.Esp.NPCTierLabel==true and 0 or 1;NametagToggle.Visible = true;table.insert(self.Connections, NametagToggle.ESPNametag_CheckBox.MouseButton1Down:connect(function()NametagToggle.ESPNametag_CheckBox.ImageTransparency = NametagToggle.ESPNametag_CheckBox.ImageTransparency==1 and 0 or 1;if NametagToggle.ESPNametag_CheckBox.ImageTransparency == 1 thenNPCEsp:UpdateNametags(false)elseNPCEsp:UpdateNametags(true)endend))NametagToggle.ESPNametag_CheckBox.ImageTransparency = config.ClientPersistentSettings.Esp.Nametags==true and 0 or 1;for _,NPC in pairs(EspTypes) dolocal Toggle = ExampleToggle:Clone();Toggle.ExEsp_Label.Text = NPC;Toggle.Visible = true;Toggle.Parent = EspToggleFrame;local CheckBox = Toggle.ExEsp_CheckBox;table.insert(self.Connections, CheckBox.MouseButton1Down:connect(function()CheckBox.ImageTransparency = CheckBox.ImageTransparency==1 and 0 or 1;if CheckBox.ImageTransparency == 0 thentable.insert(config.ClientPersistentSettings.Esp.ViewTypes, NPC)elsefor i,v in pairs(config.ClientPersistentSettings.Esp.ViewTypes) doif v == NPC thentable.remove(config.ClientPersistentSettings.Esp.ViewTypes, i)endendendNPCEsp:ShowTagTypes(config.ClientPersistentSettings.Esp.ViewTypes)config:Save();end))CheckBox.ImageTransparency = 1;for i,Type in pairs(config.ClientPersistentSettings.Esp.ViewTypes) doif Type == NPC thenCheckBox.ImageTransparency = 0;endendendend-- Page 3 ( Farming )doRepCheckBx.ImageTransparency = config.ClientPersistentSettings.ReputationFarm==true and 0 or 1;table.insert(self.Connections, RepCheckBx.MouseButton1Down:connect(function()config.ClientPersistentSettings.ReputationFarm = not config.ClientPersistentSettings.ReputationFarm;RepCheckBx.ImageTransparency = config.ClientPersistentSettings.ReputationFarm==true and 0 or 1;config:Save();end))CorpseCheckBx.ImageTransparency = config.ClientPersistentSettings.CollectCorpses==true and 0 or 1;table.insert(self.Connections, CorpseCheckBx.MouseButton1Down:connect(function()config.ClientPersistentSettings.CollectCorpses = not config.ClientPersistentSettings.CollectCorpses;CorpseCheckBx.ImageTransparency = config.ClientPersistentSettings.CollectCorpses==true and 0 or 1;config:Save();end))BreakCheckBx.ImageTransparency = config.ClientPersistentSettings.FarmingBreak==true and 0 or 1;table.insert(self.Connections, BreakCheckBx.MouseButton1Down:connect(function()config.ClientPersistentSettings.FarmingBreak = not config.ClientPersistentSettings.FarmingBreak;BreakCheckBx.ImageTransparency = config.ClientPersistentSettings.FarmingBreak==true and 0 or 1;config:Save();end))EtoCheckBox.ImageTransparency = config.ClientPersistentSettings.EtoFarm==true and 0 or 1;table.insert(self.Connections, EtoCheckBox.MouseButton1Down:connect(function()if tonumber(farm.PlayerStats.Level.Value) >= 600 thenconfig.ClientPersistentSettings.EtoFarm = not config.ClientPersistentSettings.EtoFarm;EtoCheckBox.ImageTransparency = config.ClientPersistentSettings.EtoFarm==true and 0 or 1;config:Save();endend))table.insert(self.Connections, StartFarmingBtn.MouseButton1Down:connect(function()self:StartFarmButtonClick();end))table.insert(self.Connections, StopFarmingBtn.MouseButton1Down:connect(function()self:StopFarmButtonClick();end))table.insert(self.Connections, farm.PlayerStats.RC.Changed:connect(function(new)if farm and farm.RunTime thenstats.RC.Gain = tonumber(new) - stats.RC.Start;endend))table.insert(self.Connections, farm.PlayerStats.Yen.Changed:connect(function(new)if farm and farm.RunTime thenstats.Yen.Gain = tonumber(new) - stats.Yen.Start;endend))table.insert(self.Connections, farm.PlayerStats.Reputation.Changed:connect(function(new)if farm and farm.RunTime thenstats.Rep.Gain = tonumber(new) - stats.Rep.Start;endend))table.insert(self.Connections, farm.PlayerFolder.KC.Changed:connect(function(new)if farm and farm.RunTime and tonumber(new) ~= 0 thenstats.Kill.Gain = stats.Kill.Gain + 1;endend))table.insert(self.Connections, FarmingDistanceInput.FocusLost:Connect(function(enter)if enter thenlocal maxFD = 13;local minFD = 3;local toSet = tonumber(FarmingDistanceInput.Text)if toSet thentoSet = toSet >= maxFD and maxFD or toSet;toSet = toSet <= minFD and minFD or toSet;config.FarmingDist = toSet;endFarmingDistanceInput.Text = tostring(toSet);endend))FarmingDistanceInput.Text = tostring(config.FarmingDist);table.insert(self.Connections, FarmingStageInput.FocusLost:Connect(function(enter)if enter thenlocal maxFS = 9;local minFS = 1;local toSet = tonumber(FarmingStageInput.Text)if toSet thentoSet = toSet >= maxFS and maxFS or toSet;toSet = toSet <= minFS and minFS or toSet;config.FarmingStage = toSet;endFarmingStageInput.Text = tostring(toSet);endend))FarmingStageInput.Text = tostring(config.FarmingStage)for _, Object in pairs(TypeSelectFrame:GetChildren()) doif not Object:IsA("UIListLayout") and not Object:IsA("UIPadding") thenObject:Destroy();endendfor _, NPCType in pairs(farm.NPCTypes) dolocal Type = ExampleTypeFrame:Clone();Type.Parent = TypeSelectFrame;Type.Visible = true;Type.Select_Label.Text = tostring(NPCType)local ThisTypeToggle = false;for i,setType in pairs(config.ClientPersistentSettings.TargetTypes) doif tostring(setType) == tostring(NPCType) thenType.CheckBox.ImageTransparency = 0;ThisTypeToggle = true;endendTypeSelectFrame.CanvasSize = UDim2.new(1,0,0,(20*#farm.NPCTypes) + 10)table.insert(self.Connections, Type.CheckBox.MouseButton1Down:connect(function()ThisTypeToggle = not ThisTypeToggle;Type.CheckBox.ImageTransparency = (ThisTypeToggle==true and 0 or 1);if ThisTypeToggle thentable.insert(config.ClientPersistentSettings.TargetTypes, tostring(NPCType))elsefor i,oldType in pairs(config.ClientPersistentSettings.TargetTypes) doif tostring(oldType) == tostring(NPCType) thentable.remove(config.ClientPersistentSettings.TargetTypes, i)endendif farm.AddingTargets thenrepeat wait() until not farm.AddingTargetsendfor index, b in next, farm.Targets doif b.Name:lower():find(tostring(NPCType):lower()) thentable.remove(farm.Targets, index);endendendconfig:Save();end))endfor Stat, MinReq in pairs(config.StatRequirements) dolocal PStat = farm.PlayerStats:FindFirstChild(Stat)table.insert(self.Connections, PStat.Changed:connect(function()if config.ReqBypass thenreturn;endif tonumber(PStat.Value) >= MinReq[1] thenconfig.StatRequirements[Stat] = {MinReq[1], true};endif Stat == "Weapon" thenAtkOut.Text = tostring(PStat.Value).."/"..MinReq[1]elseif Stat == "Durability" thenDefOut.Text = tostring(PStat.Value).."/"..MinReq[1]endend))if Stat == "Weapon" thenAtkOut.Text = tostring(PStat.Value).."/"..MinReq[1]elseif Stat == "Durability" thenDefOut.Text = tostring(PStat.Value).."/"..MinReq[1]endif tonumber(PStat.Value) >= MinReq[1] thenconfig.StatRequirements[Stat] = {MinReq[1], true};endendtable.insert(self.Connections, ReqBypass.MouseButton1Down:connect(function()config.StatBypass = true;end))self:SetFarmStatus("Off")end-- Page 4 ( Stat Focusing )dolocal TotalFocusDistribution = 0;local PlayerFolder = LocalPlayer:WaitForChild("PlayerFolder");local StatsFunction = PlayerFolder.StatsFunction;local Distribution = {};for index,Stat in pairs(farm.PlayerStats:GetChildren()) doif Stat:FindFirstChild("Inc") thenlocal newObject = StatObject:Clone()newObject.StatLabel.Text = tostring(Stat.Name)newObject.Name = tostring(Stat.Name)newObject.Parent = StatPanelsnewObject.LayoutOrder = indexlocal ShiftLeft = newObject.ValueChange.ShiftLeft;local ShiftRight = newObject.ValueChange.ShiftRight;local currentDistribution = newObject.ValueChange.CurrentValue;Distribution[newObject] = tonumber(currentDistribution.Text);local function UpdateDistribution(val)local thisDist = tonumber(currentDistribution.Text);if thisDist + val < 0 or thisDist + val > 3 thenreturnendthisDist = thisDist + val;if TotalFocusDistribution + val < 0 or TotalFocusDistribution + val > 3 thenreturnendTotalFocusDistribution = TotalFocusDistribution + val;currentDistribution.Text = tostring(thisDist)Distribution[newObject] = thisDist;endtable.insert(self.Connections, ShiftLeft.MouseButton1Down:connect(function()UpdateDistribution(-1)end))table.insert(self.Connections, ShiftRight.MouseButton1Down:connect(function()UpdateDistribution(1)end))endendlocal PlayerFocus = farm.PlayerStats:WaitForChild("Focus")CurrentFocusLabel.Text = tostring(PlayerFocus.Value)local Calculating = false;table.insert(self.Connections, PlayerFocus:GetPropertyChangedSignal("Value"):connect(function()CurrentFocusLabel.Text = tostring(PlayerFocus.Value)if StatFocusToggle and tonumber(PlayerFocus.Value) >= TotalFocusDistribution and not Calculating thenCalculating = true;local Points = PlayerFocus.Value;local Multiplier = math.floor(Points/TotalFocusDistribution)if TotalFocusDistribution == 0 thenreturnendlocal accumulatedValue = 0;for Object, PointValue in pairs(Distribution) dolocal TotalPointValue = PointValue*Multiplier;if TotalPointValue > 0 thenStatsFunction:InvokeServer("Focus", tostring(Object).."AddButton", TotalPointValue)endendCalculating = false;endend))local function ToggleStartFocus()StatFocusToggle = not StatFocusToggle;if StatFocusToggle thenStartFocus.Visible = false;StopFocus.Visible = true;local Points = PlayerFocus.Value;local Multiplier = math.floor(Points/TotalFocusDistribution)if TotalFocusDistribution == 0 thenreturnendlocal accumulatedValue = 0;for Object, PointValue in pairs(Distribution) dolocal TotalPointValue = PointValue*Multiplier;if TotalPointValue > 0 thenStatsFunction:InvokeServer("Focus", tostring(Object).."AddButton", TotalPointValue)endendelseStartFocus.Visible = trueStopFocus.Visible = false;endendtable.insert(self.Connections, StartFocus.MouseButton1Down:connect(ToggleStartFocus));table.insert(self.Connections, StopFocus.MouseButton1Down:connect(ToggleStartFocus));end-- Page 5 ( Settings )dolocal function SetAfkButton(toggle)AfkToggle.ImageTransparency = (toggle==true) and 0 or 1;endlocal function SetStreamerMode(toggle)StreamerToggle.ImageTransparency = (toggle==true) and 0 or 1;local RbxCoreGui = CoreGui.RobloxGui;local PlayerListContainer = RbxCoreGui:FindFirstChild("PlayerListMaster")local TopBarContainer = RbxCoreGui:FindFirstChild("TopBarContainer")if PlayerListContainer and TopBarContainer thenfor _,Object in pairs(PlayerListContainer:GetDescendants()) doif Object.Name == LocalPlayer.Name and Object:FindFirstChild("ChildrenFrame") thenlocal ChildFrameDesc = Object.ChildrenFrame:GetDescendants();for _,Desc in pairs(ChildFrameDesc) doif Desc.Name == "PlayerName" and Desc:FindFirstChild("PlayerName") thenDesc.PlayerName.Text = (toggle==true) and "[CENSORED]" or LocalPlayer.Name;break;endendbreak;endendTopBarContainer.NameHealthContainer.Username.Text = (toggle==true) and "[CENSORED]" or LocalPlayer.Name;endendlocal function SetBuildingTrans(toggle)BuildingToggle.ImageTransparency = (toggle==true) and 0 or 1;for _,Object in pairs(config.CCParts) doObject[1].Transparency = (toggle==true) and Object[2] or 1;for _,Texture in pairs(Object[1]:GetChildren()) doif Texture:IsA("Texture") thenTexture.Transparency = (Object[1].Transparency == 0) and 0.25 or 1;endendendlocal StreetLights = workspace:FindFirstChild("StreetLights")for _,Object in pairs(StreetLights:GetChildren()) doif Object:IsA("Model") and Object.Name == "StreetLight" thenObject.StreetLight.Transparency = (toggle==true) and 0 or 1;endendendSetBuildingTrans(config.ClientPersistentSettings.BuildingTransparencyToggle)SetAfkButton(config.ClientPersistentSettings.AfkToggle)SetStreamerMode(config.ClientPersistentSettings.StreamerToggle)table.insert(self.Connections, BuildingToggle.MouseButton1Down:connect(function()config.ClientPersistentSettings.BuildingTransparencyToggle = not config.ClientPersistentSettings.BuildingTransparencyToggle;SetBuildingTrans(config.ClientPersistentSettings.BuildingTransparencyToggle)config:Save();end))table.insert(self.Connections, AfkToggle.MouseButton1Down:connect(function()config.ClientPersistentSettings.AfkToggle = not config.ClientPersistentSettings.AfkToggleSetAfkButton(config.ClientPersistentSettings.AfkToggle)config:Save();end))table.insert(self.Connections, StreamerToggle.MouseButton1Down:connect(function()config.ClientPersistentSettings.StreamerToggle = not config.ClientPersistentSettings.StreamerToggleSetStreamerMode(config.ClientPersistentSettings.StreamerToggle)config:Save();end))endreturn true;endsetmetatable(interface, metadata);end-- INTERFACE MODULE END-- PLAYER MOVER MODULEPlayerMover = {TargetLocation = Instance.new("CFrameValue"),currentTween = nil,Character = nil,Dead = true,Enabled = false,}do -- Metatable for PlayerMover Objectlocal metadata = {}local methods = {NextLocation = function(self, location)if not location thenreturnendif self.currentTween thenself.currentTween:Cancel();endlocal PP = self.Character.PrimaryPart;if PP thenlocal DistanceToTravel = (PP.Position - location.p).magnitudelocal TimeToReach = DistanceToTravel/145--TimeToReach = TimeToReach < 0.05 and 0.05 or TimeToReach -- Lil bit of dampeningself.currentTween = game:GetService("TweenService"):Create(self.TargetLocation, TweenInfo.new(TimeToReach,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0), {Value = location})self.currentTween:Play();endend,GetBehindTargetLocation = function(self, Target, distance)distance = (distance==nil) and 3 or distanceif Target thenlocal TPP = Target.PrimaryPartif TPP thenlocal TargetCF = TPP.CFrame--return (TargetCF + Vector3.new(0,-(distance + 2), 0)) * CFrame.Angles(math.rad(90),0,0)return (TPP.CFrame + Vector3.new(0,1.25,0)) + TPP.CFrame.lookVector * -distanceendendreturn nilend,GetForwardTargetLocation = function(self, Target, distance)distance = (distance==nil) and 3 or distanceif Target thenlocal TPP = Target.PrimaryPartif TPP thenlocal TargetCF = TPP.CFrame--return (TargetCF + Vector3.new(0,-(distance + 2), 0)) * CFrame.Angles(math.rad(90),0,0)return ((TPP.CFrame + Vector3.new(0,1.25,0)) + TPP.CFrame.lookVector * distance) * CFrame.Angles(0,math.rad(180),0)endendreturn nilend,Enable = function(self)self();self.Enabled = true;game:GetService("RunService"):BindToRenderStep("player_mover", 102, function(delta)if self.Enabled and self.Character and not self.Dead thenlocal PrimaryPart = self.Character.PrimaryPart;if PrimaryPart and self.Character thenself.Character:SetPrimaryPartCFrame(self.TargetLocation.Value)endendend)end,Disable = function(self)self.Enabled = false;if self.currentTween thenself.currentTween:Cancel();self.currentTween = nil;endgame:GetService("RunService"):UnbindFromRenderStep("player_mover");end,}metadata.__index = function(self, i)if methods[i] thenreturn function(s, ...)return methods[i](self, ...)endendendmetadata.__call = function(self)self:Disable(); -- Make sure nothing is already running.self.Character = LocalPlayer.Characterif self.Character and self.Character.PrimaryPart thenself.TargetLocation.Value = self.Character.PrimaryPart.CFrame;elseself.TargetLocation.Value = CFrame.new();endlocal Humanoid = self.Character:FindFirstChild("Humanoid")if Humanoid thenif Humanoid.Health > 0 thenself.Dead = false;Humanoid.Died:connect(function()self.Dead = true;end)endendendsetmetatable(PlayerMover, metadata);end-- PLAYER MOVER MODULE END-- TRAINER MODULEtrainer = {Trainers = {All = {["CCG"] = {"(S1) Kureo Mado","(S1) Koutarou Amon","(Suit) Yukinori Shinohara","(Battle) Yukinori Shinohara","(S1) Hideyoshi Nagachika","(S1) Juuzou Suzuya","(Arata) Yukinori Shinohara",},["Ghoul"] = {"(S1) Ken Kaneki","(S1) Renji Yomo","(S1) Touka Kirishima","(S1) Nishiki Nishio","(S1) Shuu Tsukiyama","(S1) Kuzen Yoshimura"}},Completed = {},Available = nil},NPC = nil;Position = 0;Progress = nil;AutoTrainingCheckFrequency = 1;LastTrainingCheck = tick();CheckTrainer = Remotes.Trainers.RequestTraining,ChangeTrainer = Remotes.Trainers.ChangeTrainer,TeamString = ""}dolocal metadata = {}local methods = {Destroy = function(self)if self.CheckTrainer thenself.CheckTrainer = nil;endif self.ChangeTrainer thenself.ChangeTrainer = nil;endAutoTraining = false;setmetatable(self, {})trainer = nil;end,Task = function(self, Character, NPC)appendLog("-- Task function invoked. --")local TaskRemote;local RepCashRemote = Remotes.ReputationCashOut;if self.TeamString == "CCG" thenTaskRemote = Remotes:FindFirstChild("Yoshitoki")elseTaskRemote = Remotes:FindFirstChild("Yoshimura")endappendLog("Chose "..self.TeamString.." remote"..TaskRemote.Name)if TaskRemote and RepCashRemote and (Character:GetModelCFrame().p-NPC:GetModelCFrame().p).magnitude <= 10 thenappendLog("Invoking TaskRemote to server...")-- Freezing here...TaskRemote.Task:InvokeServer();RepCashRemote:InvokeServer();return true;elseappendLog("Failed to meet requirements for TaskRemote: ", tostring(TaskRemote==nil), tostring((Character:GetModelCFrame().p-NPC:GetModelCFrame().p).magnitude))endreturn false;end,Train = function(self, Request)local PlayerFolder = LocalPlayer:WaitForChild("PlayerFolder");if not Request and interface thenlocal thisTrainer = self:Train("FindTrainer");interface:UpdateCTFrame();interface:UpdateProgressBar();if thisTrainer thenlocal CurrentSession;LocalPlayer.Backpack.DescendantAdded:connect(function(Child)if Child.Name == "TSCodeVal" thenKeys.train_event = Child.Value;Child.Parent.Disabled = trueelseif Child.Name == "TrainingSession" thenCurrentSession = Child.Value;endend)repeat wait() until not farm.Collecting;local ReturnCFrame;local TrainStatus = self.CheckTrainer:InvokeServer(thisTrainer);if LocalPlayer.Character.Parent thenReturnCFrame = LocalPlayer.Character:GetModelCFrame();endif TrainStatus == "TRAINING" thenif Keys.train_event == "" thenrepeat wait() until Keys.train_event ~= "";endif CurrentSession thenwait();local HasCharacter = LocalPlayer.Character.Parent;repeatHasCharacter = LocalPlayer.Character.Parent;wait()until HasCharacter == nilfarm.DeathLocation = ReturnCFrame;CurrentSession.Comm:FireServer("Finished", Keys.train_event, false);self.Progess = PlayerFolder.Trainers[thisTrainer].Progress.Value;interface:SetTrainStatus("Completed Training.")wait(0.25);endelseif TrainStatus == "TRAINING COMPLETE" theninterface:SetTrainStatus(tostring(thisTrainer).." completed.")wait(1)elseinterface:SetTrainStatus(TrainStatus);endelseinterface:SetTrainStatus("All Trainers Completed.");returnendelseif Request == "FindTrainer" thenlocal CompleteAll = true;for index, _ in next, self.Trainers.Available doif not self.Trainers.Completed[self.Trainers.Available[index]] thenself.ChangeTrainer:InvokeServer(self.Trainers.Available[index]);self.NPC = PlayerFolder.Trainers:FindFirstChild(self.TeamString .. "Trainer").Value;self.Progress = PlayerFolder.Trainers[self.NPC].Progress.Value;if tonumber(self.Progress) ~= 100 thenreturn self.NPCelseself.Trainers.Completed[self.Trainers.Available[index]] = true;endendendreturnendend}metadata.__index = function(self, i)if methods[i] thenreturn function(s, ...)return methods[i](self, ...)endendendmetadata.__call = function(self)-- initialization of trainer object.if self.Trainers.Available ~= nil or self.NPC ~= nil thenprint("Trainer object already initialized.");return false;endlocal PlayerFolder = LocalPlayer:WaitForChild("PlayerFolder");self.TeamString = PlayerFolder.Customization.Team.Value;self.Trainers.Available = self.Trainers.All[self.TeamString];self.NPC = PlayerFolder.Trainers:FindFirstChild(self.TeamString .. "Trainer").Value;self.Progress = PlayerFolder.Trainers[self.NPC].Progress.Value;-- CalculateTrainerPositionfor index, trainer in pairs(self.Trainers.Available) doif tostring(trainer) == tostring(self.NPC) thenself.Position = index;endendendsetmetatable(trainer, metadata);end-- TRAINER MODULE END-- FARM MODULEfarm = {PlayerStats = nil,PlayerFolder = nil,NPCDirectory = workspace.NPCSpawns,QuestDirectory = nil,Dead = false,DeathLocation = nil,LastTouchedCFrame = nil,TimeFromLastTouch = tick(),Collecting = false,FightingBoss = false,ClosestTarget = nil,RunTime = nil,AddingTargets = false,TargetDistance = math.huge;NPCTypes = {"Investigator","Aogiri","Athlete","Human"},NPCTable = {},Targets = {},Connections = {}}do -- metadata for farm object.local metadata = {}local methods = {Destroy = function(self)for a, b in next, self.Connections dob:Disconnect();endif interface theninterface:StopFarmButtonClick();endsetmetatable(self, {})farm = nil;end,WeaponEquipped = function(self, character)if character thenlocal ServerControl = character:WaitForChild("ServerControl")local CurrentWep = ServerControl:WaitForChild("CurrentWep")if CurrentWep.Value ~= "" thenreturn true;endendreturn false;end,GetCurrentQuest = function(self)for _,Quest in pairs(self.QuestDirectory:GetChildren()) doif Quest.Name ~= "Reward" thenreturn Questendendreturn nilend,Start = function(self)local Character = LocalPlayer.Character;local CurrentCamera = game:GetService("Workspace").CurrentCamera;if Character thenlocal Humanoid = Character:FindFirstChildWhichIsA("Humanoid")local HumanoidRootPart = Character:FindFirstChild("HumanoidRootPart")if Humanoid and HumanoidRootPart thenif AutoFarmToggle thenpcall(function() -- Remove BodyPosition for RoGhoulHumanoidRootPart.bp:Destroy();end)PlayerMover:Enable();spawn(function()local PreviousNPC;while farm and AutoFarmToggle and self.Dead == false dolocal SkipToBeginning = false;if self:WeaponEquipped(Character) == false thenappendLog("Weapon equipped");KeyEvent:FireServer(Keys.key_event, tostring(NumberTextValues[config.FarmingStage]), "Down", nil, false, CFrame.new()) -- Make this dynamic laterendif config.ClientPersistentSettings.FarmingBreak and self.Dead == false and AutoFarmToggle == true thenappendLog("Taking a break")local PlayerFolder = LocalPlayer.PlayerFolder;if tonumber(PlayerFolder.KC.Value) >= (config.KCMax-1) thenrepeatinterface:SetFarmStatus("Taking a break...")wait()until tonumber(PlayerFolder.KC.Value) <= 2 or self.Dead or AutoFarmToggle == falseendelseif self.Dead == true or AutoFarmToggle == false thenappendLog("SkipToBeginning = true")SkipToBeginning = true;endif config.ClientPersistentSettings.EtoFarm and SkipToBeginning == false and AutoFarmToggle == true and self.Dead == false thenappendLog("> EtoFarm")local Eto;for _, Spawn in next, self.NPCDirectory:GetChildren() doif Spawn.Name == "BossSpawns" and #Spawn:GetChildren() > 0 thenEto = Spawn:GetChildren()[1];endendif Eto and Eto:FindFirstChildWhichIsA("Humanoid", true) and Eto:FindFirstChild("HitboxGroup") thenappendLog("> Found Eto")local HitBoxes = {Main = Eto.HitboxGroup:FindFirstChild("HB2"),Other = Eto.HitboxGroup:FindFirstChild("HB1")}for _,OldData in pairs(Eto:GetChildren()) doif OldData:IsA("SelectionBox") thenOldData:Destroy();elseif OldData:IsA("BasePart") thenlocal ClientSelectionBox = Instance.new("SelectionBox", Eto)ClientSelectionBox.Name = "";ClientSelectionBox.SurfaceTransparency = 0.7;ClientSelectionBox.SurfaceColor3 = Color3.new(0.3,0.3,1)ClientSelectionBox.Transparency = 1;ClientSelectionBox.Adornee = OldData;endendlocal EtoHumanoid = Eto:FindFirstChildWhichIsA("Humanoid", true)if EtoHumanoid.Health >= 0 and HitBoxes.Main and HitBoxes.Other theninterface:SetFarmStatus("Moving to boss.");endlocal EtoDead = false;local NPCFolder = Eto.NPCFolder;local BossMovePosition;local ClickLag,SpikeLag,EvadeLag = tick(),tick(),nil;local Jumping,SideSwipes,SpikeThrow,ClickAttack,CanAct = false,false,false,false,false;local JumpDodge = false;local LastAttack = tick();local EtoDiedConnection = EtoHumanoid.Died:connect(function()EtoDead = true;end)local jumpSignal = NPCFolder.Special3CD.Changed:Connect(function()Jumping = (NPCFolder.Special3CD.Value == "DownTime") and true or false;end)local sideSwipSignal = NPCFolder.Special2CD.Changed:Connect(function()SideSwipes = (NPCFolder.Special2CD.Value == "DownTime") and true or false;end)local SpikeThrowSignal = NPCFolder.Special1CD.Changed:Connect(function()SpikeThrow = (NPCFolder.Special1CD.Value == "DownTime") and true or false;if not Jumping thenSpikeLag = tick()endend)local CanActSignal = NPCFolder.CanAct.Changed:Connect(function()CanAct = (NPCFolder.CanAct.Value == "DownTime") and true or false;end)local ClickSignal = NPCFolder.ClickCD.Changed:connect(function()ClickAttack = (NPCFolder.ClickCD.Value == "DownTime") and true or false;if not ClickAttack thenClickLag = tick();endend)appendLog("> Closing Gap")local DistanceFromEto = math.huge;while DistanceFromEto >= 10 and self.Dead == false and AutoFarmToggle == true and EtoHumanoid.Health >= 0 doPlayerMover:NextLocation(HitBoxes.Main.CFrame);DistanceFromEto = (Character:GetModelCFrame().p-HitBoxes.Main.CFrame.p).magnitude;wait();endif EtoHumanoid.Health >= 0 thenappendLog("> Latching to Eto")interface:SetFarmStatus("Latching to Eto");PlayerMover:Disable();CurrentCamera.CameraType = 4;CurrentCamera.CameraSubject = EtoHumanoid;self.FightingBoss = true;local Initial_Interaction = true;game:GetService("RunService"):BindToRenderStep("boss_fight", 101, function(delta)if not self.Dead and EtoHumanoid thenlocal MoveAway,Mount = false,false;if Jumping and not Initial_Interaction thenInitial_Interaction = false;MoveAway = true;endif SpikeThrow or tick()-SpikeLag < 0.15 thenMount = true;endif not MoveAway or Mount thenif EtoHumanoid.WalkSpeed ~= 0.1 thenKeyEvent:FireServer(Keys.key_event, "Mouse1", "Down", nil, false, CFrame.new());endendif MoveAway thenBossMovePosition = CFrame.new(HitBoxes.Main.Position + (HitBoxes.Main.CFrame.upVector * -(HitBoxes.Main.Size.X*10)), HitBoxes.Main.Position)elseif Mount thenBossMovePosition = CFrame.new(HitBoxes.Main.Position + (HitBoxes.Main.CFrame.upVector * (HitBoxes.Main.Size.X/2) + (HitBoxes.Main.CFrame.lookVector * -(HitBoxes.Main.Size.X/2))), HitBoxes.Main.Position)elseBossMovePosition = CFrame.new(HitBoxes.Main.Position + (HitBoxes.Main.CFrame.upVector * -(HitBoxes.Main.Size.X + config.FarmingDist) + (HitBoxes.Main.CFrame.lookVector * -(HitBoxes.Main.Size.X/2))), HitBoxes.Main.Position)endHumanoidRootPart.CFrame = BossMovePosition;interface:SetFarmStatus("Eto ("..toSuffixString(math.floor(EtoHumanoid.Health+0.5)).."/"..toSuffixString(EtoHumanoid.MaxHealth)..") HP");endend)appendLog("> Killing Eto")while farm and Eto and EtoHumanoid and self.Dead == false and AutoFarmToggle == true dowait();if EtoHumanoid.Health <= 0 or EtoDead theninterface:SetFarmStatus("Killed Eto")breakendendif self.Dead and Eto and EtoHumanoid and EtoHumanoid.Health > 0 thenif Eto.PrimaryPart thenself.DeathLocation = Eto.PrimaryPart.CFrame;endendself.FightingBoss = false;if Eto and EtoHumanoid thenif EtoHumanoid.Health <= 0 or EtoDead then--Eto:Destroy(); -- Clean it up on the client, don't need this anymore.endendCurrentCamera.CameraType = Enum.CameraType.Custom;CurrentCamera.CameraSubject = LocalPlayer.Character.Humanoid;pcall(function()game:GetService("RunService"):UnbindFromRenderStep("boss_fight");EtoDiedConnection:Disconnect();sideSwipSignal:Disconnect();jumpSignal:Disconnect();CanActSignal:Disconnect();SpikeThrowSignal:Disconnect();ClickSignal:Disconnect();end)PlayerMover:Enable();appendLog("> Exit EtoFarm")endendelseif self.Dead or AutoFarmToggle == false thenappendLog("SkipToBeginning = true")SkipToBeginning = true;endif config.ClientPersistentSettings.ReputationFarm and SkipToBeginning == false and self.Dead == false and AutoFarmToggle == true thenappendLog("> ReputationFarm")local CurrentQuest = self:GetCurrentQuest();local Team = trainer.TeamString;local TeamNPC = config.ReputationLocations[Team];local TravelToNpc = falseif CurrentQuest thenif CurrentQuest.Value == CurrentQuest.Max.Value then -- If Quest is Complete, Turn inTravelToNpc = true;endelse -- No Current Quest, Let's pick one up.TravelToNpc = true;endif TravelToNpc thenappendLog("> Traveling to Trainer")interface:SetFarmStatus("Moving to Quest NPC")PlayerMover:NextLocation(TeamNPC:GetModelCFrame())self.Collecting = true; -- Stop the Farm from grabbing new closest targets for nowlocal DistanceFromNPC = math.huge;while DistanceFromNPC >= 10 and not self.Dead and AutoFarmToggle == true doDistanceFromNPC = (Character:GetModelCFrame().p - TeamNPC:GetModelCFrame().p).magnitudewait();endappendLog("> Arrived at Trainer")if not self.Dead and AutoFarmToggle thenif self:GetCurrentQuest() == nil thenappendLog("> Grabbing Quest")while self:GetCurrentQuest() == nil and self.Dead == false and AutoFarmToggle == true dointerface:SetFarmStatus("Grabbing Quest")trainer:Task(Character, TeamNPC);wait();endelseif self:GetCurrentQuest() ~= nil thenlocal AcceptedAlready = false;appendLog("> Turning in Quest")while self:GetCurrentQuest() == CurrentQuest and self.Dead == false and AutoFarmToggle == true dointerface:SetFarmStatus("Turning in Quest")local potentialQuest = self:GetCurrentQuest()if potentialQuest thenappendLog("> Potential Quest")if potentialQuest.Value ~= potentialQuest.Max.Value thenprint("> Accepted already.. breaking")AcceptedAlready = true;break;endendtrainer:Task(Character, TeamNPC);wait(0.5);endif not AcceptedAlready thenappendLog("> Now grabbing Quest")while self:GetCurrentQuest() == nil and self.Dead == false and AutoFarmToggle == true dointerface:SetFarmStatus("Grabbing Quest")trainer:Task(Character, TeamNPC);wait();endendendelsebreak;endself.Collecting = false;endelseif self.Dead or AutoFarmToggle == false thenappendLog("SkipToBeginning = true")SkipToBeginning = true;endif self and self.Dead == false and SkipToBeginning == false and AutoFarmToggle == true and self.ClosestTarget and not self.FightingBoss thenif PreviousNPC thenif PreviousNPC == self.ClosestTarget thenreturnendendlocal TargetCompile = {Model = nil,Dead = true,Connections = {},};dolocal metadata = {}local methods = {GetDistance = function(_self)if _self.Model thenif Character thenreturn (Character:GetModelCFrame().p - _self.Model:GetModelCFrame().p).magnitudeendelse_self.Dead = true;endreturn 0end,GetHealth = function(_self)if _self.Model thenlocal selfHumanoid = _self.Model:FindFirstChildWhichIsA("Humanoid")if selfHumanoid thenreturn selfHumanoid.Healthendendreturn 0end,GetCFrame = function(_self)if _self.Model thenlocal selfHumanoidRootPart = _self.Model:FindFirstChild("HumanoidRootPart")if selfHumanoidRootPart thenreturn selfHumanoidRootPart.CFrame;endendreturn nilend,GetMaxHealth = function(_self)if _self.Model thenlocal selfHumanoid = _self.Model:FindFirstChildWhichIsA("Humanoid")if selfHumanoid thenreturn selfHumanoid.MaxHealthendendreturn 0end,Destroy = function(_self)if _self.Connections thenfor _,Connection in pairs(_self.Connections) doConnection:Disconnect();end_self.Connections = nil;end_self.Dead = true;setmetatable(TargetCompile, {})end,}metadata.__index = function(_self, i)if methods[i] thenreturn function(s, ...)return methods[i](_self, ...)endendendmetadata.__call = function(_self)_self.Model = self.ClosestTargetif _self.Model thenlocal selfHumanoid = _self.Model:FindFirstChildWhichIsA("Humanoid")if selfHumanoid thentable.insert(_self.Connections, selfHumanoid.Died:connect(function()_self.Dead = true;end))table.insert(_self.Connections, selfHumanoid.AncestryChanged:connect(function()_self.Dead = true;end))_self.Dead = false;endspawn(function()while _self.Model == self.ClosestTarget dowait()endif _self.Destroy then_self:Destroy();endend)return TargetCompile;endreturn nilendsetmetatable(TargetCompile, metadata)end--GetHealth, GetMaxHealth, GetCFrame, Destroy, GetDistance-- Model index to get the Target Model;appendLog("> Compiling Target")local MyTarget = TargetCompile();local LastAttack = tick();if MyTarget.Model and not MyTarget.Dead thenappendLog("> Moving to next Target")while MyTarget.Dead == false and self.Dead == false and AutoFarmToggle == true and self.FightingBoss == false and MyTarget:GetDistance() >= 12 dointerface:SetFarmStatus("Moving to next target");PlayerMover:NextLocation(PlayerMover:GetBehindTargetLocation(MyTarget.Model, config.FarmingDist))wait();endappendLog("> Killing Target")while MyTarget.Dead == false and MyTarget.Model and self.Dead == false and AutoFarmToggle == true dointerface:SetFarmStatus("Killing target");if tick()-LastAttack >= 0.15 thenLastAttack = tick();KeyEvent:FireServer(Keys.key_event, "Mouse1", "Down", MyTarget.Model, false, CFrame.new());endif (MyTarget:GetHealth()/MyTarget:GetHealth()) <= 0.2 thenPlayerMover:NextLocation(PlayerMover:GetForwardTargetLocation(MyTarget.Model, config.FarmingDist))elsePlayerMover:NextLocation(PlayerMover:GetBehindTargetLocation(MyTarget.Model, config.FarmingDist))endwait();endif config.ClientPersistentSettings.CollectCorpses and MyTarget.Model and Character and self.Dead == false and AutoFarmToggle == true thenappendLog("> Collecting Target Corpse")if MyTarget.Model and (MyTarget.Model:GetModelCFrame().p - Character:GetModelCFrame().p).magnitude <= 15 thenself.Collecting = true;for _,child in next, MyTarget.Model:GetDescendants() doif child.Name == "HumanoidRootPart" thenPlayerMover:NextLocation(child.CFrame)endendendendlocal CollectDelay = tick();while self.Collecting and tick()-CollectDelay <= 1.25 and self.Dead == false and AutoFarmToggle == true dointerface:SetFarmStatus("Collecting Corpse");if MyTarget.Model thenfor _, child in next, MyTarget.Model:GetDescendants() doif child:IsA("ClickDetector") and config.ClientPersistentSettings.CollectCorpses thenClickDetectorFire(child);endendwait();elsebreak;endendif MyTarget.Destroy thenMyTarget:Destroy();endinterface:SetFarmStatus("");self.TargetDistance = math.huge;self.Collecting = false;appendLog("> Target died, cleaning up.")elseif TargetCompile.Destroy thenTargetCompile:Destroy();endappendLog("> Destroying Target")end-- Target Loop Insideendwait();-- END INSIDE WHILEendappendLog("Set status to Off, we dead jim.")-- END OUTSIDE WHILEinterface:SetFarmStatus("Off");end)elseappendLog("Turn off farm partition.")interface:SetFarmStatus("Off");CurrentCamera.CameraType = Enum.CameraType.Custom;CurrentCamera.CameraSubject = LocalPlayer.Character.Humanoid;game:GetService("RunService"):UnbindFromRenderStep("boss_fight");PlayerMover:Disable();endendend-- ENDend}metadata.__index = function(self, i)if methods[i] thenreturn function(s, ...)return methods[i](self, ...)endendendmetadata.__call = function(self)if self.PlayerStats ~= nil or self.QuestDirectory ~= nil or #self.Connections > 0 thenprint("farm object already initialized.");return;endlocal PlayerFolder = LocalPlayer:WaitForChild("PlayerFolder");self.PlayerFolder = PlayerFolder;self.PlayerStats = PlayerFolder:WaitForChild("Stats");self.QuestDirectory = PlayerFolder.CurrentQuest.Complete;local idleConnection = LocalPlayer.Idled:Connect(function()if config.ClientPersistentSettings.AfkToggle thenlocal VirtualUser = game:GetService("VirtualUser");VirtualUser:CaptureController()VirtualUser:ClickButton2(Vector2.new())endend)local function RecursePatchCC(Upper)for _,Child in pairs(Upper:GetChildren()) doif Child:IsA("BasePart") then--local PrevCC = Child.CanCollide;--local Hook = Child:AddGetHook("CanCollide", PrevCC)table.insert(config.CCParts, {Child, Child.Transparency})endif #Child:GetChildren() > 0 thenRecursePatchCC(Child)endendendfor _, Building in pairs(config.CanCollideBuildings) dolocal CBuilding = workspace:FindFirstChild(Building)if CBuilding thenRecursePatchCC(CBuilding)elsewarn("[N]: Missed Building Asset ("..Building..")")endendtable.insert(self.Connections, idleConnection);endsetmetatable(farm, metadata);end-- FARM MODULE END-- ESP MODULENPCEsp = {Tags = {},TagHolder = nil,TierList = {["First Class"] = "H",["Rank 1"] = "M",["Rank 2"] = "L",["High"] = "H",["Mid"] = "M",["Low"] = "L",},NPCTypes = {"Investigator","Aogiri","Athlete","Human","Eto"},Connections = {},}dolocal metadata = {}local methods = {UpdateIndicators = function(self, bool)config.ClientPersistentSettings.Esp.DistanceIndicator = bool;config:Save();for index,Tag in pairs(self.Tags) doif Tag thenif Tag.Adornee and Tag.Name == "MONSTER" thenlocal MonsterMain = Tag:FindFirstChild("MonsterMain")if MonsterMain thenMonsterMain.M_Distance.Visible = bool;self:ResizeTag(Tag);elsetable.remove(self.Tags, index)Tag:Destroy();endendelsetable.remove(self.Tags, index)endendend,UpdateTierLabels = function(self, bool)config.ClientPersistentSettings.Esp.NPCTierLabel = bool;config:Save();for index,Tag in pairs(self.Tags) doif Tag thenif Tag.Adornee and Tag.Name == "MONSTER" thenlocal MonsterMain = Tag:FindFirstChild("MonsterMain")local GUID = Tag:FindFirstChild("GUID")if MonsterMain and GUID thenif GUID.Value:IsA("Player") == false thenMonsterMain.M_Tier.Visible = bool;self:ResizeTag(Tag);endelsetable.remove(self.Tags, index)Tag:Destroy();endelsetable.remove(self.Tags, index)Tag:Destroy();endelsetable.remove(self.Tags, index)endendend,UpdateNametags = function(self, bool)config.ClientPersistentSettings.Esp.Nametags = bool;config:Save();for index,Tag in pairs(self.Tags) doif Tag thenif Tag.Adornee and Tag.Name == "MONSTER" thenlocal MonsterMain = Tag:FindFirstChild("MonsterMain")if MonsterMain thenMonsterMain.MonsterName.Visible = bool;self:ResizeTag(Tag);elsetable.remove(self.Tags, index)Tag:Destroy();endendelsetable.remove(self.Tags, index)endendend,UpdatePlayerHealth = function(self, bool)end,UpdatePlayerAbilities = function(self, bool)end,GetTier = function(self, name)local TierMatch;for Query,Result in pairs(self.TierList) doif name:lower():find(Query:lower()) thenreturn Result;endendreturn "?";end,ResizeTag = function(self, Tag)if Tag thenTag.Size = UDim2.new(0,Tag.MonsterMain.UIListLayout.AbsoluteContentSize.X,0,25)elsetable.remove(self.Tags, index)Tag:Destroy();endend,ShowTagTypes = function(self, Types)for _,Tag in pairs(self.Tags) dolocal GUID = Tag:FindFirstChild("GUID")if GUID thenlocal Target = GUID.Valueif Target thenlocal Head = Target:IsA("Player") and Target.Character:FindFirstChild("Head") or Target:FindFirstChild("Head")local Humanoid = Target:IsA("Player") and Target.Character:FindFirstChildWhichIsA("Humanoid") or Target:FindFirstChildWhichIsA("Humanoid")if Humanoid and Head thenHumanoid.DisplayDistanceType = "Subject"Tag.Enabled = false;for _,Viewing in pairs(Types) doif not Target:IsA("Player") thenif tostring(Target):lower():find(Viewing:lower()) thenHumanoid.DisplayDistanceType = "None"Tag.Enabled = true;endelseif Viewing == "Players" thenHumanoid.DisplayDistanceType = "None"Tag.Enabled = true;endendendendendendendend,GetTag = function(self, target)for _,Tag in pairs(self.TagHolder:GetChildren()) dolocal GUID = Tag:FindFirstChild("GUID")if GUID thenif GUID.Value == target thenreturn Tag;endendendreturn nilend,CreatePlayerTag = function(self, Player, Adornee)if Player and Adornee thenlocal Tag = interface.PlayerTag:Clone();Tag.Name = "PLAYER"local GUID = Instance.new("ObjectValue", Tag)GUID.Name = "GUID";GUID.Value = Player;Tag.Adornee = Adornee;local Humanoid = Player.Character:WaitForChild("Humanoid", 2)local PlayerFolder = Player:WaitForChild("PlayerFolder", 2);local Head = Player.Character:WaitForChild("Head", 2)local PlayerStatus = Head:FindFirstChild("PlayerStatus");if Humanoid and PlayerFolder thenlocal HealthFrame = Tag:FindFirstChild("HealthFrame")local AbilityFrame = Tag:FindFirstChild("AbilityFrame")local HealthCon = Humanoid:GetPropertyChangedSignal("Health"):connect(function()if HealthFrame and Humanoid thenlocal Fill = HealthFrame:FindFirstChild("Fill")if Fill thenFill.Size = UDim2.new(Humanoid.Health/Humanoid.MaxHealth,0,1,0)endelseHealthCon:Disconnect();endend)if HealthFrame thenHealthFrame.Fill.Size = UDim2.new(Humanoid.Health/Humanoid.MaxHealth,0,1,0)HealthFrame.Visible = true;endif PlayerStatus thenPlayerStatus.Enabled = false;endlocal ModelExtents = Player.Character:GetExtentsSize()Tag.StudsOffsetWorldSpace = Vector3.new(0, ModelExtents.Y - 5, 0) -- take off 5 for the normal height of a Character--Tag.AbilityFrame.Visible = false;Tag.MaxDistance = 250;Tag.Parent = self.TagHoldertable.insert(self.Tags, Tag)return Tag;endTag:Destroy();return nil;endend,CreateTag = function(self, Target, adornee)if Target and adornee thenlocal Tag = interface.MonsterTag:Clone()Tag.Name = "MONSTER"local GUID = Instance.new("ObjectValue", Tag)GUID.Name = "GUID";GUID.Value = Target;Tag.Adornee = adornee;local Humanoid = Target:IsA("Player") and Target.Character:WaitForChild("Humanoid", 2) or Target:WaitForChild("Humanoid", 2)if Humanoid thenif not Target:IsA("Player") thenlocal NPC_Tier = NPCEsp:GetTier(tostring(Target.Name))if NPC_Tier ~= "?" thenTag.MonsterMain.M_Tier.Text = NPC_Tier;Tag.MonsterMain.M_Tier.Visible = true;elseTag.MonsterMain.M_Tier.Visible = false;endelseTag.MonsterMain.M_Tier.Visible = false;endlocal DisplayName,DisplayColor = "null",Color3.new(1,0,0);Tag.MonsterMain.M_Distance.Visible = config.ClientPersistentSettings.Esp.DistanceIndicator;Tag.MonsterMain.MonsterName.Visible = config.ClientPersistentSettings.Esp.Nametags;if not Target:IsA("Player") thenTag.MonsterMain.M_Tier.Visible = config.ClientPersistentSettings.Esp.NPCTierLabel;endfor _,TargetName in pairs(self.NPCTypes) doif not Target:IsA("Player") thenif tostring(Target):lower():find(TargetName:lower()) thenDisplayName = tostring(TargetName)DisplayColor = TargetName == "Eto" and Color3.new(1,0.3,0.3) or Color3.new(1,1,1)Tag.MonsterMain.MonsterName.Active = false;break;endelseDisplayName = tostring(Target.Name)DisplayColor = Color3.new(1, 170/255, 127/255)break;endendTag.Enabled = false;for _,Viewing in pairs(config.ClientPersistentSettings.Esp.ViewTypes) doif not Target:IsA("Player") thenif tostring(Target):lower():find(Viewing:lower()) thenTag.Enabled = true;endelseif Viewing == "Players" thenTag.Enabled = true;endendendif Tag.Enabled thenHumanoid.DisplayDistanceType = "None"endTag.MonsterMain.MonsterName.Text = tostring(DisplayName);Tag.MonsterMain.MonsterName.TextColor3 = DisplayColor;Tag.MonsterMain.MonsterName.LayoutOrder = 1;Tag.MonsterMain.MonsterName.Size = UDim2.new(0,game:GetService("TextService"):GetTextSize(DisplayName, Tag.MonsterMain.MonsterName.TextSize, Tag.MonsterMain.MonsterName.Font, Vector2.new(0,0)).X,1,0)local ModelExtents = Target:IsA("Player") and Target.Character:GetExtentsSize() or Target:GetExtentsSize();Tag.StudsOffsetWorldSpace = Vector3.new(0, ModelExtents.Y - 5, 0) -- take off 5 for the normal height of a Characterself:ResizeTag(Tag);Tag.Parent = self.TagHoldertable.insert(self.Tags, Tag)return TagendTag:Destroy();endreturn nilend,Destroy = function(self)self.TagHolder:Destroy();setmetatable(NPCEsp, {})NPCEsp = nilend,}metadata.__index = function(self, i)if methods[i] thenreturn function(s, ...)return methods[i](self, ...)endendendmetadata.__call = function(self)self.TagHolder = Instance.new("ScreenGui")self.TagHolder.Name = "[FH] Tags"self.TagHolder.Parent = game:GetService("CoreGui")self.TagHolder.ChildAdded:connect(function(Tag)local Target = Tag:FindFirstChild("GUID").Value;local function DeleteTag(child, parent)if parent == nil thenTag:Destroy();endendif Target:IsA("Model") thenTarget.AncestryChanged:connect(DeleteTag)elseif Target:IsA("Player") thenTarget.Character.AncestryChanged:connect(DeleteTag)endif Tag.Name == "MONSTER" thenTag.MonsterMain.MonsterName.MouseButton1Down:connect(function()if Target:IsA("Player") theninterface:ShowStats(Target);endend)endend)endsetmetatable(NPCEsp, metadata)end-- ESP MODULE END-- CONFIG MODULE-- Configuration settings object.config = {FilePath = "FH_RoGhoul.cfg",FarmingDist = 3,FarmingStage = 1,KCMax = 8,MaxLevel = 2000,StatusSymbols = {["Running"] = 1510759484, ["Stopped"] = 54479706},AutoTraining = false,QuestOverride = false,StatRequirements = {["Weapon"] = {350,false},["Durability"] = {50,false},},StatBypass = false,-- Afk Prevention VariablesClientPersistentSettings = {["Version"] = VERSION;["TargetTypes"] = {"Investigator"},["CollectCorpses"] = true,["FarmingBreak"] = true,["ReputationFarm"] = false,["BuildingTransparencyToggle"] = true,["AfkToggle"] = true,["StreamerToggle"] = false,["EtoFarm"] = false,["Esp"] = {["DistanceIndicator"] = true,["NPCTierLabel"] = true,["Nametags"] = true,["PlayerAbilities"] = false,["PlayerHealth"] = true,["ViewTypes"] = {},},},CanCollideBuildings = {"CCGBuilding","Rural","Storage","Parking Garage","Kamii","YamoriTowerOutside","CCGBuilding","CCGLab","UtaMaskShop","Anteiku","KakuhouSurgeonWarehouse","Track And Field","ClosedApartment","Ruins","Buildings","Railroad","Park","Blocks","11thWardBase","GasStation","Rural", -- Patch for floor?"Asphalt" -- Patch for floor?},ReputationLocations = {["CCG"] = workspace.CCGBuilding.Yoshitoki,["Ghoul"] = workspace.Anteiku.Yoshimura,},CCParts = {}}dolocal metadata = {};local methods = {Save = function(self)local CurrentSettings = self.ClientPersistentSettings;local EncodedData = game:GetService("HttpService"):JSONEncode(CurrentSettings)if type(EncodedData) == "string" thenwritefile(self.FilePath, EncodedData);endend,Load = function(self)local ConfigFilepcall(function()ConfigFile = readfile(self.FilePath)end)local NewSettings;if ConfigFile thenlocal DecodedData = game:GetService("HttpService"):JSONDecode(ConfigFile)NewSettings = DecodedDataif NewSettings.Version == nil thenself:Save();warn("[N] No Version found, which indicates old trainer. Using defaults.")returnelseif NewSettings.Version and NewSettings.Version ~= VERSION thenself:Save();warn("Update identified, using defaults.")returnendself.ClientPersistentSettings = NewSettings;elsewarn("[N]: No Config file found. Using defaults.")self:Save();endend};metadata.__index = function(self, i)if methods[i] thenreturn function(s, ...)return methods[i](self, ...)endendendsetmetatable(config, metadata);end-- CONFIG MODULE END-- MODULES ENDfunction ClickDetectorFire(detector)if fireclickdetector then -- Synapsefireclickdetector(detector, 1);elseif click_detector then -- ProtoSmasherclick_detector(detector, 1);elseconfig.ClientPersistentSettings.CollectCorpses = false;endendKillScript = function()pcall(function() KillKey() end);pcall(function() trainer:Destroy() end);pcall(function() farm:Destroy() end);pcall(function() interface:Destroy() end);pcall(function() NPCEsp:Destroy() end)error("Killed Ro-Ghoul trainer.", 0);endlocal function luau()if is_luau thenreturn is_luau();elsereturn isluau();endwarn("No function was found to confirm luau.")return nil;endlocal function readonly(table, boolean)if make_writeable and not boolean thenmake_writeable(table);elseif make_readonly and not boolean thenmake_readonly(table);elseif setreadonly thensetreadonly(table, boolean);elseprint("Could not find a valid table to set read only... (Meta)")endendmouse1click = mouse1click or Input.LeftClick;newcclosure = newcclosure or protect_functiongetnamecallmethod = getnamecallmethod or get_namecall_methodif luau() thenlocal KeyEventMeta = getrawmetatable(KeyEvent)readonly(KeyEventMeta, false)local oldNC = KeyEventMeta.__namecallif PROTOSMASHER_LOADED then -- Proto doesn't support newcclosure, oh well.KeyEventMeta.__namecall = function(self, ...)local Method = getnamecallmethod();local Arguments = {...}if self == KeyEvent and Method == "FireServer" thenKeys.key_event = Arguments[1];endreturn oldNC(self, unpack(Arguments))endelseKeyEventMeta.__namecall = newcclosure(function(self, ...)local Method = getnamecallmethod();local Arguments = {...}if self == KeyEvent and Method == "FireServer" thenKeys.key_event = Arguments[1];endreturn oldNC(self, unpack(Arguments))end)endrepeatmouse1click();wait();until Keys.key_event ~= ""KeyEventMeta.__namecall = oldNC;elselocal KeyEventMeta = getrawmetatable(KeyEvent)readonly(KeyEventMeta, false)local oldNC = KeyEventMeta.__namecallif PROTOSMASHER_LOADED thenKeyEventMeta.__namecall = function(self, ...)local Arguments = {...}if self == KeyEvent thenKeys.key_event = Arguments[1];endreturn oldNC(self, ...)endelseKeyEventMeta.__namecall = newcclosure(function(self, ...)local Arguments = {...}if self == KeyEvent thenKeys.key_event = Arguments[1];endreturn oldNC(self, ...)end)endrepeatmouse1click();wait();until Keys.key_event ~= ""KeyEventMeta.__namecall = oldNC;end-- RUN MODULESNPCEsp();config:Load();farm();trainer();interface();-- OTHERdolocal suffixes = {"K", "M", "B", "T", "Q", "Qu", "S", "Se", "O", "N", "D"}SecondsToHMS = function(Seconds)local Minutes = (Seconds - Seconds%60)/60Seconds = Seconds - Minutes*60local Hours = (Minutes - Minutes%60)/60Minutes = Minutes - Hours*60return string.format("%02i", Hours)..":"..string.format("%02i", Minutes)..":"..string.format("%02i", Seconds)endtoSuffixString = function(n)for i = #suffixes, 1, -1 dolocal v = math.pow(10, i * 3)if n >= v thenreturn ("%.2f"):format(n / v) .. suffixes[i]endendreturn tostring(n)endendlocal function recurse(parent)for index, obj in pairs(parent:GetChildren()) doif obj:IsA("BasePart") and #obj:GetChildren() == 0 thenobj.CanCollide = falseelseif #obj:GetChildren() >= 1 thenif obj:IsA("BasePart") thenobj.CanCollide = falseendrecurse(obj)endendendif LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("Humanoid") thenlocal deathConnection = LocalPlayer.Character.Humanoid.Died:Connect(function()farm.Dead = true;if farm.LastTouchedCFrame thenfarm.DeathLocation = farm.LastTouchedCFrame + Vector3.new(0, 3, 0);endend)table.insert(farm.Connections, deathConnection);endlocal onCharAdded;onCharAdded = LocalPlayer.CharacterAdded:Connect(function(newCharacter)local Humanoid = newCharacter:WaitForChild("Humanoid");local deathConnection = Humanoid.Died:Connect(function()farm.Dead = true;if farm.DeathLocation and farm.LastTouchedCFrame thenfarm.DeathLocation = farm.LastTouchedCFrame + Vector3.new(0, 3, 0);endend)table.insert(farm.Connections, deathConnection);farm.Dead = falseif farm.DeathLocation and AutoFarmToggle thenrepeatif newCharacter.PrimaryPart thennewCharacter:SetPrimaryPartCFrame(farm.DeathLocation);endwait();until newCharacter.PrimaryPart and math.abs((farm.DeathLocation.p-newCharacter.PrimaryPart.Position).magnitude) <= 10;farm.DeathLocation = nil;endCharacterRemotes = LocalPlayer.Character:WaitForChild("Remotes", 2);KeyEvent = CharacterRemotes:WaitForChild("KeyEvent", 2);if AutoFarmToggle thenfarm:Start();endend)dofor _, Spawn in pairs(farm.NPCDirectory:GetChildren()) dotable.insert(farm.Connections, Spawn.ChildAdded:connect(function(Target)local Target_Head = Target:WaitForChild("Head", 7)if Target_Head and NPCEsp thenlocal Tag = NPCEsp:CreateTag(Target, Target_Head)table.insert(farm.NPCTable, Target);endend))table.insert(farm.Connections, Spawn.ChildRemoved:connect(function(Target)for index,Userdata in pairs(farm.NPCTable) doif Userdata == Target and NPCEsp thenlocal OldTag = NPCEsp:GetTag(Target)if OldTag thenOldTag:Destroy();endtable.remove(farm.NPCTable, index);endendend))-- Get Current;for _,Target in pairs(Spawn:GetChildren()) dolocal Target_Head = Target:FindFirstChild("Head")if Target_Head and NPCEsp thenlocal Tag = NPCEsp:CreateTag(Target, Target_Head)table.insert(farm.NPCTable, Target);endendendfor _,RoPlayer in pairs(game:GetService("Players"):GetChildren()) doif RoPlayer ~= LocalPlayer thenRoPlayer.CharacterAdded:connect(function(TargetCharacter)local Target_Head = TargetCharacter:WaitForChild("Head", 7)if Target_Head and NPCEsp thenif NPCEsp.CreateTag and NPCEsp.CreatePlayerTag thenlocal Tag = NPCEsp:CreateTag(RoPlayer, Target_Head)local PTag = NPCEsp:CreatePlayerTag(RoPlayer, Target_Head)if Tag and PTag thenTargetCharacter.AncestryChanged:connect(function()Tag:Destroy();PTag:Destroy();end)endendendend)if RoPlayer.Character and RoPlayer.Character:FindFirstChildWhichIsA("Humanoid") thenlocal Target_Head = RoPlayer.Character:FindFirstChild("Head")if Target_Head and NPCEsp thenlocal Tag = NPCEsp:CreateTag(RoPlayer, Target_Head)local PTag = NPCEsp:CreatePlayerTag(RoPlayer, Target_Head)if Tag and PTag thenRoPlayer.Character.AncestryChanged:connect(function()Tag:Destroy();PTag:Destroy();end)endendendendendtable.insert(farm.Connections, game:GetService("Players").PlayerAdded:connect(function(NewPlayer)NewPlayer.CharacterAdded:connect(function(TargetCharacter)local Target_Head = TargetCharacter:WaitForChild("Head", 7)if Target_Head and NPCEsp thenif NPCEsp.CreateTag and NPCEsp.CreatePlayerTag thenlocal Tag = NPCEsp:CreateTag(NewPlayer, Target_Head)local PTag = NPCEsp:CreatePlayerTag(RoPlayer, Target_Head)if Tag and PTag thenTargetCharacter.AncestryChanged:connect(function()Tag:Destroy();PTag:Destroy();end)endendendend)end))endlocal mainLoop;local labelUpdateStamp = tick();mainLoop = game:GetService('RunService').RenderStepped:Connect(function()interface.VPRotationConstant = (interface.VPRotationConstant >= 360) and 0 or interface.VPRotationConstant + 1;if interface.ViewingModel thenlocal ExtentSize = interface.ViewingModel:GetExtentsSize()interface.VPCamera.CFrame = CFrame.new() * CFrame.Angles(0,math.rad(interface.VPRotationConstant),0) * CFrame.new(Vector3.new(0, 0, ExtentSize.Y), interface.ViewingModel:GetModelCFrame().p)endif (tick()-trainer.LastTrainingCheck >= trainer.AutoTrainingCheckFrequency) thentrainer.LastTrainingCheck = tick();if AutoTraining thentrainer:Train();endendif farm.RunTime ~= nil theninterface.RunTimeDisp.Text = SecondsToHMS(math.floor(tick()-farm.RunTime)+0.5)elseinterface.RunTimeDisp.Text = SecondsToHMS(0);endinterface.YenDisp.Text = toSuffixString(stats.Yen.Gain);interface.RCDisp.Text = toSuffixString(stats.RC.Gain);interface.RDDisp.Text = toSuffixString(stats.Rep.Gain);interface.KillDisp.Text = toSuffixString(stats.Kill.Gain);local CurrentQuest = farm:GetCurrentQuest();if CurrentQuest theninterface.QuestOutput.Text = tostring(CurrentQuest.Value).."/"..tostring(CurrentQuest.Max.Value)elseinterface.QuestOutput.Text = "None"end-- Stat Requirements.doif config.StatBypass theninterface.ReqFrame.Visible = false;interface.P3Contents.Visible = true;endlocal StatCount = 0;local PassedStats = {};for Stat, MinReq in pairs(config.StatRequirements) doStatCount = StatCount + 1;if MinReq[2] == true thentable.insert(PassedStats, Stat)endendif #PassedStats == StatCount thenconfig.StatBypass = true;endend-- NameTagsdolocal SelfChar = LocalPlayer.Character;if SelfChar thenlocal SelfHead = SelfChar:FindFirstChild("Head")if SelfHead thenfor index,Tag in pairs(NPCEsp.Tags) doif Tag thenlocal GUID = Tag:FindFirstChild("GUID")if Tag.Name == "MONSTER" and GUID thenlocal MonsterMain = Tag:FindFirstChild("MonsterMain")local Target = GUID.Value;if Target and MonsterMain thenlocal ModelExtents;if Target:IsA("Player") and Target.Character thenModelExtents = Target.Character:GetExtentsSize()elseif Target thenModelExtents = Target:GetExtentsSize();endif ModelExtents thenif Tag.StudsOffsetWorldSpace.Y ~= (ModelExtents.Y - 5) thenTag.StudsOffsetWorldSpace = Vector3.new(0,(ModelExtents.Y - 5), 0)endif MonsterMain.M_Distance.Visible and Tag thenif Tag.Adornee thenlocal TargetSelfMagnitude = math.floor((Tag.Adornee.CFrame.p - SelfHead.CFrame.p).magnitude);MonsterMain.M_Distance.Text = tostring(TargetSelfMagnitude).."m"MonsterMain.M_Distance.Size = UDim2.new(0,MonsterMain.M_Distance.TextBounds.X + 12,1,0)NPCEsp:ResizeTag(Tag);elsetable.remove(NPCEsp.Tags, index);endendelsetable.remove(NPCEsp.Tags, index);endelsetable.remove(NPCEsp.Tags, index);endelseif Tag.Name == "PLAYER" and GUID thenlocal Target = GUID.Value;if Target.Character thenlocal ModelExtents = Target.Character:GetExtentsSize()if ModelExtents thenif Tag.StudsOffsetWorldSpace.Y ~= (ModelExtents.Y - 5) thenTag.StudsOffsetWorldSpace = Vector3.new(0,(ModelExtents.Y - 5), 0)endendendelsetable.remove(NPCEsp.Tags, index);endelsetable.remove(NPCEsp.Tags, index);Tag:Destroy();endendendendend-- AutoFarmingdoif LocalPlayer.Character == nil or farm.Collecting thenreturn;endfarm.Targets = {};farm.AddingTargets = true;for _,Target in pairs(farm.NPCTable) dofor _,Type in pairs(config.ClientPersistentSettings.TargetTypes) doif tostring(Target):lower():find(Type:lower()) thentable.insert(farm.Targets, Target)endendendfarm.AddingTargets = false;--if all the targets are unchecked.if #farm.Targets == 0 and AutoFarmToggle and #config.ClientPersistentSettings.TargetTypes == 0 theninterface:StopFarmButtonClick();end-- no targets so lets no let the character fall to death.if #farm.Targets == 0 and AutoFarmToggle thenlocal Character = LocalPlayer.Character;if Character thenCharacter.PrimaryPart.Anchored = true;interface:SetFarmStatus("There are no NPCS available to kill.. Waiting..");endreturnendlocal Character = LocalPlayer.Character;if Character thenpcall(function()Character.PrimaryPart.Anchored = false;end)endlocal ClosestTarget = nil;local Distance = math.huge;for _, Target in pairs(farm.Targets) dolocal tHumanoid = Target:FindFirstChild("Humanoid")if tHumanoid and tHumanoid.Health > 0 thenlocal tDistance = (LocalPlayer.Character:GetModelCFrame().p-Target:GetModelCFrame().p).magnitude;if tDistance <= Distance thenDistance = tDistance;ClosestTarget = Target;endendendif ClosestTarget and Distance <= farm.TargetDistance thenif farm.ClosestTarget ~= nil thenif farm.ClosestTarget == ClosestTarget thenreturnendendfarm.ClosestTarget = ClosestTarget;farm.TargetDistance = Distance;endendend);table.insert(farm.Connections, mainLoop);table.insert(farm.Connections, onCharAdded);do -- Stops character from getting stuck undermap. Also saves the last cframe of character.spawn(function()local belowZeroTimeStamp = tick();while farm do-- Persistenceif AutoFarmToggle thenlocal Character = LocalPlayer.Characterif Character thenlocal IgnoreList = {Character}local PP = Character.PrimaryPart;if PP thenlocal DownCast = Ray.new(PP.Position, PP.CFrame.upVector * -25)local Object,Position = workspace:FindPartOnRayWithIgnoreList(DownCast, IgnoreList)if (Object or farm.FightingBoss) and (tick()-farm.TimeFromLastTouch) >= 0.5 and PP thenfarm.TimeFromLastTouch = tick();farm.LastTouchedCFrame = PP.CFrame;endendendendwait()endend)end
Post a Comment (0)