
Key Required

local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local LocalPlayer = Players.LocalPlayer
local Character = LocalPlayer.Character
local Backpack = LocalPlayer:FindFirstChildOfClass("Backpack")
local Event = ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("runThereJungle")
local function findGun(Container)
if not Container then
return nil
end
for _, Object in ipairs(Container:GetChildren()) do
if Object:IsA("Tool") and Object:FindFirstChild("GunScript_Local", true) then
return Object
end
end
return nil
end
local function getSettings(Tool)
for _, Object in ipairs(Tool:GetDescendants()) do
if Object:IsA("ModuleScript") then
local Name = string.lower(Object.Name)
if Name == "setting"
or Name == "settings"
or Name == "configuration"
or Name == "config" then
local Success, Data = pcall(require, Object)
if Success and type(Data) == "table" and Data.BaseDamage ~= nil then
return Data
end
end
end
end
return nil
end
local Tool = findGun(Character) or findGun(Backpack)
if not Tool then
return
end
local Settings = getSettings(Tool)
if not Settings then
return
end
local LocalRoot = Character and Character:FindFirstChild("HumanoidRootPart")
local GunVisualEffects = ReplicatedStorage:FindFirstChild("Miscs")
GunVisualEffects = GunVisualEffects and GunVisualEffects:FindFirstChild("GunVisualEffects")
local ToolEffects = GunVisualEffects and GunVisualEffects:FindFirstChild(Tool.Name)
local GoreEffect = ToolEffects and ToolEffects:FindFirstChild("GoreEffect")
for _, TargetPlayer in ipairs(Players:GetPlayers()) do
if TargetPlayer ~= LocalPlayer then
local TargetCharacter = TargetPlayer.Character
local Humanoid = TargetCharacter and TargetCharacter:FindFirstChildOfClass("Humanoid")
local Root = TargetCharacter and (
TargetCharacter:FindFirstChild("HumanoidRootPart")
or TargetCharacter:FindFirstChild("Head")
)
local HitPart = TargetCharacter and (
TargetCharacter:FindFirstChild("Head")
or TargetCharacter:FindFirstChild("UpperTorso")
or TargetCharacter:FindFirstChild("Torso")
or Root
)
if Humanoid and Humanoid.Health > 0 and Root and HitPart then
local Distance = LocalRoot and (LocalRoot.Position - HitPart.Position).Magnitude or 0
local DamageInfo = {
Settings.BaseDamage or 0,
Settings.HeadshotDamageMultiplier or 1,
Settings.HeadshotEnabled == true,
Distance,
Settings.DamageBasedOnDistance == true,
Settings.ZeroDamageDistance or 10000,
Settings.FullDamageDistance or 1000,
Settings.FriendlyFire == true
}
local StatusInfo = {
Settings.Lifesteal or 0,
Settings.Knockback or 0,
Settings.Affliction == true,
Settings.AfflictionName or "",
Settings.AfflictChance or 0
}
local CriticalInfo = {
Settings.CriticalDamageEnabled == true,
Settings.CriticalBaseChance or 0,
Settings.CriticalDamageMultiplier or 1
}
local GoreInfo = {
Settings.GoreEffectEnabled == true,
Settings.GoreSoundIDs or {},
Settings.GoreSoundPitchMin or 1,
Settings.GoreSoundPitchMax or 1,
Settings.GoreSoundVolume or 1,
GoreEffect,
Settings.FullyGibbedLimbChance or 0
}
task.spawn(function()
pcall(
Event.InvokeServer,
Event,
Settings,
Tool,
LocalPlayer,
Humanoid,
Root,
DamageInfo,
StatusInfo,
CriticalInfo,
HitPart,
GoreInfo
)
end)
end
end
endNo comments yet for this script.



