gps = game:GetService("GamePassService");

id = script:WaitForChild("GamePassID");
EH = script:WaitForChild("ExtraHealthAmount");


game.Workspace.ChildAdded:connect(function(char)
h=char:FindFirstChild("Humanoid")
if h~=nil then
	plr=game.Players:FindFirstChild(char.Name)
	if gps:PlayerHasPass(plr, id.Value) then
		h.MaxHealth=EH.Value
		h.Health=EH.Value
	end
end
end)

This is the script which i put into ServerScriptServices, and its a regular script, not local. I added 2 number values as well into the script as well, one which is GamePassID and the id is in the value, and ExtraHealthAmount which i set the value of to 50. Yet when i go to test it out, my health remains 100. And it should work for me because i already have it of course.