local Rayfield = loadstring(game:HttpGet('https://sirius.
menu/rayfield'))()
-- Create Window
local Window = Rayfield:CreateWindow({
Name = "L4R Test",
Icon = 0,
LoadingTitle = "Test",
LoadingSubtitle = "by Fakespy_00894",
Theme = "Amethyst",
DisableRayfieldPrompts = true,
DisableBuildWarnings = false,
ConfigurationSaving = {
Enabled = true,
FolderName = "L4r",
FileName = "L4rSetting"
}
})
local function TabKillaura()
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local LocalPlayer = Players.LocalPlayer
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
-- ✅ Load Rocket
local Rocket = Character:FindFirstChild("Rocket") or
Character:WaitForChild("Rocket", 5)
if not Rocket then error("❌ Rocket not found.") end
-- ✅ Load Remote
local Remote = ReplicatedStorage:FindFirstChild("Remotes") and
ReplicatedStorage.Remotes:FindFirstChild("InflictTarget")
if not Remote then error("❌ Remote 'InflictTarget' not found") end
-- ✅ Load Weapon Config
local configURL = "https://pastefy.app/SLG9PPul/raw"
getgenv().weaponConfig = loadstring(game:HttpGet(configURL))()
getgenv().KillZLoop = false
-- ✅ Visual Effects
local function getEffect(name)
local ok, val = pcall(function()
return ReplicatedStorage.Miscs.GunVisualEffects.Common:FindFirstChild(name)
end)
return ok and val or nil
end
local Visuals = {
ExplosionEffect = getEffect("ExplosionEffect"),
BloodEffect = getEffect("BloodEffect"),
GoreEffect = getEffect("GoreEffect"),
MuzzleEffect = getEffect("MuzzleEffect"),
HitEffect = getEffect("HitEffect")
}
-- ✅ Dynamic Ground Fallback
local function GetGround()
local grounds = Workspace:FindFirstChild("Grounds")
if not grounds then return nil end
for _, model in ipairs(grounds:GetChildren()) do
if model:IsA("Model") and model:FindFirstChild("Ground") then
return model.Ground
end
end
return nil
end
local Ground = GetGround()
if not Ground then error("❌ No ground found in 'Grounds'") end
-- ✅ Storage
local enemyLookupTable = {}
local scannedModels = {}
-- ✅ UI Setup
local Tab = Window:CreateTab("Z Control", "skull")
-- ✅ UI Elements
local scanParagraph = Tab:CreateParagraph({
Title = "🧟 Z Scan",
Content = "Initializing..."
})
local selectedInfo = Tab:CreateParagraph({
Title = "🎯 Selection Info",
Content = "No enemy selected."
})
local enemyDropdown = Tab:CreateDropdown({
Name = "Select Enemy",
Options = {"None"},
CurrentOption = {"None"},
MultipleOptions = false,
Flag = "EnemyDropdown",
Callback = function(selection)
local name = typeof(selection) == "table" and selection[1] or selection
local clean = name:match("^(.-)%s%[") or name
local data = enemyLookupTable[clean]
if not data then return end
selectedInfo:Set({
Title = "🎯 <font color='#ffeaa7'>" .. clean .. "</font>",
Content = "🧍 Quantity: <font color='#ffffff'>x" .. #data.Objects ..
"</font>\n" ..
"✅ Required: <font color='#55efc4'>" ..
tostring(data.Required) .. "</font>"
})
end
})
-- ✅ Utility
local function refreshDropdown()
local options = {}
local total = 0
for name, data in pairs(enemyLookupTable) do
-- Clean dead entries
for i = #data.Objects, 1, -1 do
local zh = data.Objects[i]:FindFirstChild("ZHumanoid")
if not zh or zh.Health <= 0 or not data.Objects[i].Parent then
table.remove(data.Objects, i)
end
end
if #data.Objects > 0 then
total += #data.Objects
table.insert(options, name .. " [x" .. #data.Objects .. "]")
end
end
enemyDropdown:Refresh(#options > 0 and options or {"None"})
scanParagraph:Set({
Title = "🧟 Z Scan Updated",
Content = "💀 Enemies Active: <font color='#ffffff'>" .. total .. "</font>"
})
end
-- ✅ Register Model
local function isZModel(model)
return model:IsA("Model") and model:FindFirstChild("ZHumanoid") and
model:FindFirstChild("HumanoidRootPart")
end
local function registerEnemy(model)
if scannedModels[model] or not isZModel(model) then return end
local name = model.Name
enemyLookupTable[name] = enemyLookupTable[name] or {
DisplayName = name,
Objects = {},
Required = true
}
table.insert(enemyLookupTable[name].Objects, model)
scannedModels[model] = true
refreshDropdown()
end
-- ✅ Death Cleanup
local function monitorDeath(model)
local zh = model:FindFirstChild("ZHumanoid")
if not zh then return end
zh:GetPropertyChangedSignal("Health"):Connect(function()
if zh.Health <= 0 then refreshDropdown() end
end)
end
-- ✅ Initial Scan
for _, obj in ipairs(Workspace:GetDescendants()) do
if isZModel(obj) then
registerEnemy(obj)
monitorDeath(obj)
end
end
Workspace.DescendantAdded:Connect(function(obj)
task.defer(function()
if isZModel(obj) then
registerEnemy(obj)
monitorDeath(obj)
end
end)
end)
-- ✅ Manual Refresh
Tab:CreateButton({
Name = "🔁 Rebuild List",
Callback = refreshDropdown
})
-- ✅ Manual Kill
Tab:CreateButton({
Name = "💥 Kill All ZHumanoids",
Callback = function()
for _, data in pairs(enemyLookupTable) do
if data.Required then
for _, model in ipairs(data.Objects) do
local zh = model:FindFirstChild("ZHumanoid")
local hrp = model:FindFirstChild("HumanoidRootPart")
if zh and hrp and zh.Health > 0 then
local args = {
"Gun", Rocket, getgenv().weaponConfig, zh, hrp, Ground,
hrp.Position,
{
ChargeLevel = 0,
ExplosionEffectFolder = Visuals.ExplosionEffect,
BloodEffectFolder = Visuals.BloodEffect,
GoreEffect = Visuals.GoreEffect,
MuzzleFolder = Visuals.MuzzleEffect,
HitEffectFolder = Visuals.HitEffect
},
5.0,
hrp.Position
}
pcall(function()
Remote:InvokeServer(unpack(args))
end)
end
end
end
end
end
})
-- ✅ Loop Kill Toggle
Tab:CreateToggle({
Name = "♻️ Loop Kill (Auto)",
CurrentValue = false,
Flag = "KillLoopZHumanoid",
Callback = function(state)
getgenv().KillZLoop = state
if not state then return end
task.spawn(function()
while getgenv().KillZLoop do
task.wait(1)
for _, npc in ipairs(workspace:GetDescendants()) do
local zh = npc:FindFirstChild("ZHumanoid")
local hrp = npc:FindFirstChild("HumanoidRootPart")
if zh and hrp and zh.Health > 0 then
local args = {
"Gun",
Rocket,
getgenv().weaponConfig,
zh,
hrp,
Ground,
Vector3.new(2047, 63, 240),
{
ChargeLevel = 0,
ExplosionEffectFolder = Visuals.ExplosionEffect,
BloodEffectFolder = Visuals.BloodEffect,
GoreEffect = Visuals.GoreEffect,
MuzzleFolder = Visuals.MuzzleEffect,
HitEffectFolder = Visuals.HitEffect
},
5.0411,
Vector3.new(-38.7496, 0, -12.1443)
}
pcall(function()
Remote:InvokeServer(unpack(args))
end)
end
end
end
end)
end
})
end
end
local function TabStore()
-- ✅ Services
local Workspace = game:GetService("Workspace")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local StoreRemote =
ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("StoreItem")
-- ✅ Config
local selectedLocation = "Workspace"
local selectedMode = "Store Only"
local selectedItemData = nil
local itemLookupTable = {}
local Tab = Window:CreateTab("Storage", "box")
-- ✅ Section
Tab:CreateSection("Item Storage Controls")
-- ✅ Store Mode Dropdown
Tab:CreateDropdown({
Name = "Store Mode",
Options = {"Store Only", "Store & Drop"},
CurrentOption = "Store Only",
Flag = "ModeFlag",
Callback = function(val)
selectedMode = val
end
})
-- ✅ Location Dropdown
Tab:CreateDropdown({
Name = "Search Location",
Options = {"Workspace", "Workspace.Loots"},
CurrentOption = "Workspace",
Flag = "LocationFlag",
Callback = function(val)
selectedLocation = val
end
})
-- ✅ Paragraphs
local itemInfoParagraph = Tab:CreateParagraph({
Title = "📦 Item Info",
Content = "Select an item to view its details."
})
local itemLogParagraph = Tab:CreateParagraph({
Title = "🗂 Item Log",
Content = "No item selected."
})
-- ✅ Item Dropdown
local itemDropdown = Tab:CreateDropdown({
Name = "Select Item",
Options = {},
CurrentOption = "",
MultipleOptions = false,
Flag = "ItemFlag",
Callback = function(option)
local value = typeof(option) == "table" and option[1] or option
local cleanName = typeof(value) == "string" and value:match("^(.-)%s%[") or
value
for key, data in pairs(itemLookupTable) do
if data.DisplayName == cleanName then
selectedItemData = data
itemInfoParagraph:Set({
Title = "🧾 <font color='#a6dcef'>" .. data.DisplayName ..
"</font> <font color='#f4f4f4'>[x" .. tostring(data.Count) .. "]</font>",
Content = "📦 <font color='#ccc'>Available:</font> <font
color='#ffffff'>[x" .. tostring(data.Count) .. "]</font>\n" ..
"📝 <font color='#ccc'>Item Name:</font> <font
color='#ffffff'>" .. data.DisplayName .. "</font>\n" ..
"✅ <font color='#ccc'>Matches Required:</font> " ..
(data.MatchesRequired and "<font
color='#6efc74'>Yes</font>" or "<font color='#ff6f61'>No</font>")
})
itemLogParagraph:Set({
Title = "🗂 <font color='#9be7ff'>Item Log</font>",
Content = "🎯 <font color='#cccccc'>Selected:</font> <font
color='#ffffff'>" .. data.DisplayName .. " [x" .. tostring(data.Count) ..
"]</font>\n" ..
"⚙️ <font color='#cccccc'>Eligible:</font> " ..
(data.MatchesRequired and "<font
color='#90ee90'>true</font>" or "<font color='#ffaaaa'>false</font>")
})
break
end
end
end
})
-- ✅ Scan Button
Tab:CreateButton({
Name = "🔍 Scan For Items",
Callback = function()
itemLookupTable = {}
local location = selectedLocation == "Workspace.Loots"
and (Workspace:FindFirstChild("Loots") or
Workspace:WaitForChild("Loots", 2))
or Workspace
if not location then
itemDropdown:Refresh({})
itemInfoParagraph:Set({ Title = "Error", Content = "Selected location
not found!" })
itemLogParagraph:Set({ Title = "Item Log", Content = "No item
found." })
return
end
for _, obj in ipairs(location:GetDescendants()) do
if obj:IsA("Model") or obj:IsA("Tool") then
local hasRequiredFlag =
obj:FindFirstChild("IsFuelable") or
obj:FindFirstChild("IsGrabbed") or
obj:FindFirstChild("IsSellable")
if hasRequiredFlag then
local name = obj.Name
local key = string.lower(name)
itemLookupTable[key] = itemLookupTable[key] or {
DisplayName = name,
Count = 0,
MatchesRequired = true,
Objects = {}
}
itemLookupTable[key].Count += 1
table.insert(itemLookupTable[key].Objects, obj)
end
end
end
local itemsList = {}
for _, data in pairs(itemLookupTable) do
table.insert(itemsList, data.DisplayName .. " [x" .. data.Count .. "]")
end
if #itemsList == 0 then
itemDropdown:Refresh({"No items found"})
itemInfoParagraph:Set({ Title = "No Results", Content = "No matching
items in selected location." })
itemLogParagraph:Set({ Title = "Item Log", Content = "No matches found
in location." })
else
itemDropdown:Refresh(itemsList)
itemInfoParagraph:Set({ Title = "Scan Complete", Content = "Select an
item to view details." })
itemLogParagraph:Set({ Title = "Scan Log", Content = "Total found: " ..
tostring(#itemsList) })
end
end
})
-- ✅ Store Execution
Tab:CreateButton({
Name = "📦 Execute Store",
Callback = function()
if not selectedItemData then
Rayfield:Notify({
Title = "⚠️ No Item Selected",
Content = "Please scan and select an item before executing.",
Duration = 5
})
return
end
local stored = 0
for _, obj in ipairs(selectedItemData.Objects) do
if obj and obj.Parent then
local args = { obj, true }
StoreRemote:FireServer(unpack(args))
stored += 1
task.wait(0.05)
end
end
Rayfield:Notify({
Title = "✅ Store Complete",
Content = "Stored " .. stored .. " " .. selectedItemData.DisplayName ..
"(s)",
Duration = 4
})
end
})
end
end
TabStore()
TabKillaura()
Rayfield:LoadConfiguration()