function obj:stopAntiRagdollCore() if self.antiRagdollConn then self.antiRagdollConn:Disconnect() self.antiRagdollConn = nil end end function obj:setAntiBat(state) self.antiBatOn = state self.elements.AntiBatBtn.Text = "Anti-Bat : " .. (state and "ON" or "OFF") self:setNeon(self.elements.AntiBatBtn, state) if state then self:startAntiBatCore() self:startAntiRagdollCore() else self:stopAntiBatCore() self:stopAntiRagdollCore() end end function obj:toggleAntiBat() self:setAntiBat(not self.antiBatOn) end function obj:CreateIJP() if self.InfJumpPlatform then return end self.InfJumpPlatform = Instance.new("Part") self.InfJumpPlatform.Name = "InfJumpPlatform" self.InfJumpPlatform.Size = Vector3.new(8, 0.5, 8) self.InfJumpPlatform.Anchored = true self.InfJumpPlatform.CanCollide = true self.InfJumpPlatform.Transparency = 1 self.InfJumpPlatform.Material = Enum.Material.ForceField self.InfJumpPlatform.Parent = workspace end function obj:setInfJump(state) self.infJumpOn = state self.elements.InfJumpBtn.Text = "Inf Jump : " .. (state and "ON" or "OFF") self:setNeon(self.elements.InfJumpBtn, state) if self.infJumpLoopConn then self.infJumpLoopConn:Disconnect() self.infJumpLoopConn = nil end self:CreateIJP() if state then self.infJumpLoopConn = RunService.Heartbeat:Connect(function() if not self.infJumpOn then if self.InfJumpPlatform then self.InfJumpPlatform.Position = Vector3.new(0, -1000, 0) end return end local char = player.Character local root = char and char:FindFirstChild("HumanoidRootPart") local hum = char and char:FindFirstChildOfClass("Humanoid") if not (char and root and hum) then if self.InfJumpPlatform then self.InfJumpPlatform.Position = Vector3.new(0, -1000, 0) end return end local isJumping = UserInputService:IsKeyDown(Enum.KeyCode.Space) or hum:GetState() == Enum.HumanoidStateType.Jumping or hum.Jump if isJumping then if not self.InfJumpPlatform then self:CreateIJP() end self.InfJumpPlatform.Position = root.Position - Vector3.new(0, 3.5, 0) if root.Velocity.Y < 50 then root.Velocity = Vector3.new(root.Velocity.X, 50, root.Velocity.Z) end else if self.InfJumpPlatform then self.InfJumpPlatform.Position = Vector3.new(0, -1000, 0) end end end) else if self.InfJumpPlatform then self.InfJumpPlatform.Position = Vector3.new(0, -1000, 0) end end end function obj:toggleInfJump() self:setInfJump(not self.infJumpOn) end function obj:startKeybindListen() if self.listeningForKey then return end self.listeningForKey = true self.elements.KeybindBtn.Text = "..." self.elements.KeybindBtn.TextColor3 = Color3.fromRGB(255, 220, 60) end function obj:stopKeybindListen(keyName) self.listeningForKey = false self.elements.KeybindBtn.Text = keyName self.elements.KeybindBtn.TextColor3 = Color3.fromRGB(255, 255, 255) end return obj end local function initialize() local gui = createGUI() makeDraggable(gui.Main) local config = ConfigManager.load() gui.KeybindBtn.Text = config.keybind local uiManager = UIManager:new(gui) gui.AntiBatBtn.MouseButton1Click:Connect(function() uiManager:toggleAntiBat() end) gui.InfJumpBtn.MouseButton1Click:Connect(function() uiManager:toggleInfJump() end) gui.KeybindBtn.MouseButton1Click:Connect(function() uiManager:startKeybindListen() end) UserInputService.InputBegan:Connect(function(input, gameProcessed) if uiManager.listeningForKey then if input.UserInputType == Enum.UserInputType.Keyboard then local keyName = tostring(input.KeyCode):gsub("Enum.KeyCode.", "") config.keybind = keyName uiManager:stopKeybindListen(keyName) ConfigManager.save(config) end return end if not gameProcessed and input.UserInputType == Enum.UserInputType.Keyboard then local keyName = tostring(input.KeyCode):gsub("Enum.KeyCode.", "") if keyName == config.keybind then uiManager:toggleAntiBat() end end end) player.CharacterAdded:Connect(function() task.wait(0.5) if uiManager.antiBatOn then uiManager:startAntiBatCore() uiManager:startAntiRagdollCore() end end) end initialize() print("RELAXED HUB ANTI BAT")