sp=script.Parent firerate=22 power=50 rate=.033333333333333 debris=game:GetService("\068\101\098\114\105\115")equipped=false check=true function onEquipped(e)equipped=true if e~=nil then if check then e.Icon="\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\092\071\117\110\067\117\114\115\111\114\046\112\110\103"sp.Handle.Transparency=0 else e.Icon="\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\092\071\117\110\087\097\105\116\067\117\114\115\111\114\046\112\110\103"sp.Handle.Transparency=1 end e.Button1Down:connect(function()local Q=sp.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")local o=sp.Parent:FindFirstChild("\084\111\114\115\111")if check and(Q and(Q.Health>0 and o))then check=false e.Icon="\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\092\071\117\110\087\097\105\116\067\117\114\115\111\114\046\112\110\103"sp.Handle.Transparency=1 local Q=sp.Handle:FindFirstChild("\084\104\114\111\119")if Q~=nil then Q:Play()end local H=o:FindFirstChild("\082\105\103\104\116 \083\104\111\117\108\100\101\114")if H~=nil then H.CurrentAngle=2 end local Z=sp.Handle:clone()Z.CanCollide=true Z.Transparency=0 local M=(e.Hit.p-o.Position).unit Z.CFrame=CFrame.new(o.Position,o.Position+M)*CFrame.new(0,0,-5)Z.Velocity=M*power+Vector3.new(0,20,0)local D=script.Script:clone()D.Parent=Z D.Disabled=false local t=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")t.Name="\099\114\101\097\116\111\114"t.Value=game.Players.LocalPlayer t.Parent=Z debris:AddItem(Z,firerate+10)Z.Parent=game.Workspace wait(firerate)sp.Handle.Transparency=0 e.Icon="\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\092\071\117\110\067\117\114\115\111\114\046\112\110\103"check=true end end)end end function onUnequipped()equipped=false sp.Handle.Transparency=0 end sp.Equipped:connect(onEquipped)sp.Unequipped:connect(onUnequipped)



sp=script.Parent


firerate=22
power=50
rate=1/30

debris=game:GetService("Debris")
equipped=false
check=true


function onEquipped(mouse)
	equipped=true
	if mouse~=nil then
		if check then
			mouse.Icon="rbxasset://textures\\GunCursor.png"
			sp.Handle.Transparency=0
		else
			mouse.Icon="rbxasset://textures\\GunWaitCursor.png"
			sp.Handle.Transparency=1
		end
		mouse.Button1Down:connect(function()
			local hu=sp.Parent:FindFirstChild("Humanoid")
			local t=sp.Parent:FindFirstChild("Torso")
			if check and hu and hu.Health>0 and t then
				check=false
				mouse.Icon="rbxasset://textures\\GunWaitCursor.png"
				sp.Handle.Transparency=1
				local sound=sp.Handle:FindFirstChild("Throw")
				if sound~=nil then
					sound:Play()
				end
				local shoulder=t:FindFirstChild("Right Shoulder")
				if shoulder~=nil then
					shoulder.CurrentAngle=2
				end
				local p=sp.Handle:clone()
				p.CanCollide=true
				p.Transparency=0
				local vec=(mouse.Hit.p-t.Position).unit
				p.CFrame=CFrame.new(t.Position,t.Position+vec)*CFrame.new(0,0,-5)
				p.Velocity=(vec*power)+Vector3.new(0,20,0)
				local s=script.Script:clone()
				s.Parent=p
				s.Disabled=false
				local ct=Instance.new("ObjectValue")
				ct.Name="creator"
				ct.Value=game.Players.LocalPlayer
				ct.Parent=p
				debris:AddItem(p,firerate+10)
				p.Parent=game.Workspace
				wait(firerate)
				sp.Handle.Transparency=0
				mouse.Icon="rbxasset://textures\\GunCursor.png"
				check=true
			end
		end)
	end
end

function onUnequipped()
	equipped=false
	sp.Handle.Transparency=0
end

sp.Equipped:connect(onEquipped)
sp.Unequipped:connect(onUnequipped)





