Mouse.Button1Down:connect(function()if not UserInputService.TouchEnabled then Down=true local Q=false if Equipped and(Enabled and(Down and(not Reloading and(not HoldDown and(Mag>0 and Humanoid.Health>0)))))then Enabled=false if Module.ChargedShotEnabled then if HandleToFire:FindFirstChild("\067\104\097\114\103\101\083\111\117\110\100")then HandleToFire.ChargeSound:Play()end wait(Module.ChargingTime)Q=true end if Module.MinigunEnabled then if HandleToFire:FindFirstChild("\087\105\110\100\085\112")then HandleToFire.WindUp:Play()end wait(Module.DelayBeforeFiring)end while Equipped and(not Reloading and(not HoldDown and((Down or Q)and(Mag>0 and Humanoid.Health>0))))do Q=false Player.PlayerScripts.BulletVisualizerScript.VisualizeM:Fire(nil,HandleToFire,Module.MuzzleFlashEnabled,{Module.MuzzleLightEnabled;Module.LightBrightness,Module.LightColor,Module.LightRange;Module.LightShadows,Module.VisibleTime},script:WaitForChild("\077\117\122\122\108\101\069\102\102\101\099\116"))VisualizeMuzzle:FireServer(HandleToFire,Module.MuzzleFlashEnabled,{Module.MuzzleLightEnabled;Module.LightBrightness;Module.LightColor;Module.LightRange;Module.LightShadows,Module.VisibleTime},script:WaitForChild("\077\117\122\122\108\101\069\102\102\101\099\116"))for Q=1,Module.BurstFireEnabled and Module.BulletPerBurst or 1,1 do spawn(RecoilCamera)EjectShell(HandleToFire)CrosshairModule.crossspring:accelerate(Module.CrossExpansion)for Q=1,Module.ShotgunEnabled and Module.BulletPerShot or 1,1 do Fire(HandleToFire,Mouse)end Mag=Mag-1 ChangeMagAndAmmo:FireServer(Mag,Ammo)UpdateGUI()if Module.BurstFireEnabled then wait(Module.BurstRate)end if Mag<=0 then break end end HandleToFire=(HandleToFire==Handle and Module.DualEnabled)and Handle2 or Handle wait(Module.FireRate)if not Module.Auto then break end end if HandleToFire.FireSound.Playing and HandleToFire.FireSound.Looped then HandleToFire.FireSound:Stop()end if Module.MinigunEnabled then if HandleToFire:FindFirstChild("\087\105\110\100\068\111\119\110")then HandleToFire.WindDown:Play()end wait(Module.DelayAfterFiring)end Enabled=true if Mag<=0 then Reload()end end end end)Mouse.Button1Up:connect(function()if not UserInputService.TouchEnabled then Down=false end end)ChangeMagAndAmmo.OnClientEvent:connect(function(Q,m)Mag=Q Ammo=m UpdateGUI()end)Tool.Equipped:connect(function(Q)GUI.Parent=Player.PlayerGui UpdateGUI()Handle.EquippedSound:Play()if Module.WalkSpeedRedutionEnabled then Humanoid.WalkSpeed=Humanoid.WalkSpeed-Module.WalkSpeedRedution else Humanoid.WalkSpeed=Humanoid.WalkSpeed end CrosshairModule:setcrosssettings(Module.CrossSize,Module.CrossSpeed,Module.CrossDamper)UserInputService.MouseIconEnabled=false if EquippedAnim then EquippedAnim:Play(nil,nil,Module.EquippedAnimationSpeed)end if IdleAnim then IdleAnim:Play(nil,nil,Module.IdleAnimationSpeed)end delay(Module.EquippingTime,function()Equipped=true if Module.AmmoPerMag~=math.huge then GUI.Frame.Visible=true end end)Q.KeyDown:connect(function(Q)if string.lower(Q)=="\114"then Reload()elseif string.lower(Q)=="\101"then if not Reloading and(not HoldDown and Module.HoldDownEnabled)then HoldDown=true IdleAnim:Stop()if HoldDownAnim then HoldDownAnim:Play(nil,nil,Module.HoldDownAnimationSpeed)end if AimDown then(TweeningService:Create(Camera,TweenInfo.new(Module.TweenLengthNAD,Module.EasingStyleNAD,Module.EasingDirectionNAD),{FieldOfView=70})):Play()CrosshairModule:setcrossscale(1)Scoping=false;(game:GetService("\080\108\097\121\101\114\115")).LocalPlayer.CameraMode=Enum.CameraMode.Classic UserInputService.MouseDeltaSensitivity=InitialSensitivity AimDown=false end else HoldDown=false IdleAnim:Play(nil,nil,Module.IdleAnimationSpeed)if HoldDownAnim then HoldDownAnim:Stop()end end end end)Mouse.Button2Down:connect(function()if not Reloading and(not HoldDown and(AimDown==false and(Equipped==true and(Module.IronsightEnabled and(Character.Head.Position-Camera.CoordinateFrame.p).magnitude<=1))))then(TweeningService:Create(Camera,TweenInfo.new(Module.TweenLength,Module.EasingStyle,Module.EasingDirection),{FieldOfView=Module.FieldOfViewIS})):Play()CrosshairModule:setcrossscale(Module.CrossScaleIS);(game:GetService("\080\108\097\121\101\114\115")).LocalPlayer.CameraMode=Enum.CameraMode.LockFirstPerson UserInputService.MouseDeltaSensitivity=InitialSensitivity*Module.MouseSensitiveIS AimDown=true elseif not Reloading and(not HoldDown and(AimDown==false and(Equipped==true and(Module.SniperEnabled and(Character.Head.Position-Camera.CoordinateFrame.p).magnitude<=1))))then(TweeningService:Create(Camera,TweenInfo.new(Module.TweenLength,Module.EasingStyle,Module.EasingDirection),{FieldOfView=Module.FieldOfViewS})):Play()CrosshairModule:setcrossscale(Module.CrossScaleS)local Q=GUI.Scope.ZoomSound:Clone()Q.Parent=Player.PlayerGui Q:Play()Scoping=true;(game:GetService("\080\108\097\121\101\114\115")).LocalPlayer.CameraMode=Enum.CameraMode.LockFirstPerson UserInputService.MouseDeltaSensitivity=InitialSensitivity*Module.MouseSensitiveS AimDown=true;(game:GetService("\068\101\098\114\105\115")):addItem(Q,Q.TimeLength)end end)Mouse.Button2Up:connect(function()if AimDown then(TweeningService:Create(Camera,TweenInfo.new(Module.TweenLengthNAD,Module.EasingStyleNAD,Module.EasingDirectionNAD),{FieldOfView=70})):Play()CrosshairModule:setcrossscale(1)Scoping=false;(game:GetService("\080\108\097\121\101\114\115")).LocalPlayer.CameraMode=Enum.CameraMode.Classic UserInputService.MouseDeltaSensitivity=InitialSensitivity AimDown=false end end)if Module.DualEnabled and not workspace.FilteringEnabled then Handle2.CanCollide=false local Q=Tool.Parent:FindFirstChild("\076\101\102\116 \065\114\109")or Tool.Parent:FindFirstChild("\076\101\102\116\072\097\110\100")local m=Tool.Parent:FindFirstChild("\082\105\103\104\116 \065\114\109")or Tool.Parent:FindFirstChild("\082\105\103\104\116\072\097\110\100")if m then local H=m:WaitForChild("\082\105\103\104\116\071\114\105\112",.01)if H then Grip2=H:Clone()Grip2.Name="\076\101\102\116\071\114\105\112"Grip2.Part0=Q Grip2.Part1=Handle2 Grip2.Parent=Q end end end end)Tool.Unequipped:connect(function()HoldDown=false Equipped=false GUI.Parent=script GUI.Frame.Visible=false if Module.WalkSpeedRedutionEnabled then Humanoid.WalkSpeed=Humanoid.WalkSpeed+Module.WalkSpeedRedution else Humanoid.WalkSpeed=Humanoid.WalkSpeed end UserInputService.MouseIconEnabled=true if IdleAnim then IdleAnim:Stop()end if HoldDownAnim then HoldDownAnim:Stop()end if AimDown then(TweeningService:Create(Camera,TweenInfo.new(Module.TweenLengthNAD,Module.EasingStyleNAD,Module.EasingDirectionNAD),{FieldOfView=70})):Play()CrosshairModule:setcrossscale(1)Scoping=false;(game:GetService("\080\108\097\121\101\114\115")).LocalPlayer.CameraMode=Enum.CameraMode.Classic UserInputService.MouseDeltaSensitivity=InitialSensitivity AimDown=false end if Module.DualEnabled and not workspace.FilteringEnabled then Handle2.CanCollide=true if Grip2 then Grip2:Destroy()end end end)Humanoid.Died:connect(function()HoldDown=false Equipped=false GUI.Parent=script GUI.Frame.Visible=false if Module.WalkSpeedRedutionEnabled then Humanoid.WalkSpeed=Humanoid.WalkSpeed+Module.WalkSpeedRedution else Humanoid.WalkSpeed=Humanoid.WalkSpeed end UserInputService.MouseIconEnabled=true if IdleAnim then IdleAnim:Stop()end if HoldDownAnim then HoldDownAnim:Stop()end if AimDown then(TweeningService:Create(Camera,TweenInfo.new(Module.TweenLengthNAD,Module.EasingStyleNAD,Module.EasingDirectionNAD),{FieldOfView=70})):Play()CrosshairModule:setcrossscale(1)Scoping=false;(game:GetService("\080\108\097\121\101\114\115")).LocalPlayer.CameraMode=Enum.CameraMode.Classic UserInputService.MouseDeltaSensitivity=InitialSensitivity AimDown=false end if Module.DualEnabled and not workspace.FilteringEnabled then Handle2.CanCollide=true if Grip2 then Grip2:Destroy()end end end)local Q=tick();(game:GetService("\082\117\110\083\101\114\118\105\099\101")):BindToRenderStep("\077\111\117\115\101",Enum.RenderPriority.Input.Value,function()local m=tick()-Q Q=tick()if Scoping and(UserInputService.MouseEnabled and UserInputService.KeyboardEnabled)then GUI.Scope.Size=UDim2.new(numLerp(GUI.Scope.Size.X.Scale,1.2,math.min(m*5,1)),36,numLerp(GUI.Scope.Size.Y.Scale,1.2,math.min(m*5,1)),36)GUI.Scope.Position=UDim2.new(0,Mouse.X-GUI.Scope.AbsoluteSize.X/2,0,Mouse.Y-GUI.Scope.AbsoluteSize.Y/2)elseif Scoping and(UserInputService.TouchEnabled and(not UserInputService.MouseEnabled and not UserInputService.KeyboardEnabled))then GUI.Scope.Size=UDim2.new(numLerp(GUI.Scope.Size.X.Scale,1.2,math.min(m*5,1)),36,numLerp(GUI.Scope.Size.Y.Scale,1.2,math.min(m*5,1)),36)GUI.Scope.Position=UDim2.new(0,GUI.Crosshair.AbsolutePosition.X-GUI.Scope.AbsoluteSize.X/2,0,GUI.Crosshair.AbsolutePosition.Y-GUI.Scope.AbsoluteSize.Y/2)else GUI.Scope.Size=UDim2.new(.6,36,.6,36)GUI.Scope.Position=UDim2.new(0,0,0,0)end GUI.Scope.Visible=Scoping if UserInputService.MouseEnabled and UserInputService.KeyboardEnabled then GUI.Crosshair.Position=UDim2.new(0,Mouse.X,0,Mouse.Y)elseif UserInputService.TouchEnabled and(not UserInputService.MouseEnabled and(not UserInputService.KeyboardEnabled and(Character.Head.Position-Camera.CoordinateFrame.p).magnitude>2))then GUI.Crosshair.Position=UDim2.new(.5,0,.4,-50)elseif UserInputService.TouchEnabled and(not UserInputService.MouseEnabled and(not UserInputService.KeyboardEnabled and(Character.Head.Position-Camera.CoordinateFrame.p).magnitude<=2))then GUI.Crosshair.Position=UDim2.new(.5,-1,.5,-19)end end)


