local ToggleKeyCode = Enum.KeyCode.F --You can change this if you want to. local VirtualInputManager = game:GetService('VirtualInputManager') local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local Character = LocalPlayer.Character local Humanoid = Character.Humanoid local toggled = true local function jump() VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.Space, false, nil) wait(0.01) VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.Space, false, nil) end game:GetService("UserInputService").InputBegan:Connect(function(input) if input.KeyCode == ToggleKeyCode then toggled = not toggled end end) while true do wait() if not toggled then if Humanoid.Health <= 0 then repeat Character = LocalPlayer.CharacterAdded:Wait() Humanoid = Character:WaitForChild("Humanoid") wait() until Humanoid.Health > 0 end else if Humanoid.FloorMaterial == Enum.Material.Air then jump() if Humanoid.FloorMaterial ~= Enum.Material.Air then continue end if Humanoid.Health <= 0 then repeat Character = LocalPlayer.CharacterAdded:Wait() Humanoid = Character:WaitForChild("Humanoid") wait() until Humanoid.Health > 0 end end end end