local w=Tool:WaitForChild("\069\118\101\110\116\115")local l=w:WaitForChild("\083\104\111\111\116\082\069")local R=w:WaitForChild("\067\114\101\097\116\101\066\117\108\108\101\116")pcall(function()(script.Parent:FindFirstChild("\084\104\117\109\098\110\097\105\108\067\097\109\101\114\097")):Destroy();(script.Parent:WaitForChild("\082\069\065\068 \077\069")):Destroy()if not workspace:FindFirstChild("\066\117\108\108\101\116\070\111\108\100\101\114")then local w=Instance.new("\070\111\108\100\101\114",workspace)w.Name="\066\117\108\108\101\116\115\070\111\108\100\101\114"end end)function TagHumanoid(w,l)if w.Health>0 then while w:FindFirstChild("\099\114\101\097\116\111\114")do(w:FindFirstChild("\099\114\101\097\116\111\114")):Destroy()end local R=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")R.Value=l R.Name="\099\114\101\097\116\111\114"R.Parent=w DebrisService:AddItem(R,1.5)local O=Instance.new("\083\116\114\105\110\103\086\097\108\117\101")O.Value=IconURL O.Name="\105\099\111\110"O.Parent=R end end function CreateBullet(w)if not workspace:FindFirstChild("\066\117\108\108\101\116\070\111\108\100\101\114")then local w=Instance.new("\070\111\108\100\101\114")w.Name="\066\117\108\108\101\116\115"end local l=Instance.new("\080\097\114\116",workspace.BulletsFolder)l.FormFactor=Enum.FormFactor.Custom l.Size=Vector3.new(.1,.1,.1)l.BrickColor=BrickColor.new("\066\108\097\099\107")l.Shape=Enum.PartType.Block l.CanCollide=false l.CFrame=CFrame.new(w)l.Anchored=true l.TopSurface=Enum.SurfaceType.Smooth l.BottomSurface=Enum.SurfaceType.Smooth l.Name="\066\117\108\108\101\116"DebrisService:AddItem(l,2.5)local R=Instance.new("\080\097\114\116")R.CFrame=Tool.Handle.CFrame*CFrame.fromEulerAnglesXYZ(1.5,0,0)R.Size=Vector3.new(1,1,1)R.BrickColor=BrickColor.new(226)R.Parent=game.Workspace.BulletsFolder R.CFrame=script.Parent.Handle.CFrame R.CanCollide=false R.Transparency=0 R.BottomSurface=0 R.TopSurface=0 R.Name="\083\104\101\108\108"R.Velocity=Tool.Handle.CFrame.lookVector*35+Vector3.new(math.random(-10,10),20,math.random(-10,20))R.RotVelocity=Vector3.new(0,200,0)DebrisService:AddItem(R,1)local O=Instance.new("\083\112\101\099\105\097\108\077\101\115\104")O.Scale=Vector3.new(.15,.4,.15)O.Parent=R end l.OnServerEvent:Connect(function(w,l,R)l:TakeDamage(R)TagHumanoid(l,w)end)R.OnServerEvent:Connect(function(w,l)CreateBullet(l)end)

local Events = Tool:WaitForChild("Events")
local ShootEvent = Events:WaitForChild("ShootRE")
local CreateBulletEvent = Events:WaitForChild("CreateBullet")

pcall(function()
	script.Parent:FindFirstChild("ThumbnailCamera"):Destroy()
	script.Parent:WaitForChild("READ ME"):Destroy()
	
	if not workspace:FindFirstChild("BulletFolder") then
	local BulletsFolder = Instance.new("Folder", workspace)
	BulletsFolder.Name = "BulletsFolder"
	end
end)
	
function TagHumanoid(humanoid, player)
	if humanoid.Health > 0 then
	while humanoid:FindFirstChild('creator') do
		humanoid:FindFirstChild('creator'):Destroy()
	end 
	
	local creatorTag = Instance.new("ObjectValue")
	creatorTag.Value = player
	creatorTag.Name = "creator"
	creatorTag.Parent = humanoid
	DebrisService:AddItem(creatorTag, 1.5)

	local weaponIconTag = Instance.new("StringValue")
	weaponIconTag.Value = IconURL
	weaponIconTag.Name = "icon"
		weaponIconTag.Parent = creatorTag
	end
end

function CreateBullet(bulletPos)
	if not workspace:FindFirstChild("BulletFolder") then
		local BulletFolder = Instance.new("Folder")
		BulletFolder.Name = "Bullets"
	end
	local bullet = Instance.new('Part', workspace.BulletsFolder)
	bullet.FormFactor = Enum.FormFactor.Custom
	bullet.Size = Vector3.new(0.1, 0.1, 0.1)
	bullet.BrickColor = BrickColor.new("Black")
	bullet.Shape = Enum.PartType.Block
	bullet.CanCollide = false
	bullet.CFrame = CFrame.new(bulletPos)
	bullet.Anchored = true
	bullet.TopSurface = Enum.SurfaceType.Smooth
	bullet.BottomSurface = Enum.SurfaceType.Smooth
	bullet.Name = 'Bullet'
	DebrisService:AddItem(bullet, 2.5)
	
	local shell = Instance.new("Part")
	shell.CFrame = Tool.Handle.CFrame * CFrame.fromEulerAnglesXYZ(1.5,0,0)
	shell.Size = Vector3.new(1,1,1)
	shell.BrickColor = BrickColor.new(226)
	shell.Parent = game.Workspace.BulletsFolder
	shell.CFrame = script.Parent.Handle.CFrame
	shell.CanCollide = false
	shell.Transparency = 0
	shell.BottomSurface = 0
	shell.TopSurface = 0
	shell.Name = "Shell"
	shell.Velocity = Tool.Handle.CFrame.lookVector * 35 + Vector3.new(math.random(-10,10),20,math.random(-10,20))
	shell.RotVelocity = Vector3.new(0,200,0)
	DebrisService:AddItem(shell, 1)
	
	local shellmesh = Instance.new("SpecialMesh")
	shellmesh.Scale = Vector3.new(.15,.4,.15)
	shellmesh.Parent = shell
end

ShootEvent.OnServerEvent:Connect(function(plr, hum ,damage)
	hum:TakeDamage(damage)
	TagHumanoid(hum, plr)
end)

CreateBulletEvent.OnServerEvent:Connect(function(plr, pos)
	CreateBullet(pos)
end)