Mouse.Button1Down:connect(function()
	if not UserInputService.TouchEnabled then
	Down = true
	local IsChargedShot = false
	if Equipped and Enabled and Down and not Reloading and not HoldDown and Mag > 0 and Humanoid.Health > 0 then
		Enabled = false
		if Module.ChargedShotEnabled then
			if HandleToFire:FindFirstChild("ChargeSound") then HandleToFire.ChargeSound:Play() end
			wait(Module.ChargingTime)
			IsChargedShot = true
		end
		if Module.MinigunEnabled then
			if HandleToFire:FindFirstChild("WindUp") then HandleToFire.WindUp:Play() end
			wait(Module.DelayBeforeFiring)
		end
		while Equipped and not Reloading and not HoldDown and (Down or IsChargedShot) and Mag > 0 and Humanoid.Health > 0 do
			IsChargedShot = false
			
			Player.PlayerScripts.BulletVisualizerScript.VisualizeM:Fire(nil,HandleToFire,
				                                                       Module.MuzzleFlashEnabled,
			                                                          {Module.MuzzleLightEnabled,Module.LightBrightness,Module.LightColor,Module.LightRange,Module.LightShadows,Module.VisibleTime},
			                                                           script:WaitForChild("MuzzleEffect"))
			VisualizeMuzzle:FireServer(HandleToFire,
				            Module.MuzzleFlashEnabled,
						    {Module.MuzzleLightEnabled,Module.LightBrightness,Module.LightColor,Module.LightRange,Module.LightShadows,Module.VisibleTime},
						    script:WaitForChild("MuzzleEffect"))	
			
			for i = 1,(Module.BurstFireEnabled and Module.BulletPerBurst or 1) do
				spawn(RecoilCamera)
				EjectShell(HandleToFire)
				CrosshairModule.crossspring:accelerate(Module.CrossExpansion)		
				for x = 1,(Module.ShotgunEnabled and Module.BulletPerShot or 1) do
					Fire(HandleToFire, Mouse)
				end
				Mag = Mag - 1
				ChangeMagAndAmmo:FireServer(Mag,Ammo)
				UpdateGUI()
				if Module.BurstFireEnabled then wait(Module.BurstRate) end
				if Mag <= 0 then break end
			end
			HandleToFire = (HandleToFire == Handle and Module.DualEnabled) and Handle2 or Handle
			wait(Module.FireRate)
			if not Module.Auto then break end
		end
		if HandleToFire.FireSound.Playing and HandleToFire.FireSound.Looped then HandleToFire.FireSound:Stop() end
		if Module.MinigunEnabled then
			if HandleToFire:FindFirstChild("WindDown") then HandleToFire.WindDown:Play() end
			wait(Module.DelayAfterFiring)
		end
		Enabled = true
		if Mag <= 0 then Reload() end
	end
	end
end)
Mouse.Button1Up:connect(function()
	if not UserInputService.TouchEnabled then
	    Down = false
	end
end)

