Roblox Phantom Forces Script DAMAGE CALCULATIONS SCRIPT

Roblox Phantom Forces Script DAMAGE CALCULATIONS SCRIPT

Script By turtsis

local data = Client.gamelogic.currentgun.data
local r0, r1, d0, d1 = data.range0, data.range1, data.damage0, data.damage1
local dist = ((Client.camera.basecframe * Vector3.new(0, 0, 0.5) ) - targetPos).Magnitude
local damage = dist < r0 and d0 or dist < r1 and (d1 - d0) / (r1 - r0) * (dist - r0) + d0 or d1
damage = targetPart.Name == "Head" and damage * data.multhead or targetPart.Name == "Torso" and damage * data.multtorso or damage
damage = math.floor(damage + 0.5)
%d bloggers like this: