infinite oxygen script
Key Required

infinite oxygen script

Goofy Planet GameheckerYAEAWTYAYheckerYAEAWTYAY 9.6K views 5 executesUpdated Nov 21, 2024
Unrated
00
Lua Script•114 lines (3680 chars)
spawn(function()
	game:GetService("ContentProvider"):PreloadAsync({ workspace, game:GetService("ReplicatedStorage"), game:GetService("PlayerGui") })
end)

local v1 = false
local v2 = false
helmet = true
game:GetService("UserInputService")
local v3 = game.Players.LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
local v4 = 10000000000
game.Players.LocalPlayer.Character:WaitForChild("Head")
game:GetService("RunService")
local v5 = game.Players.LocalPlayer.PlayerGui.OxygenBar.Frame.Frame.Meter
local v6 = game.Players.LocalPlayer.PlayerGui.OxygenBar.Frame.Frame.HelmetMeter
local v7 = game.Players.LocalPlayer.Character
local v8 = v7:WaitForChild("HumanoidRootPart")
local v9 = Instance.new("Attachment", v8)
local v_u_10 = Instance.new("LinearVelocity", v8)
v_u_10.Enabled = false
v_u_10.RelativeTo = Enum.ActuatorRelativeTo.Attachment0
v_u_10.VectorVelocity = Vector3.new(0, -5, 0)
v_u_10.Attachment0 = v9
local v11 = v7:WaitForChild("Head")
local _ = false

v3.StateChanged:Connect(function(p12, p13)
	if p13 == Enum.HumanoidStateType.Jumping then
		v_u_10.VectorVelocity = Vector3.new(0, -2.5, 0)
	end
	if p12 == Enum.HumanoidStateType.Jumping then
		v_u_10.VectorVelocity = Vector3.new(0, -5, 0)
	end
end)

local v14 = { " forgot how to breathe", " ran out of air" }

while task.wait(0.2) do
	if game.Players.LocalPlayer.PlayerGui.OxygenBar.Enabled == true then
		workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
	end
	
	local v15 = nil
	local v16 = false
	local v17 = false
	local _ = workspace.CurrentCamera.CFrame.Position
	
	if game.Players.LocalPlayer.Character:FindFirstChild("Space Suit") or (v7:FindFirstChild("Suit2") or v7:FindFirstChild("Suit1")) then
		helmet = true
		Helmet = game.Players.LocalPlayer.Character:FindFirstChild("Space Suit") or (v7:FindFirstChild("Suit2") or v7:FindFirstChild("Suit1"))
		Helmet:WaitForChild("helmet")
	else
		helmet = false
	end
	
	for _, v18 in pairs(workspace:GetPartsInPart(v11)) do
		if v18.Name == "air" or (v18.Name == "humanpersonair" or (v18.Name == "oil" or (v18.Name == "helmet" and v2 == false))) then
			v2 = true
			v15 = v18
		elseif v18.Name == "Water" and helmet == false then
			v2 = false
		elseif v18.Name == "artigrav" then
			v16 = true
			v2 = true
		elseif v18.Name == "Planet Name" then
			v17 = true
		end
	end
	
	if v15 == nil then
		v2 = false
	end
	
	if v16 == true then
		v2 = true
	end
	
	if helmet == true and (Helmet.helmet.Air.Value <= Helmet.helmet.MaxAir.Value and v2 == true) then
		local v19 = Helmet.helmet.Air
		v19.Value = math.min(v19.Value + 10, Helmet.helmet.MaxAir.Value) -- Cap air to max value
	end
	
	if helmet == true and (Helmet.helmet.Air.Value >= 0 and v2 == false) then
		local v20 = Helmet.helmet.Air
		v20.Value = math.max(v20.Value - 0.125, 0) -- Prevent air from going below 0
		v2 = true
	end
	
	v4 = 10000000000

	if v4 <= 1 and v2 == false then
		if v3.Health - 2 <= 0 and v1 == false then
			v1 = true
			if game.Players:FindFirstChild(script.Parent.Name):FindFirstChildOfClass("PlayerGui"):FindFirstChild("PlanetGui"):FindFirstChildOfClass("Frame").Visible == false then
				table.insert(v14, " tried to breathe in space")
			end
			local v21 = v14[math.random(1, #v14)]
			game.ReplicatedStorage.Events.DeathMessage:FireServer(script.Parent.Name .. v21)
		end
		v3:TakeDamage(2)
		task.wait(0.5)
	elseif v4 > 1 and v2 == true then
		v3.Health = v3.Health + 1
		task.wait(0.5)
	end
	
	local v22 = v4 * 0.01
	v5.Size = UDim2.new(v22 / 10000000000, 0, 1, 0)  -- Adjust the size based on the high oxygen level
	if helmet == true then
		v6.Visible = true
		v6.Size = UDim2.new(Helmet.helmet.Air.Value / 200, 0, 1, 0)
	else
		v6.Visible = false
	end
end

Features & Information

just infinte oxygen

Community Comments (1)

heckerYAEAWTYAYheckerYAEAWTYAYNov 21, 2024(edited)

i tried to make it unlimited but sometimes it breaks