ChangeMagAndAmmo.OnClientEvent:connect(function(ChangedMag,ChangedAmmo)
	Mag = ChangedMag
	Ammo = ChangedAmmo
	UpdateGUI()
end)
Tool.Equipped:connect(function(TempMouse)
	GUI.Parent = Player.PlayerGui
	UpdateGUI()
	Handle.EquippedSound:Play()
	if Module.WalkSpeedRedutionEnabled then
	Humanoid.WalkSpeed = Humanoid.WalkSpeed - Module.WalkSpeedRedution
	else
	Humanoid.WalkSpeed = Humanoid.WalkSpeed
	end
	CrosshairModule:setcrosssettings(Module.CrossSize, Module.CrossSpeed, Module.CrossDamper)
	UserInputService.MouseIconEnabled = false
	if EquippedAnim then EquippedAnim:Play(nil,nil,Module.EquippedAnimationSpeed) end
	if IdleAnim then IdleAnim:Play(nil,nil,Module.IdleAnimationSpeed) end
	delay(Module.EquippingTime, function()
	    Equipped = true
	    if Module.AmmoPerMag ~= math.huge then GUI.Frame.Visible = true end
	end)
	TempMouse.KeyDown:connect(function(Key)
		if string.lower(Key) == "r" then
			Reload()
		elseif string.lower(Key) == "e" then
			if not Reloading and not HoldDown and Module.HoldDownEnabled then
				HoldDown = true
				IdleAnim:Stop()
                if HoldDownAnim then HoldDownAnim:Play(nil,nil,Module.HoldDownAnimationSpeed) end
    		    if AimDown then 
                    TweeningService:Create(Camera, TweenInfo.new(Module.TweenLengthNAD, Module.EasingStyleNAD, Module.EasingDirectionNAD), {FieldOfView = 70}):Play()
			        CrosshairModule:setcrossscale(1)
			        --[[local GUI = game:GetService("Players").LocalPlayer.PlayerGui:FindFirstChild("ZoomGui")
			        if GUI then GUI:Destroy() end]]
		        	Scoping = false
			        game:GetService("Players").LocalPlayer.CameraMode = Enum.CameraMode.Classic
			        UserInputService.MouseDeltaSensitivity = InitialSensitivity
			        AimDown = false
	        	end
			else
				HoldDown = false
				IdleAnim:Play(nil,nil,Module.IdleAnimationSpeed)
                if HoldDownAnim then HoldDownAnim:Stop() end
			end
		end
	end)
	Mouse.Button2Down:connect(function()
		if not Reloading and not HoldDown and AimDown == false and Equipped == true and Module.IronsightEnabled and (Character.Head.Position - Camera.CoordinateFrame.p).magnitude <= 1 then
			    TweeningService:Create(Camera, TweenInfo.new(Module.TweenLength, Module.EasingStyle, Module.EasingDirection), {FieldOfView = Module.FieldOfViewIS}):Play()
                CrosshairModule:setcrossscale(Module.CrossScaleIS)
				--[[local GUI = game:GetService("Players").LocalPlayer.PlayerGui:FindFirstChild("ZoomGui") or Tool.ZoomGui:Clone()
				GUI.Parent = game:GetService("Players").LocalPlayer.PlayerGui]]
				--Scoping = false
				game:GetService("Players").LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
				UserInputService.MouseDeltaSensitivity = InitialSensitivity * Module.MouseSensitiveIS
				AimDown = true
		elseif not Reloading and not HoldDown and AimDown == false and Equipped == true and Module.SniperEnabled and (Character.Head.Position - Camera.CoordinateFrame.p).magnitude <= 1 then
			    TweeningService:Create(Camera, TweenInfo.new(Module.TweenLength, Module.EasingStyle, Module.EasingDirection), {FieldOfView = Module.FieldOfViewS}):Play()
				CrosshairModule:setcrossscale(Module.CrossScaleS)
				--[[local GUI = game:GetService("Players").LocalPlayer.PlayerGui:FindFirstChild("ZoomGui") or Tool.ZoomGui:Clone()
				GUI.Parent = game:GetService("Players").LocalPlayer.PlayerGui]]
			    local zoomsound = GUI.Scope.ZoomSound:Clone()
	            zoomsound.Parent = Player.PlayerGui
	            zoomsound:Play()
				Scoping = true
				game:GetService("Players").LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
				UserInputService.MouseDeltaSensitivity = InitialSensitivity * Module.MouseSensitiveS
				AimDown = true
				game:GetService("Debris"):addItem(zoomsound,zoomsound.TimeLength)
			end
	end)
	Mouse.Button2Up:connect(function()
		if AimDown then
            TweeningService:Create(Camera, TweenInfo.new(Module.TweenLengthNAD, Module.EasingStyleNAD, Module.EasingDirectionNAD), {FieldOfView = 70}):Play()
			CrosshairModule:setcrossscale(1)
			--[[local GUI = game:GetService("Players").LocalPlayer.PlayerGui:FindFirstChild("ZoomGui")
			if GUI then GUI:Destroy() end]]
			Scoping = false
			game:GetService("Players").LocalPlayer.CameraMode = Enum.CameraMode.Classic
			UserInputService.MouseDeltaSensitivity = InitialSensitivity
			AimDown = false
		end
	end)
	if Module.DualEnabled and not workspace.FilteringEnabled then
		Handle2.CanCollide = false
		local LeftArm = Tool.Parent:FindFirstChild("Left Arm") or Tool.Parent:FindFirstChild("LeftHand")
		local RightArm = Tool.Parent:FindFirstChild("Right Arm") or Tool.Parent:FindFirstChild("RightHand")
		if RightArm then
			local Grip = RightArm:WaitForChild("RightGrip",0.01)
			if Grip then
				Grip2 = Grip:Clone()
				Grip2.Name = "LeftGrip"
				Grip2.Part0 = LeftArm
				Grip2.Part1 = Handle2
				--Grip2.C1 = Grip2.C1:inverse()
				Grip2.Parent = LeftArm
			end
		end
	end
end)
Tool.Unequipped:connect(function()
	HoldDown = false
	Equipped = false
	GUI.Parent = script
	GUI.Frame.Visible = false
	if Module.WalkSpeedRedutionEnabled then
	Humanoid.WalkSpeed = Humanoid.WalkSpeed + Module.WalkSpeedRedution
	else
	Humanoid.WalkSpeed = Humanoid.WalkSpeed
	end
	UserInputService.MouseIconEnabled = true
	if IdleAnim then IdleAnim:Stop() end
	if HoldDownAnim then HoldDownAnim:Stop() end
		if AimDown then
            TweeningService:Create(Camera, TweenInfo.new(Module.TweenLengthNAD, Module.EasingStyleNAD, Module.EasingDirectionNAD), {FieldOfView = 70}):Play()
			CrosshairModule:setcrossscale(1)
			--[[local GUI = game:GetService("Players").LocalPlayer.PlayerGui:FindFirstChild("ZoomGui")
			if GUI then GUI:Destroy() end]]
			Scoping = false
			game:GetService("Players").LocalPlayer.CameraMode = Enum.CameraMode.Classic
			UserInputService.MouseDeltaSensitivity = InitialSensitivity
			AimDown = false
		end
	if Module.DualEnabled and not workspace.FilteringEnabled then
		Handle2.CanCollide = true
		if Grip2 then Grip2:Destroy() end
	end
end)
Humanoid.Died:connect(function()
	HoldDown = false
	Equipped = false
	GUI.Parent = script
	GUI.Frame.Visible = false
	if Module.WalkSpeedRedutionEnabled then
	Humanoid.WalkSpeed = Humanoid.WalkSpeed + Module.WalkSpeedRedution
	else
	Humanoid.WalkSpeed = Humanoid.WalkSpeed
	end
	UserInputService.MouseIconEnabled = true
	if IdleAnim then IdleAnim:Stop() end
	if HoldDownAnim then HoldDownAnim:Stop() end
		if AimDown then
			TweeningService:Create(Camera, TweenInfo.new(Module.TweenLengthNAD, Module.EasingStyleNAD, Module.EasingDirectionNAD), {FieldOfView = 70}):Play()
			CrosshairModule:setcrossscale(1)
			--[[local GUI = game:GetService("Players").LocalPlayer.PlayerGui:FindFirstChild("ZoomGui")
			if GUI then GUI:Destroy() end]]
			Scoping = false
			game:GetService("Players").LocalPlayer.CameraMode = Enum.CameraMode.Classic
			UserInputService.MouseDeltaSensitivity = InitialSensitivity
			AimDown = false
		end
	if Module.DualEnabled and not workspace.FilteringEnabled then
		Handle2.CanCollide = true
		if Grip2 then Grip2:Destroy() end
	end
end)

