[Rough Draft] Easy Damage, it's for... well... easy damage! [OPEN SOURCE]

This will be fairly short and sweet, I don’t like it when people are acting like they are trying to sell stuff to you in #resources:community-resources .


Also in case you are wondering, this was inspired by this post
Humanoid:TakeDamage(damage, attackingPlayer) and Team.AllowTeamKilling


Documentation Or something like that I mean there’s only one function

EasyDamage.DealDamage(Char,Damage,TeamKill,IgnoreFF,DamageTeam)

Char - The character taking damage (Instance)
Damage - The amount of damage being dealt (number)
TeamKill - Whether or not there is damage between players on the same team (boolean)
IgnoreFF - Whether or not a character`s forcefield is ignored (boolean)
DamageTeam - The team that is being compared of TeamKill is false (Team)

simply use this by pasting this into a script
local EasyDamage = require(5535820845)

Source
local EasyDamage = {}
---------------
--DEAL DAMAGE--
---------------
function EasyDamage.DealDamage(Char,Damage,TeamKill,IgnoreFF,DamageTeam)
	--------------------------
	--GENERAL ERROR MESSAGES--
	--------------------------
	if typeof(Char) ~= "Instance" then warn("Char must be a Instance, you used a"..typeof(Char)) return EasyDamage end -- Checks if Char is an Instance
	if not game.Players:GetPlayerFromCharacter(Char) then warn("There is no Player for Char") return EasyDamage end -- Further checking to see if Char is actually a character
	if typeof(Damage) ~= "number" then warn("Damage must be a number, you used a "..typeof(Damage)) return EasyDamage end -- Checks if Damage is a number
	if typeof(TeamKill) ~= "boolean" and TeamKill then warn("TeamKill must be a boolean, you used a "..typeof(TeamKill)) return EasyDamage end -- Checks if TeamKill is a boolean (true/false)
	if typeof(IgnoreFF) ~= "boolean" and IgnoreFF then warn ("IgnoreFF must be a boolean, you used a "..typeof(IgnoreFF)) return EasyDamage end -- Checks if IgnoreFF is a boolean (true/false)
	------------------------
	--SCRIPT FUNCTIONALITY--
	------------------------
	if TeamKill  == false and IgnoreFF == false then
		if not DamageTeam:IsA("Team") then warn("In order to disable team killing, you must name a team in DamageTeam") return EasyDamage end -- Checks for DamageTeam
		if game.Players:GetPlayerFromCharacter(Char).Team ~= DamageTeam then -- Checks if the teams are the same
			Char.Humanoid:TakeDamage(Damage) -- Deals damage to the humanoid
		end
	elseif TeamKill == true and IgnoreFF == true then
		Char.Humanoid.Health = Char.Humanoid.Health - Damage -- Instead of directly dealing damage, we subtract health from the character which in turn ignores the force field
	elseif TeamKill == true and IgnoreFF == false then
		Char.Humanoid:TakeDamage(Damage) -- Deals damage to the humanoid
	elseif TeamKill == false and IgnoreFF == true then
		if not DamageTeam:IsA("Team") then warn("In order to disable team killing, you must name a team in DamageTeam") return EasyDamage end -- Checks for DamageTeam
		if game.Players:GetPlayerFromCharacter(Char).Team ~= DamageTeam then -- Checks if the teams are the same
			Char.Humanoid.Health = Char.Humanoid.Health - Damage -- Instead of directly dealing damage, we subtract health from the character which in turn ignores the force field
		end
	end
end
return EasyDamage