Hello again fellow devs today, I've updated my blood system now OPEN SOURCE. You can copy the R15 version in the description but since TH-cam has a char limit I'll add the R6 Version in the reply of this comment.
--Place inside of ServerScriptService --R6 --[[Make sure to add in a emtpy folder in Workspace and name it "Blood" or it won't work]] ---| Services local TweenService = game:GetService('TweenService') local Players = game:GetService('Players') ---| Constants local tweenInfoIn = TweenInfo.new(3, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out) local tweenInfoOut = TweenInfo.new(5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out) local ignored = {workspace.Blood} ---| Functions function Raycast(origin, direction) local hit, rayPosition, normal = workspace:FindPartOnRayWithIgnoreList(Ray.new(origin, direction), ignored) if hit then local humanoid = hit.Parent:FindFirstChild('Humanoid') or hit.Parent.Parent:FindFirstChild('Humanoid') if humanoid then table.insert(ignored, humanoid.Parent) return Raycast(origin, direction) end return hit, rayPosition, normal end end function StartSplatHitbox(splatter) task.spawn(function() repeat wait() local hit, rayPosition, normal = Raycast(splatter.Position, splatter.Velocity.Unit * 5) if hit then local humanoid = hit.Parent:FindFirstChild('Humanoid') if not humanoid then local unit = splatter.Velocity.Unit.X * 100 local size = Random.new():NextNumber(0.0035, 2) splatter.Anchored = true splatter.CFrame = CFrame.new(rayPosition, rayPosition - normal) * CFrame.Angles(math.rad(90), math.rad(unit), 0) TweenService:Create(splatter, tweenInfoIn, {Size = Vector3.new(size, size/8, size)}):Play() task.delay(15, function() local tween = TweenService:Create(splatter, tweenInfoOut, {Transparency = 1}) tween:Play() tween.Completed:Wait() splatter:Destroy() end) end end until splatter.Anchored end) end ---| Main Program Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local humanoid = character:WaitForChild('Humanoid') local torso = character:WaitForChild('Torso') humanoid.Died:Connect(function() if character:FindFirstChild('Head') then character.Head:Destroy() for i = 1, math.random(200, 250) do local velocityX = Random.new():NextNumber(-10, 10) local velocityZ = Random.new():NextNumber(-10, 10) local velocity = torso.CFrame.UpVector * Random.new():NextNumber(10, 50) + Vector3.new(velocityX, 0, velocityZ) local bloodDrop = Instance.new('Part') bloodDrop.CanCollide = false bloodDrop.Color = Color3.fromRGB(128, 0, 0) bloodDrop.Material = Enum.Material.Slate bloodDrop.Size = Vector3.new(0.1, 0.5, 0.1) bloodDrop.Parent = workspace.Blood bloodDrop.CFrame = CFrame.new(torso.Position + torso.CFrame.UpVector * 0.5, Vector3.new(0, 90, 0)) bloodDrop.Velocity = velocity bloodDrop.RotVelocity = velocity/2 StartSplatHitbox(bloodDrop) task.wait() end end end) end) end)
@@oyy4025haven't tested this one out properly so I hope this is what you're looking for --Place this in ServerScriptService --R15 --[[Make sure to add in a emtpy folder in Workspace and name it "Blood" or it won't work]] ---| Services local TweenService = game:GetService('TweenService') local Players = game:GetService('Players') ---| Constants local tweenInfoIn = TweenInfo.new(3, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out) local tweenInfoOut = TweenInfo.new(5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out) local ignored = {workspace.Blood} ---| Functions function Raycast(origin, direction) local hit, rayPosition, normal = workspace:FindPartOnRayWithIgnoreList(Ray.new(origin, direction), ignored) if hit then local humanoid = hit.Parent:FindFirstChild('Humanoid') or hit.Parent.Parent:FindFirstChild('Humanoid') if humanoid then table.insert(ignored, humanoid.Parent) return Raycast(origin, direction) end return hit, rayPosition, normal end end function StartSplatHitbox(splatter) task.spawn(function() repeat wait() local hit, rayPosition, normal = Raycast(splatter.Position, splatter.Velocity.Unit * 5) if hit then local humanoid = hit.Parent:FindFirstChild('Humanoid') if not humanoid then local unit = splatter.Velocity.Unit.X * 100 local size = Random.new():NextNumber(0.3, 3) splatter.Anchored = true splatter.CFrame = CFrame.new(rayPosition, rayPosition - normal) * CFrame.Angles(math.rad(90), math.rad(unit), 0) TweenService:Create(splatter, tweenInfoIn, {Size = Vector3.new(size, size/8, size)}):Play() task.delay(15, function() local tween = TweenService:Create(splatter, tweenInfoOut, {Transparency = 1}) tween:Play() tween.Completed:Wait() splatter:Destroy() end) end end until splatter.Anchored end) end ---| Main Program Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local humanoid = character:WaitForChild('Humanoid') local torso = character:WaitForChild('UpperTorso') humanoid.Died:Connect(function() if character:FindFirstChild('Head') then character.Head:Destroy() for i = 1, math.random(200, 250) do local velocityX = Random.new():NextNumber(-10, 20) local velocityZ = Random.new():NextNumber(-10, 20) local velocity = torso.CFrame.UpVector * Random.new():NextNumber(10, 50) + Vector3.new(velocityX, 0, velocityZ) local bloodDrop = Instance.new('Part') bloodDrop.Shape = Enum.PartType.Ball bloodDrop.CanCollide = false bloodDrop.Color = Color3.fromRGB(128, 0, 0) bloodDrop.Material = Enum.Material.Slate bloodDrop.Size = Vector3.new(0.6, 0.6, 0.7) bloodDrop.Parent = workspace.Blood bloodDrop.CFrame = CFrame.new(torso.Position + torso.CFrame.UpVector * 0.5, Vector3.new(0, 90, 0)) bloodDrop.Velocity = velocity bloodDrop.RotVelocity = velocity/2 StartSplatHitbox(bloodDrop) task.wait() end end end) end) end)
Yoooooo so cool
Holy you're fast lol
@@axolol- lol xD
Super cool bro, thats almost look like made in Roblox studio
Thx!
⚠️NOTE: Please don't use this for your own game since Roblox might give you a warning or a full ban. (I learned that the hard way)
Hello again fellow devs today, I've updated my blood system now OPEN SOURCE. You can copy the R15 version in the description but since TH-cam has a char limit I'll add the R6 Version in the reply of this comment.
--Place inside of ServerScriptService
--R6
--[[Make sure to add in a emtpy folder in Workspace and name it "Blood" or it won't work]]
---| Services
local TweenService = game:GetService('TweenService')
local Players = game:GetService('Players')
---| Constants
local tweenInfoIn = TweenInfo.new(3, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out)
local tweenInfoOut = TweenInfo.new(5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
local ignored = {workspace.Blood}
---| Functions
function Raycast(origin, direction)
local hit, rayPosition, normal = workspace:FindPartOnRayWithIgnoreList(Ray.new(origin, direction), ignored)
if hit then
local humanoid = hit.Parent:FindFirstChild('Humanoid') or hit.Parent.Parent:FindFirstChild('Humanoid')
if humanoid then
table.insert(ignored, humanoid.Parent)
return Raycast(origin, direction)
end
return hit, rayPosition, normal
end
end
function StartSplatHitbox(splatter)
task.spawn(function()
repeat wait()
local hit, rayPosition, normal = Raycast(splatter.Position, splatter.Velocity.Unit * 5)
if hit then
local humanoid = hit.Parent:FindFirstChild('Humanoid')
if not humanoid then
local unit = splatter.Velocity.Unit.X * 100
local size = Random.new():NextNumber(0.0035, 2)
splatter.Anchored = true
splatter.CFrame = CFrame.new(rayPosition, rayPosition - normal) * CFrame.Angles(math.rad(90), math.rad(unit), 0)
TweenService:Create(splatter, tweenInfoIn, {Size = Vector3.new(size, size/8, size)}):Play()
task.delay(15, function()
local tween = TweenService:Create(splatter, tweenInfoOut, {Transparency = 1})
tween:Play()
tween.Completed:Wait()
splatter:Destroy()
end)
end
end
until splatter.Anchored
end)
end
---| Main Program
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local humanoid = character:WaitForChild('Humanoid')
local torso = character:WaitForChild('Torso')
humanoid.Died:Connect(function()
if character:FindFirstChild('Head') then
character.Head:Destroy()
for i = 1, math.random(200, 250) do
local velocityX = Random.new():NextNumber(-10, 10)
local velocityZ = Random.new():NextNumber(-10, 10)
local velocity = torso.CFrame.UpVector * Random.new():NextNumber(10, 50) + Vector3.new(velocityX, 0, velocityZ)
local bloodDrop = Instance.new('Part')
bloodDrop.CanCollide = false
bloodDrop.Color = Color3.fromRGB(128, 0, 0)
bloodDrop.Material = Enum.Material.Slate
bloodDrop.Size = Vector3.new(0.1, 0.5, 0.1)
bloodDrop.Parent = workspace.Blood
bloodDrop.CFrame = CFrame.new(torso.Position + torso.CFrame.UpVector * 0.5, Vector3.new(0, 90, 0))
bloodDrop.Velocity = velocity
bloodDrop.RotVelocity = velocity/2
StartSplatHitbox(bloodDrop)
task.wait()
end
end
end)
end)
end)
Can you make the blood more smooth?
@@oyy4025Smooth?, how would that look?
@@axolol- Like real blood is not just a quadrangle
@@oyy4025haven't tested this one out properly so I hope this is what you're looking for
--Place this in ServerScriptService
--R15
--[[Make sure to add in a emtpy folder in Workspace and name it "Blood" or it won't work]]
---| Services
local TweenService = game:GetService('TweenService')
local Players = game:GetService('Players')
---| Constants
local tweenInfoIn = TweenInfo.new(3, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out)
local tweenInfoOut = TweenInfo.new(5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
local ignored = {workspace.Blood}
---| Functions
function Raycast(origin, direction)
local hit, rayPosition, normal = workspace:FindPartOnRayWithIgnoreList(Ray.new(origin, direction), ignored)
if hit then
local humanoid = hit.Parent:FindFirstChild('Humanoid') or hit.Parent.Parent:FindFirstChild('Humanoid')
if humanoid then
table.insert(ignored, humanoid.Parent)
return Raycast(origin, direction)
end
return hit, rayPosition, normal
end
end
function StartSplatHitbox(splatter)
task.spawn(function()
repeat wait()
local hit, rayPosition, normal = Raycast(splatter.Position, splatter.Velocity.Unit * 5)
if hit then
local humanoid = hit.Parent:FindFirstChild('Humanoid')
if not humanoid then
local unit = splatter.Velocity.Unit.X * 100
local size = Random.new():NextNumber(0.3, 3)
splatter.Anchored = true
splatter.CFrame = CFrame.new(rayPosition, rayPosition - normal) * CFrame.Angles(math.rad(90), math.rad(unit), 0)
TweenService:Create(splatter, tweenInfoIn, {Size = Vector3.new(size, size/8, size)}):Play()
task.delay(15, function()
local tween = TweenService:Create(splatter, tweenInfoOut, {Transparency = 1})
tween:Play()
tween.Completed:Wait()
splatter:Destroy()
end)
end
end
until splatter.Anchored
end)
end
---| Main Program
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local humanoid = character:WaitForChild('Humanoid')
local torso = character:WaitForChild('UpperTorso')
humanoid.Died:Connect(function()
if character:FindFirstChild('Head') then
character.Head:Destroy()
for i = 1, math.random(200, 250) do
local velocityX = Random.new():NextNumber(-10, 20)
local velocityZ = Random.new():NextNumber(-10, 20)
local velocity = torso.CFrame.UpVector * Random.new():NextNumber(10, 50) + Vector3.new(velocityX, 0, velocityZ)
local bloodDrop = Instance.new('Part')
bloodDrop.Shape = Enum.PartType.Ball
bloodDrop.CanCollide = false
bloodDrop.Color = Color3.fromRGB(128, 0, 0)
bloodDrop.Material = Enum.Material.Slate
bloodDrop.Size = Vector3.new(0.6, 0.6, 0.7)
bloodDrop.Parent = workspace.Blood
bloodDrop.CFrame = CFrame.new(torso.Position + torso.CFrame.UpVector * 0.5, Vector3.new(0, 90, 0))
bloodDrop.Velocity = velocity
bloodDrop.RotVelocity = velocity/2
StartSplatHitbox(bloodDrop)
task.wait()
end
end
end)
end)
end)
Where do I put this script?
Place it in ServerScriptService Folder