local lastTick = tick()

game:GetService("RunService"):BindToRenderStep("Mouse", Enum.RenderPriority.Input.Value, function()
	local deltaTime = tick() - lastTick
	lastTick = tick()
	
	if Scoping and UserInputService.MouseEnabled and UserInputService.KeyboardEnabled then --For pc version
		GUI.Scope.Size = UDim2.new(numLerp(GUI.Scope.Size.X.Scale, 1.2, math.min(deltaTime * 5, 1)), 36, numLerp(GUI.Scope.Size.Y.Scale, 1.2, math.min(deltaTime * 5, 1)), 36)
		GUI.Scope.Position = UDim2.new(0, Mouse.X - GUI.Scope.AbsoluteSize.X / 2, 0, Mouse.Y - GUI.Scope.AbsoluteSize.Y / 2)
	elseif Scoping and UserInputService.TouchEnabled and not UserInputService.MouseEnabled and not UserInputService.KeyboardEnabled then --For mobile version, but in first-person view
		GUI.Scope.Size = UDim2.new(numLerp(GUI.Scope.Size.X.Scale, 1.2, math.min(deltaTime * 5, 1)), 36, numLerp(GUI.Scope.Size.Y.Scale, 1.2, math.min(deltaTime * 5, 1)), 36)
	    GUI.Scope.Position = UDim2.new(0, GUI.Crosshair.AbsolutePosition.X - GUI.Scope.AbsoluteSize.X / 2, 0, GUI.Crosshair.AbsolutePosition.Y - GUI.Scope.AbsoluteSize.Y / 2)
	else
		GUI.Scope.Size = UDim2.new(0.6, 36, 0.6, 36)
		GUI.Scope.Position = UDim2.new(0, 0, 0, 0)
	end
	
	GUI.Scope.Visible = Scoping
	
    if UserInputService.MouseEnabled and UserInputService.KeyboardEnabled then --For pc version
	    GUI.Crosshair.Position = UDim2.new(0, Mouse.X, 0, Mouse.Y)    
    elseif UserInputService.TouchEnabled and not UserInputService.MouseEnabled and not UserInputService.KeyboardEnabled and (Character.Head.Position - Camera.CoordinateFrame.p).magnitude > 2 then --For mobile version, but in third-person view
	    GUI.Crosshair.Position = UDim2.new(0.5, 0, 0.4, -50)
    elseif UserInputService.TouchEnabled and not UserInputService.MouseEnabled and not UserInputService.KeyboardEnabled and (Character.Head.Position - Camera.CoordinateFrame.p).magnitude <= 2 then --For mobile version, but in first-person view
	    GUI.Crosshair.Position = UDim2.new(0.5, -1, 0.5, -19)
    end
	
end)
