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