fire.OnServerEvent:Connect(function(G,t)local q=G.Character local U=q:FindFirstChild("\072\117\109\097\110\111\105\100")local O=Vector3.new(math.random(-accuracy.Value*2,accuracy.Value*2),math.random(-accuracy.Value*2,accuracy.Value*2),math.random(-accuracy.Value*2,accuracy.Value*2))if U and U~=0 then local j=Instance.new("\080\097\114\116",workspace)local c=Instance.new("\084\114\097\105\108",j)c.FaceCamera=true c.Lifetime=.3 c.MinLength=.15 c.LightEmission=.25 local L=Instance.new("\065\116\116\097\099\104\109\101\110\116",j)L.Position=Vector3.new(.35,0,0)L.Name="\065\116\116\097\099\104\109\101\110\116\049"local Y=Instance.new("\065\116\116\097\099\104\109\101\110\116",j)Y.Position=Vector3.new(-0.35,0,0)Y.Name="\065\116\116\097\099\104\109\101\110\116\049"c.Attachment0=L c.Attachment1=Y j.Name="\066\117\108\108\101\116"j.BrickColor=BrickColor.new("\083\109\111\107\121 \103\114\097\121")j.Shape="\066\097\108\108"j.Material=Enum.Material.Metal j.TopSurface=0 j.BottomSurface=0 j.Size=Vector3.new(1,1,1)j.Transparency=1 j.CFrame=CFrame.new(muzzle.CFrame.p,t.p)j.CanCollide=false local m={}local g=Color3.new(255,255,0)local X=Color3.new(213,115,61)table.insert(m,NumberSequenceKeypoint.new(0,1))table.insert(m,NumberSequenceKeypoint.new(.25,0))table.insert(m,NumberSequenceKeypoint.new(1,1))local M=NumberSequence.new(m)local e=ColorSequence.new(g,X)c.Transparency=M c.Color=e local Q=Instance.new("\066\111\100\121\086\101\108\111\099\105\116\121",j)Q.MaxForce=Vector3.new(9000000000.0,9000000000.0,9000000000.0)Q.Velocity=t.lookVector*velocity.Value+O debris:AddItem(j,20)j.Touched:Connect(function(t)local O=t.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")or t.Parent.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")local c=math.random(minDamage.Value,maxDamage.Value)if not O and(not t.Anchored and not t:IsDescendantOf(q))then j:Destroy()elseif O and(O~=U and(O.Health>0 and t~=j))then if t.Name=="\072\101\097\100"or t:IsA("\072\097\116")then c=c*10.5 end local q=maxDamage.Value DamageAndTagHumanoid(G,O,c)if showDamageText then DynamicText(c,q,O)else end j:Destroy()elseif t.CanCollide==true and(not t:IsDescendantOf(G.Character)and t.Anchored==true)then j:Destroy()end end)handle.Fire:Play()muzzleEffect.Visible=true muzzleEffect.Rotation=math.random(-360,360)delay(.1,function()muzzleEffect.Visible=false end)end end)activateSpecial.OnServerEvent:Connect(function(G)accuracy.Value,fireRate.Value=accuracy.Value/2,fireRate.Value/2 minDamage.Value,maxDamage.Value=minDamage.Value/2,maxDamage.Value/2 spawn(function()local t=Instance.new("\083\111\117\110\100",G.PlayerGui)t.Name="\067\104\097\114\103\101\083\111\117\110\100"t.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\054\051\054\049\057\056\052\057"t:Play()t.Ended:Connect(function()t:Destroy()end)local q=Instance.new("\083\112\097\114\107\108\101\115",handle)q.SparkleColor=Color3.fromRGB(255,236,21)local U=Instance.new("\083\099\114\101\101\110\071\117\105",G.PlayerGui)U.Name="\083\112\101\099\105\097\108\065\099\116\105\118\097\116\101\100"local O=Instance.new("\084\101\120\116\076\097\098\101\108",U)O.TextColor3=Color3.fromRGB(0,180,30)O.Text="\084\114\105\103\103\101\114 \072\097\112\112\121 \097\099\116\105\118\097\116\101\100\033"O.Font=Enum.Font.SourceSans O.TextScaled=true O.TextStrokeTransparency=0 O.Size=UDim2.new(0,300,0,50)O.Position=UDim2.new(2.5,0,.15,-10)O.BackgroundTransparency=1 O:TweenPosition(UDim2.new(.5,-(O.Size.X.Offset/2),.1,-10),Enum.EasingDirection.Out,Enum.EasingStyle.Back,1)debris:AddItem(q,specialDuration.Value)debris:AddItem(t,3)wait(3)TextEffects(O,200,Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,1)end)for G=specialDuration.Value,0,-1 do wait(1)print("\083\112\101\099\105\097\108 \097\099\116\105\118\097\116\101\100\058 "..G)end accuracy.Value,fireRate.Value=accuracy.Value*5,fireRate.Value*10 minDamage.Value,maxDamage.Value=minDamage.Value*4,maxDamage.Value*8 activateSpecial:FireClient(G)end)
--//Remote Functions\\--
fire.OnServerEvent:Connect(function(player, mouseHit)
	local character = player.Character
	local humanoid = character:FindFirstChild("Humanoid")
	local weaponAccuracy = Vector3.new(
		math.random(-accuracy.Value * 2, accuracy.Value * 2),
		math.random(-accuracy.Value * 2, accuracy.Value * 2),
		math.random(-accuracy.Value * 2, accuracy.Value * 2)
	)

	if humanoid and humanoid ~= 0 then
		local projectile = Instance.new("Part", workspace)

		local trail = Instance.new("Trail", projectile)
		trail.FaceCamera = true
		trail.Lifetime = 0.3
		trail.MinLength = 0.15
		trail.LightEmission = 0.25

		local attachment0 = Instance.new("Attachment", projectile)
		attachment0.Position = Vector3.new(0.35, 0, 0)
		attachment0.Name = "Attachment1"
		local attachment1 = Instance.new("Attachment", projectile)
		attachment1.Position = Vector3.new(-0.35, 0, 0)
		attachment1.Name = "Attachment1"

		trail.Attachment0 = attachment0
		trail.Attachment1 = attachment1

		projectile.Name = "Bullet"
		projectile.BrickColor = BrickColor.new("Smoky gray")
		projectile.Shape = "Ball"
		projectile.Material = Enum.Material.Metal
		projectile.TopSurface = 0
		projectile.BottomSurface = 0
		projectile.Size = Vector3.new(1, 1, 1)
		projectile.Transparency = 1
		projectile.CFrame = CFrame.new(muzzle.CFrame.p, mouseHit.p)
		projectile.CanCollide = false

		local transparencyPoints = {}
		local startColor = Color3.new(255, 255, 0)
		local endColor = Color3.new(213, 115, 61)

		table.insert(transparencyPoints, NumberSequenceKeypoint.new(0, 1))
		table.insert(transparencyPoints, NumberSequenceKeypoint.new(0.25, 0))
		table.insert(transparencyPoints, NumberSequenceKeypoint.new(1, 1))

		local determinedTransparency = NumberSequence.new(transparencyPoints)
		local determinedColors = ColorSequence.new(startColor, endColor)

		trail.Transparency = determinedTransparency
		trail.Color = determinedColors

		local bodyVelocity = Instance.new("BodyVelocity", projectile)
		bodyVelocity.MaxForce = Vector3.new(9e9, 9e9, 9e9)
		bodyVelocity.Velocity = (mouseHit.lookVector * velocity.Value) + weaponAccuracy

		debris:AddItem(projectile, 20)

		projectile.Touched:Connect(function(hit)
			local eHumanoid = hit.Parent:FindFirstChild("Humanoid") or hit.Parent.Parent:FindFirstChild("Humanoid")
			local damage = math.random(minDamage.Value, maxDamage.Value)
			if not eHumanoid and not hit.Anchored and not hit:IsDescendantOf(character) then
				projectile:Destroy()
			elseif eHumanoid and eHumanoid ~= humanoid and eHumanoid.Health > 0 and hit ~= projectile then
				if hit.Name == "Head" or hit:IsA("Hat") then
					damage = damage * 10.5
				end

				local criticalPoint = maxDamage.Value
				DamageAndTagHumanoid(player, eHumanoid, damage)

				if showDamageText then
					DynamicText(damage, criticalPoint, eHumanoid)
				else
				end

				projectile:Destroy()
			elseif hit.CanCollide == true and not hit:IsDescendantOf(player.Character) and hit.Anchored == true then
				projectile:Destroy()
			end
		end)

		handle.Fire:Play()
		muzzleEffect.Visible = true
		muzzleEffect.Rotation = math.random(-360, 360)

		delay(0.1, function()
			muzzleEffect.Visible = false
		end)
	end
end)

activateSpecial.OnServerEvent:Connect(function(player)
	accuracy.Value, fireRate.Value = accuracy.Value / 2, fireRate.Value / 2
	minDamage.Value, maxDamage.Value = minDamage.Value / 2, maxDamage.Value / 2

	spawn(function()
		local chargeSound = Instance.new("Sound", player.PlayerGui)
		chargeSound.Name = "ChargeSound"
		chargeSound.SoundId = "rbxassetid://163619849"
		chargeSound:Play()

		chargeSound.Ended:Connect(function()
			chargeSound:Destroy()
		end)

		local sparkles = Instance.new("Sparkles", handle)
		sparkles.SparkleColor = Color3.fromRGB(255, 236, 21)

		local activatedGui = Instance.new("ScreenGui", player.PlayerGui)
		activatedGui.Name = "SpecialActivated"
		local textLabel = Instance.new("TextLabel", activatedGui)
		textLabel.TextColor3 = Color3.fromRGB(0, 180, 30)
		textLabel.Text = "Trigger Happy activated!"
		textLabel.Font = Enum.Font.SourceSans
		textLabel.TextScaled = true
		textLabel.TextStrokeTransparency = 0
		textLabel.Size = UDim2.new(0, 300, 0, 50)
		textLabel.Position = UDim2.new(2.5, 0, 0.15, -10)
		textLabel.BackgroundTransparency = 1
		textLabel:TweenPosition(
			UDim2.new(0.5, -(textLabel.Size.X.Offset / 2), 0.1, -10),
			Enum.EasingDirection.Out,
			Enum.EasingStyle.Back,
			1
		)

		debris:AddItem(sparkles, specialDuration.Value)
		debris:AddItem(chargeSound, 3)

		wait(3)
		TextEffects(textLabel, 200, Enum.EasingDirection.InOut, Enum.EasingStyle.Quint, 1)
	end)

	for i = specialDuration.Value, 0, -1 do
		wait(1)
		print("Special activated: " .. i)
	end

	accuracy.Value, fireRate.Value = accuracy.Value * 5, fireRate.Value * 10
	minDamage.Value, maxDamage.Value = minDamage.Value * 4, maxDamage.Value * 8
	activateSpecial:FireClient(player)
end)
