Roblox/luau_corpus huggingface dataset:
--[[
	Subscribe to a binding's change signal. This is only accessible by Roact.
]]
function Binding.subscribe(binding, handler)
	local internalData = binding[InternalData]

	--[[
		If this binding is mapped to another and does not have any subscribers,
		we need to create a subscription to our source binding so that updates
		get passed along to us
	]]
	if internalData.upstreamBinding ~= nil and internalData.subscriberCount == 0 then
		internalData.upstreamDisconnect = Binding.subscribe(internalData.upstreamBinding, function(value)
			Binding.update(binding, value)
		end)
	end

	local disconnect = internalData.changeSignal:subscribe(handler)
	internalData.subscriberCount = internalData.subscriberCount + 1

	local disconnected = false

	--[[
		We wrap the disconnect function so that we can manage our subscriptions
		when the disconnect is triggered
	]]
	return function()
		if disconnected then
			return
		end

		disconnected = true
		disconnect()
		internalData.subscriberCount = internalData.subscriberCount - 1

		--[[
			If our subscribers count drops to 0, we can safely unsubscribe from
			our source binding
		]]
		if internalData.subscriberCount == 0 and internalData.upstreamDisconnect ~= nil then
			internalData.upstreamDisconnect()
			internalData.upstreamDisconnect = nil
		end
	end
