Advanced Health System [OS] [Bug Fix Update] [R.I.P]

This is a open source project trying to recreate space station 13 health system and any other fps game.

Features:

Hunger System

Pain System (If you got too much pain you will scream)

Passive Healing (Its like on minecraft!)

Advanced Health System [Blood System, Limb System, Broken Bone System, Lung System, Oxygen System, Pain System, Medical Tool]

Experimental Feature

Disease System (Make effects using disease system module!! and costume virus!)

Setting System (You can disable hunger now!)

Upcoming Features:

Surgery System [Staged surgery system that require certain object at certain surgery]

Organ System [Realistic organ function combined with the surgery system making good combination]

Module located on ReplicatedStorage folder

local core = require(game.ReplicatedStorage.LimbModules.Handler)

Documentation:

Model:

Module Location:
image

so copy this code to your gun kit whatever your gun kit but i use fe gun kit so if you want for your gun kit you could convert it

for fe gun kit put the scripts in simulatebulletscript on serverscriptservice:
image

put this in
image

local Core = require(game.ReplicatedStorage.LimbModules.Handler)

the below of the line

		if Hit then
				if TargetHumanoid.Parent:FindFirstChild("Limbs") then
					if Hit.Name == "Head" or Hit.Name == "Torso" or Hit.Name == "Left Arm" or Hit.Name == "Right Arm" or Hit.Name == "Right Leg" or Hit.Name == "Left Leg" or Hit.Name == "UpperTorso" or Hit.Name == "LowerTorso" or Hit.Name == "LeftUpperArm" or Hit.Name == "LeftLowerArm" or Hit.Name == "LeftHand" or Hit.Name == "RightUpperArm" or Hit.Name == "RightLowerArm" or Hit.Name == "RightHand" or Hit.Name == "RightUpperLeg" or Hit.Name == "RightLowerLeg" or Hit.Name == "RightFoot" or Hit.Name == "LeftUpperLeg" or Hit.Name == "LeftLowerLeg" or Hit.Name == "LeftFoot" then
						if not Hit:FindFirstChild("ForceField") then
							local brokenchance = math.random(1, 15)
							local bleedingchance = math.random(1, 3)
							local damage = math.random(20, 40)
							local character = Hit.Parent:FindFirstChild("Limbs")
							local character = Hit.Parent
							local cal = math.random(40, 60)	
							Hit.Parent:FindFirstChild("Limbs"):FindFirstChild(Hit.Name).Health.Value -= math.random(20, 40)
							TargetHumanoid:TakeDamage(math.abs(TrueDamage))
							if bleedingchance == 2 then
								Core.bleeding(math.random(20, 30), character)
							end
							if brokenchance == 10 then
								Core.bone(Hit.Name, true, limbfolder)
							end
							if Hit.Name == "Head" then
								Core.inflictpain(85, character)
							end
							if Hit.Name == "Torso" then 
								local which = math.random(1,10)
								if which == 1 then
									character.Internals.Lung.Value -= TrueDamage
								end
							end
						end
					end
			else
				TargetHumanoid:TakeDamage(math.abs(TrueDamage))
			end
40 Likes

Do you have any videos or screenshots of the module?

3 Likes

Survival games with this will be fun to play

Thanks for making it

3 Likes

very cool! looks like you put in a lotta effort keep it up

I will post it later of the module

1 Like

It seems good, however, some suggestions

Do not store modules in startercharacterscripts, why would you do such thing? Just put it in replicatedstorage

Second, format your post text and add rich text please, for proper reading

Reasons why startercharacterscripts is NOT reliable:

  1. Why would you create a copy of the items every time the character gets added?
    Instead, the things that need to be copied (limbs, etc) should be in replicatedstorage. There is no need to create those instances upon character creation.

  2. Using the character as a folder is not reliable, since the player has network ownership over most of his character and could easily delete those folders

Thank you for the suggestions i will later change it

1 Like

Seems good, but it might be breaking roblox TOS, for example the morphine/painkiller.

i will name it just painkiller and its shape are pill

1 Like

While I’m not saying you are necessarily wrong I am saying that you’re focusing on the wrong issue here.

Players can delete server scripts just as well as they can delete ModuleScripts. In fact, in most cases a module will still run even if its parent is nil or you call :Destroy() on it so long as it has been required. If you’re concerned about performance then placing a module in ReplicatedStorage isnt going to stop all of the server scripts that are still being replicated. Instead, a much better approach is to use one Script in a place like ServerScriptService and handling every time a player loads a character.

Take a look:

image

I destroyed them both on the client, but the script that ran after I deleted them was the ModuleScript itself. They both run the following:

while wait(5) do 
   print("This is just a script!") 
end

and

require(script.Module)

–Module

while wait(5) do 
	print("This is a module in a script!") 
end

return nil

The issue here isn’t with any sort of ModuleScript, it’s the system’s replication as a whole.

1 Like

Yes, that’s what I was trying to tell him, one script in SSS that handles everything.

Also, module scripts will still run because the script that called require on it before being destroyed “cached” it and is stored now in the script.

Similarly to, but not equal to:

local part = Instance.new("Part")
part.Parent = nil --Will still exist
part = nil --Reference to the part is nil so it gets garbage collected now

Basically:

-store limbs etc in repstorage
-use sss for script and module

Why using replicatedstorage instead of the character for storage?

Main reason:
The client can delete the instances you place inside his character and it will replicate to the server. Which can error your serverscript

1 Like

Pretty sure you can use “changed” instead of “while wait() do” for the limb health color gui.

You could also replace the entire else if color checks with a better one that scales with health

if character:WaitForChild("Limbs").Head.Health.Value < 100 then
		script.Parent.BackgroundColor = BrickColor.new("Lime green")
	end
	if character:WaitForChild("Limbs").Head.Health.Value < 46 then
		script.Parent.BackgroundColor = BrickColor.new("Dark orange")
	end
	if character:WaitForChild("Limbs").Head.Health.Value < 21 then
		script.Parent.BackgroundColor = BrickColor.new("Really red")
		script.Parent.Broken.Visible = true
	end

with

script.Parent.BackgroundColor = Color3.fromHSV((character:WaitForChild("Limbs").Head.Health.Value/100)*.3, 1, 1)

I will try to fix everything i could

I fixes some bug everything should work normaly if there anything wrong tell me

Considering the fact that you’re basing it off of SS13’s human body system, I am really excited to see what’ll come up in the future updates!

i didnt quite got where i place that if hit code line in the simulate bullet scripts, could you explain it in a proper way?

Iam sorry about the code cause it was conflicting with the old code that i didnt fully removed i edit it so it should works

Could this possibly help with exploiters?

What you mean by helping exploiter?

help detour them
Sorry, I explained that in the wrong way.
I mean help stop the exploiter