--going back to normal

	wait(0.03)
	weld55.C1 = CFrame.new(-0.35, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), 0.16, math.rad(-90))

	wait(0.03)
	weld55.C1 = CFrame.new(-0.35, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), 0.10, math.rad(-90))

	wait(0.03)
	weld55.C1 = CFrame.new(-0.35, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), 0.05, math.rad(-90))


	wait(0.03)
	weld33.C1 = CFrame.new(-0.75, 0.8, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15),0)

	wait(0.03)
	weld33.C1 = CFrame.new(-0.75, 0.7, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15),0)

	wait(0.03)
	weld33.C1 = CFrame.new(-0.75, 0.6, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15),0)

	wait(0.03)
	weld33.C1 = CFrame.new(-0.75, 0.5, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15),0)



	wait()
	weld33.C1 = CFrame.new(-0.75, 0.5, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15),0)
	weld55.C1 = CFrame.new(-0.35, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
				script.Amo.Value = 7
	Tool.Handle.Reload.Pitch = 1

end

function kickdecider()

	 if script.Amo.Value < 1 then 
		kickreload()

	 elseif script.Amo.Value > 0 then 
		kicknormal()

	end

end


function onEquipped(mouse2)
	mouse2.KeyDown:connect(onkeyDown)
	mouse = mouse2
end
function onkeyDown(key) 
	if key == "r" then
	 if script.Amo.Value == 7 then return
end

	 if script.Amo.Value == 18 then return
end

	if not a then 


	kickreload()

	end
end 
end


function equip1() --reload script thingy, derived from XAXA's script
	print("Equipped")
	if game.Players.LocalPlayer ~= nil then
		local m = Tool.AmmoGUI:clone()
		m.Parent = game.Players.LocalPlayer.PlayerGui
		while m ~= nil do
			wait(0.1)
			m.Counter.TextLabel.Text = "Ammo Left:"..script.Amo.Value
			if script.Amo.Value == 18 then
				m.Counter.TextLabel.Text = "Reloading..."
			wait(2.3)
				wait()

				script.Amo.Value = 7 -- amount of ammunition that can be discharged before reloading
				m.Counter.TextLabel.Text = "Ammo "..script.Amo.Value


			end
		end
	end
end



function unequip1()
	print("Unequipped")
	if game.Players.LocalPlayer ~= nil then
		print("localplayer found")
		local m = game.Players.LocalPlayer.PlayerGui:FindFirstChild("AmmoGUI")
		if m ~= nil then
			m:remove()
		end
	end
end



Tool.Enabled = true

function onActivated()



	if not Tool.Enabled then

		return

	end



	Tool.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



	fire(lookAt)



	Tool.Enabled = true

end




script.Parent.Equipped:connect(onEquipped)
script.Parent.Activated:connect(onActivated)
Tool.Equipped:connect(Equip)
Tool.Unequipped:connect(Unequip)
script.Parent.Equipped:connect(equip1)
script.Parent.Unequipped:connect(unequip1)