end
-- Prompts --
local ProximityPrompt = DoorLogo.ProximityPrompt
--[[**
	ensures Roblox EnumItem type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.EnumItem = t.typeof("EnumItem")
-- Switch to the next (or previous) view:
function CamLock.SwitchView(reverse)
	if (tweening) then return end
	tweenFromView = currentView
	currentViewIndex = (currentViewIndex + (reverse and -1 or 1))
	currentViewIndex = (currentViewIndex < 1 and #views or currentViewIndex > #views and 1 or currentViewIndex)
	currentView = views[currentViewIndex]
	if (tweenFromView ~= currentView) then
		tweening = true
		tweenStart = tick()
		CamLock.Update = UpdateWithTween
	end
end
-- IgnoreBodyParts: If true, characters will be completely converted regardless of what body parts they may have equipped.
local IgnoreBodyParts = false
-- Make Connection strict
setmetatable(Connection, {
	__index = function(_, key)
		error(("Attempt to get Connection::%s (not a valid member)"):format(tostring(key)), 2)
	end,
	__newindex = function(_, key, _)
		error(("Attempt to set Connection::%s (not a valid member)"):format(tostring(key)), 2)
	end
})
--Time to spend with the GUI completely faded in:
BlackoutTime = 0.5
-------------------------
 
mouse.KeyDown:connect(function (key)
    key = string.lower(key)
				if key == "v" then --Camera controls
				        if cam == ("car") then
							Camera.CameraSubject = player.Character.Humanoid
							Camera.CameraType = ("Custom")
							cam = ("freeplr")
							Camera.FieldOfView = 70
							limitButton.Text = "Free Camera"
							wait(3)
							limitButton.Text = ""
						elseif cam == ("freeplr") then
							Camera.CameraSubject = player.Character.Humanoid
							Camera.CameraType = ("Attach")
							cam = ("lockplr")
							Camera.FieldOfView = 45
							limitButton.Text = "FPV Camera"
							wait(3)
							limitButton.Text = ""
				        elseif cam == ("lockplr") then
							Camera.CameraSubject = carSeat
							Camera.CameraType = ("Custom")
							cam = ("car")
							Camera.FieldOfView = 70
							limitButton.Text = "Standard Camera"
							wait(3)
							limitButton.Text = ""
				        end
			end
		end)
-- Decompiled with the Synapse X Luau decompiler.

open = true;
script.Parent.MouseButton1Click:Connect(function()
	if open == true then
		open = false;
		script.Parent.Parent.Frame.Visible = false;
		return;
	end;
	if open == false then
		open = true;
		script.Parent.Parent.Frame.Visible = true;
	end;
end);
--\\Main//--
for Number, Instance in pairs(game.Workspace:GetChildren()) do
	if Instance:IsA("Part") and Instance.Name == "brick" then
		Instance.Touched:Connect(function(Hit)
			local Player = PlayerService:GetPlayerFromCharacter(Hit.Parent)
			if not Player then return end
			Player.Character:FindFirstChild("Humanoid").Sit = true
		end)
	end
end
--				debug.profileend()
				return BLACK_COLOR3
			end

			local U = ((1 - DeltaTime) * U0 + DeltaTime * U1) / L + 0.19783
			local V = ((1 - DeltaTime) * V0 + DeltaTime * V1) / L + 0.46832

			local Y = (L + 16) / 116
			Y = Y > 0.206896551724137931 and Y * Y * Y or 0.12841854934601665 * Y - 0.01771290335807126
			local X = Y * U / V
			local Z = Y * ((3 - 0.75 * U) / V - 5)

			local R =  7.2914074 * X - 1.5372080 * Y - 0.4986286 * Z
			local G = -2.1800940 * X + 1.8757561 * Y + 0.0415175 * Z
			local B =  0.1253477 * X - 0.2040211 * Y + 1.0569959 * Z

			if R < 0 and R < G and R < B then
				R, G, B = 0, G - R, B - R
			elseif G < 0 and G < B then
				R, G, B = R - G, 0, B - G
			elseif B < 0 then
				R, G, B = R - B, G - B, 0
			end

			R = R < 3.1306684425E-3 and 12.92 * R or 1.055 * R ^ (1 / 2.4) - 0.055
			G = G < 3.1306684425E-3 and 12.92 * G or 1.055 * G ^ (1 / 2.4) - 0.055
			B = B < 3.1306684425E-3 and 12.92 * B or 1.055 * B ^ (1 / 2.4) - 0.055

			local ReturnColor = Color3.new(
				R > 1 and 1 or R < 0 and 0 or R,
				G > 1 and 1 or G < 0 and 0 or G,
				B > 1 and 1 or B < 0 and 0 or B
			)
--Variables
bux1 = script.Parent["Donation 2"].Bux25
bux2 = script.Parent["Donation 2"].Bux100
bux3 = script.Parent["Donation 2"].Bux500
tix1 = script.Parent.Donation1.Tix50
tix2 = script.Parent.Donation1.Tix100
tix3 = script.Parent.Donation1.Tix500
------------------------------------------------------------------
local Acceleration = Customize.Acceleration
local MaxSpeed = Customize.MaxSpeed
local StallSpeed = Customize.StallSpeed
local TurnSpeed = Customize.TurnSpeed
local ThrottleInc = Customize.ThrottleInc
local MaxBank = Customize.MaxBank
local CameraType = Customize.CameraType
local CamLock = Customize.CamLock
local Ejectable = Customize.Ejectable
local PlaneName = Customize.PlaneName
local Targetable = Customize.Targetable
local FlightControls = Customize.FlightControls
local WeaponControls = Customize.WeaponControls
local TargetControls = Customize.TargetControls
local WeaponsValue = Customize.Weapons
local ReloadTimes = Customize.ReloadTimes
local SimulationMode = Customize.SimulationMode
local AltRestrict = Customize.AltitudeRestrict
local MaxAltitude = AltRestrict.MaxAltitude
local MinAltitude = AltRestrict.MinAltitude
-- / Round Assets / --
local RoundAssets = game.ServerStorage.RoundAssets

local Tools = RoundAssets.Tools
--//Main Function
ProximityPrompt.Triggered:Connect(function(Player)
	local Character = Player.Character
	local Torso = Character:WaitForChild("Torso")
	ProximityPrompt.ActionText = "Wear"
	if Character:FindFirstChild(script.Parent.Parent.Name) then
		Character[script.Parent.Parent.Name]:Destroy()
	else
		local NewArmor = Armor:Clone()
		NewArmor:SetPrimaryPartCFrame(Torso.CFrame)
		NewArmor.PrimaryPart:Destroy()
		ProximityPrompt.ActionText = "Take off"
		for _, part in pairs (NewArmor:GetChildren()) do
			if part:IsA("BasePart") then
				WeldParts(Torso, part)
				part.CanCollide = false
				part.Anchored = false
			end
		end
		NewArmor.Parent = Character
	end
end)
-- 5/27/2018 --
sp = script.Parent
run = game:GetService("RunService")
run.RenderStepped:Connect(function()
	sp.Rotation = sp.Rotation + 1
end)
-------------------------------
--Init
-------------------------------
CreateMotor()
WeldToObject(PARENTMODEL.MovingParts:GetChildren(), PARENTMODEL.Motors.MotorBlock1)
-- ROBLOX deviation: upstream type is incorrect, as returned function takes a parameter in reconcileChildrenIterator()
exports.getIteratorFn = function(maybeIterable): nil | (...any) -> Iterator<any>
	if typeof(maybeIterable) == "table" then
		-- ROBLOX deviation: Upstream understands that portal objects are not
		-- iterable; we need to check explicitly
		if maybeIterable["$$typeof"] == exports.REACT_PORTAL_TYPE then
			return nil
		end
		return function()
			local currentKey: any, currentValue: any
			return {
				next = function()
					currentKey, currentValue = next(maybeIterable, currentKey)
					return {
						done = currentValue == nil,
						-- deviation: To support Roact's table-keys-as-stable-keys feature,
						-- we need the iterator to return the key as well
						key = currentKey,
						value = currentValue,
					}
				end,
			}
		end
	end

	return nil
end

return exports
--[=[
	Observes the children with a specific name.

	@param parent Instance
	@param className string
	@param name string
	@return Observable<Brio<Instance>>
]=]
function RxInstanceUtils.observeChildrenOfNameBrio(parent, className, name)
	assert(typeof(parent) == "Instance", "Bad parent")
	assert(type(className) == "string", "Bad className")
	assert(type(name) == "string", "Bad name")

	return Observable.new(function(sub)
		local topMaid = Maid.new()

		local function handleChild(child)
			if not child:IsA(className) then
				return
			end

			local maid = Maid.new()

			local function handleNameChanged()
				if child.Name == name then
					local brio = Brio.new(child)
					maid._brio = brio

					sub:Fire(brio)
				else
					maid._brio = nil
				end
			end

			maid:GiveTask(child:GetPropertyChangedSignal("Name"):Connect(handleNameChanged))
			handleNameChanged()

			topMaid[child] = maid
		end

		topMaid:GiveTask(parent.ChildAdded:Connect(handleChild))
		topMaid:GiveTask(parent.ChildRemoved:Connect(function(child)
			topMaid[child] = nil
		end))

		for _, child in pairs(parent:GetChildren()) do
			handleChild(child)
		end

		return topMaid
	end)
end
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
-- Local Variables

local Tool = script.Parent
local Handle = Tool.Handle
local MouseEvent = Tool.MouseEvent
local FirePointObject = Handle.GunFirePoint
local FastCast = require(Tool.FastCastRedux)
local FireSound = Handle.Fire
local ImpactParticle = Handle.ImpactParticle
local Debris = game:GetService("Debris")
local Players = game:GetService("Players")
local table = require(Tool.FastCastRedux.Table)
local PartCacheModule = require(Tool.PartCache)
local CanFire = true								-- Used for a cooldown.

local RNG = Random.new()							-- Set up a randomizer.
local TAU = math.pi * 2							-- Set up mathematical constant Tau (pi * 2)
FastCast.DebugLogging = DEBUG
FastCast.VisualizeCasts = DEBUG
--[[Engine]]

	--		[TORQUE CURVE VISUAL]
	--		https://www.desmos.com/calculator/nap6stpjqf
	--		Use sliders to manipulate values
	--		Edit everything as if your car is NATURALLY aspirated, or as if it lacks a turbo.
	
	Tune.Horsepower		= 450
	Tune.IdleRPM		= 600
	Tune.PeakRPM		= 7200
	Tune.Redline		= 9000
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 3.2
	Tune.CurveMult		= 1.2
	
	Tune.InclineComp	= 4.7		-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Turbo Settings
	Tune.Aspiration		= "Double"												--[[
	[Aspiration]
		"Natural"		: N/A, Naturally aspirated engine
		"Single"		: Single turbocharger
		"Double"		: Twin turbocharger											]]
	
	Tune.Boost			= 8		--Max PSI per turbo (If you have two turbos and this is 15, the PSI will be 30)
	Tune.TurboSize		= 25		--Turbo size; the bigger it is, the more lag it has.
	Tune.CompressRatio	= 9			--The compression ratio (look it up)
	
	--Misc
	Tune.RevAccel		= 155		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 35		-- RPM decay when clutch is off
	Tune.RevBounce		= 400		-- RPM kickback from redline
	Tune.IdleThrottle	= 5			-- Percent throttle at idle
	Tune.ClutchTol		= 5			-- Clutch engagement threshold (higher = faster response, lower = more stable RPM)
--------LEFT DOOR --------

game.Workspace.doorleft.l11.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l22.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l33.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l41.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l52.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l63.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l71.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)

game.Workspace.doorleft.l43.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l61.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l53.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l72.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l62.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l51.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l21.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l31.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l12.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l13.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l32.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l23.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l42.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)

game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
--DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!
local hitPart = script.Parent
local debounce = true
local tool = game.ServerStorage.Milk
--==================================================

local function Enablerx2(Hit)
	if Enabled and Hit and Hit.Parent then
		local AmmoRefilled = false
		local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
		if Player then
			for _, GunName in pairs(GunToRefillAmmo) do
				local Gun = Player.Backpack:FindFirstChild(GunName) or Player.Character:FindFirstChild(GunName)
				if Gun then
					local GunScript = Gun:FindFirstChild("GunScript_Server")
					local Module = Gun:FindFirstChild("Setting")
					if GunScript and Module then
						local Module = require(Module)
						if GunScript.Ammo.Value < Module.MaxAmmo and Module.LimitedAmmoEnabled then
							Enabled = false
							AmmoRefilled = true
							local ChangedAmmo = (Ammo == math.huge or GunScript.Ammo.Value+Ammo >= Module.Ammo) and Module.Ammo or (GunScript.Ammo.Value + Ammo)
							GunScript.Ammo.Value = ChangedAmmo
							GunScript.ChangeMagAndAmmo:FireClient(Player,Module.AmmoPerMag,ChangedAmmo)
						end
					end
				end
			end
		end
		if AmmoRefilled then AmmoBox:Destroy() end
	end
end
AmmoBox.Touched:connect(Enablerx2)
-- type TestFn = (done?: Global.DoneFn) => Promise<any> | void | undefined;
type GlobalCallback = (testName: string, fn: Global_ConcurrentTestFn, timeout: number?) -> ()
--// F key, HornOn
mouse.KeyDown:connect(function(key)
	if key=="h" then 
		veh.Lightbar.middle.Airhorn:Play()
		veh.Lightbar.middle.Wail.Volume = 1
		veh.Lightbar.middle.Yelp.Volume = 1
		veh.Lightbar.middle.Priority.Volume = 1
		veh.Lightbar.HORN.Transparency = 0
	end
end)
----- Locales -----

local Button = script.Parent
local Player = game:GetService("Players").LocalPlayer
local Inventory = Player.Inventory
local QuantityText = Button.Variables.QuantityText
local LocalInformationText = script.Parent.SkinData.Description
local LocalCaseInformationText = script.Parent.SkinData.Case
local Image = Button.UI.SkinImage
--// Damage Settings	
	BaseDamage = 49; -- Torso Damage
	LimbDamage = 42; -- Arms and Legs
	ArmorDamage = 42; -- How much damage is dealt against armor (Name the armor "Armor")
	HeadDamage = 73; -- If you set this to 100, there's a chance the player won't die because of the heal script
-- Now with exciting TeamColors HACK!

function waitForChild(parent, childName)
	local child = parent:findFirstChild(childName)
	if child then return child end
	while true do
		child = parent.ChildAdded:wait()
		if child.Name==childName then return child end
	end
end
--OMGHAX mouseclick
local last_click = 0
script.Parent.MouseClick.Changed:connect(function()
	if time() - last_click < 0.3 then
		anim = "homerun"
		last_click = time()
		HomeRun()
	else
		anim = "norm"
		last_click = time()
		Whack()
	end
end)
--[[Susupension]]
	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
	
	--Front Suspension
	Tune.FSusDamping	= 300		-- Spring Dampening
	Tune.FSusStiffness	= 4000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)
	
	Tune.FSusLength		= 2.5			-- Suspension length (in studs)
	Tune.FPreCompress	= .5		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .5		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= 2		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 8		-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.5		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward
	
	--Rear Suspension
	Tune.RSusDamping	= 300		-- Spring Dampening
	Tune.RSusStiffness	= 4000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)

	Tune.RSusLength		= 2.5			-- Suspension length (in studs)
	Tune.RPreCompress	= .5		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .5		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= 2		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.RWsBoneLen		= 8			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.5		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics	
	Tune.SusVisible		= false			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Bright red"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
