local d=script.Parent.Humanoid local l=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local R=l.Loot local z=100 local function Q()local l=math.random(1,z)if l==100 then local l=(R:GetChildren())[math.random(1,#R:GetChildren())]:Clone()local z=game.Players:GetPlayerFromCharacter(d.Parent)if z then l.Parent=z.Backpack local d=Instance.new("\083\099\114\101\101\110\071\117\105",z.PlayerGui)local R=Instance.new("\073\109\097\103\101\076\097\098\101\108",d)R.Size=UDim2.new(0,200,0,200)R.Position=UDim2.new(.5,-100,.5,-100)R.Image=l.ImageId task.wait(3)d:Destroy()end end end d.Died:Connect(Q)

local humanoid = script.Parent.Humanoid
local replicatedStorage = game:GetService("ReplicatedStorage")
local lootFolder = replicatedStorage.Loot
local dropChance = 100

local function onDeath()
	local randomChance = math.random(1, dropChance)
	if randomChance == 100 then
		local randomItem = lootFolder:GetChildren()[math.random(1, #lootFolder:GetChildren())]:Clone()
		local player = game.Players:GetPlayerFromCharacter(humanoid.Parent)
		if player then
			randomItem.Parent = player.Backpack
			local gui = Instance.new("ScreenGui", player.PlayerGui)
			local imageLabel = Instance.new("ImageLabel", gui)
			imageLabel.Size = UDim2.new(0, 200, 0, 200)
			imageLabel.Position = UDim2.new(0.5, -100, 0.5, -100)
			imageLabel.Image = randomItem.ImageId
			task.wait(3)
			gui:Destroy()
		end
	end
end

humanoid.Died:Connect(onDeath)
