function fire(H)local y=Tool.Parent local N=game.Players:playerFromCharacter(y)local l=script.Parent.Handle:Clone()local b=y.PrimaryPart.Position local v=Tool.Handle:FindFirstChild("\080\101\119\080\101\119")if v==nil then v=Instance.new("\083\111\117\110\100")v.Name="\080\101\119\080\101\119"v.SoundId="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\049\049\057\052\052\051\053\048"v.Parent=Tool.Handle v.Volume=1 end b=b+H*3 l.Position=b l.Size=Vector3.new(1,1,1)l.Velocity=H*60 l.BrickColor=BrickColor.new(1020)l.Shape=0 l.BottomSurface=0 l.TopSurface=0 l.Name="\083\112\097\114\107"l.Reflectance=.5 local P=Instance.new("\066\111\100\121\070\111\114\099\101")P.force=Vector3.new(0,98,0)P.Parent=l local t=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")t.Value=N t.Name="\099\114\101\097\116\111\114"t.Parent=l local I=script.Parent.LaserBlast:clone()I.Disabled=false I.Parent=l l.Parent=game.Workspace v:Play()end function gunUp() end function gunOut() end function isTurbo(H)return H:FindFirstChild("\066\111\108\116\072\101\108\109")~=nil end function onActivated()if not enabled then return end enabled=false local H=Tool.Parent local y=H.Humanoid if y==nil then print("\072\117\109\097\110\111\105\100 \110\111\116 \102\111\117\110\100")return end local N=y.TargetPoint local l=(N-H.Head.Position).unit local b=.1 gunUp()fire(l)wait(b)gunOut()wait(b)enabled=true end function onEquipped()Tool.Handle.EquipSound:play()end script.Parent.Activated:connect(onActivated)script.Parent.Equipped:connect(onEquipped)


function fire(v)

	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)

	local missile = script.Parent.Handle:Clone()
	
	--spark:Clone().Parent = missile

	local spawnPos = vCharacter.PrimaryPart.Position
	
	local PewPew = Tool.Handle:FindFirstChild("PewPew")

	if (PewPew == nil) then
		PewPew = Instance.new("Sound")
		PewPew.Name = "PewPew"
		PewPew.SoundId = "http://www.roblox.com/asset/?id=11944350"
		PewPew.Parent = Tool.Handle
		PewPew.Volume = 1
	end
	

	spawnPos  = spawnPos + (v * 3)

	
	missile.Position = spawnPos
	missile.Size = Vector3.new(1,1,1)
	missile.Velocity = v * 60
	missile.BrickColor = BrickColor.new(1020)
	missile.Shape = 0
	missile.BottomSurface = 0
	missile.TopSurface = 0
	missile.Name = "Spark"
	missile.Reflectance = .5


	local force = Instance.new("BodyForce")
	force.force = Vector3.new(0,98,0)
	force.Parent = missile

	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = vPlayer
	creator_tag.Name = "creator"
	creator_tag.Parent = missile
	
	local new_script = script.Parent.LaserBlast:clone()
	new_script.Disabled = false
	new_script.Parent = missile

	missile.Parent = game.Workspace

	PewPew:Play()

end



function gunUp()
	--Tool.GripForward = Vector3.new(0,.981,-.196)
	--Tool.GripRight = Vector3.new(1,0,0)
	--Tool.GripUp = Vector3.new(0,.196,.981)
end

function gunOut()
	--Tool.GripForward = Vector3.new(0,1,0)
	--Tool.GripRight = Vector3.new(1,0,0)
	--Tool.GripUp = Vector3.new(0,0,1)
end

function isTurbo(character)
	return character:FindFirstChild("BoltHelm") ~= nil
end


function onActivated()
	if not enabled  then
		return
	end

	enabled = false


	local character = Tool.Parent;
	local humanoid = character.Humanoid
	if humanoid == nil then
		print("Humanoid not found")
		return 
	end

	local targetPos = humanoid.TargetPoint
	local lookAt = (targetPos - character.Head.Position).unit

	local reload = .1
	--if (isTurbo(character)) then
	--	reload = .25
	--	print("turbo")
	--end

	gunUp()
	fire(lookAt)
	wait(reload)
	gunOut()
	wait(reload)

	enabled = true

end

function onEquipped()
	Tool.Handle.EquipSound:play()
end

script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)