--edit the below function to execute code when this response is chosen OR this prompt is shown
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder)
	local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
	plrData.Money.Gold.Value = plrData.Money.Gold.Value - 40 -- TODO track sale for dissertation
	plrData.Classes.Base.Misc.MercenaryCarry.Value = true
end
-- Listen for chat messages
game:GetService("Chat").Chatted:Connect(function(chat, message)
	if message:lower() == "respawn" then
		local player = getPlayerFromChat(chat)
		if player then
			player:LoadCharacter() -- Respawn the player
		end
	end
end)
print("Hello world!")
-- Constants
local Local_Player = PlayersService.LocalPlayer
local Neck_CFrame = CFrame.new( Vector3.new(0, 0.8,0) )
local Waist_CFrame = CFrame.new( Vector3.new(0, 0.2, 0) )
local Left_Upper_Arm_CFrame = CFrame.new( Vector3.new(-0.6, 0.8, 0) )
local Right_Upper_Arm_CFrame = CFrame.new( Vector3.new(0.6, 0.8, 0) )
--edit the function below to return true when you want this response/prompt to be valid
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder)
	local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
	if plrData.Money.Gold.Value > 10 then
		return true
	end
	return false
end
--Crosshair module
local crosshair = {}

crosshair.crossscale = Physics.spring.new(0)	
crosshair.crossscale.s = 10	
crosshair.crossscale.d = 0.8
crosshair.crossscale.t = 1
crosshair.crossspring = Physics.spring.new(0)
crosshair.crossspring.s = 12
crosshair.crossspring.d = 0.65

local function updatecross()
	local size = crosshair.crossspring.p*4*crosshair.crossscale.p --*(char.speed/14*(1-0.8)*2+0.8)*(char.sprint+1)/2
	for i = 1, 4 do
		CrossParts[i].BackgroundTransparency = 1-size/20
	end
	CrossParts[1].Position = UDim2.new(0,size,0,0)
	CrossParts[2].Position = UDim2.new(0,-size-7,0,0)
	CrossParts[3].Position = UDim2.new(0,0,0,size)
	CrossParts[4].Position = UDim2.new(0,0,0,-size-7)
end

function crosshair:setcrossscale(scale)
	crosshair.crossscale.t = scale
end	
	
function crosshair:setcrosssize(size)
	crosshair.crossspring.t = size
end

function crosshair:setcrosssettings(size,speed,damper)
	crosshair.crossspring.t = size
	crosshair.crossspring.s = speed
	crosshair.crossspring.d = damper
end

game:GetService("RunService").RenderStepped:connect(function()
	updatecross()
end)

return crosshair
-- aiming

GUI.MobileButtons.AimButton.MouseButton1Click: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,5)
	else
        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)