Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can i change max health?

How can i change max health?

local id = 7721102

game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
	if purchased and ido == id then
		plr.Character.Humanoid.h.Health = 200
	end
end)

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:connect(function(char)
		if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(game.Players[char.Name].UserId, id) then
			char.Humanoid.h.Health = 200
		end
	end)
end)

1 answer

✓ Accepted answer

Something like this...?

char.Humanoid.MaxHealth = 1000
char.Humanoid.Health = char.Humanoid.MaxHealth

This discussion is preserved as it was. New answers, comments, and votes are closed.