Roblox/luau_corpus huggingface dataset:
--	mouse.Icon = "rbxasset://textures\\GunCursor.png"
	while true do
		wait()
	end
end

function onUnequippedLocal(mouse)

end

function Equip(mouse)
wait(0.01)
tool.GripPos=Vector3.new(0,0,0)
arms = {tool.Parent:FindFirstChild("Left Arm"), tool.Parent:FindFirstChild("Right Arm")}
torso = tool.Parent:FindFirstChild("Torso") 
if arms ~= nil and torso ~= nil then
local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
if sh ~= nil then
local yes = true
if yes then
yes = false
sh[1].Part1 = nil
sh[2].Part1 = nil
local weld1 = Instance.new("Weld") -- left arm
weld55 = weld1
weld1.Part0 = torso
weld1.Parent = torso
weld1.Part1 = arms[1]
weld1.C1 = f(-1.12,0.3,-0.84,75,-4,15)
welds[1] = weld1
local weld2 = Instance.new("Weld") -- right arm
weld33 = weld2
weld2.Part0 = torso
weld2.Parent = torso
weld2.Part1 = arms[2]
weld2.C1 = f(0.1,0.17,-1.14,72,2,-52)
welds[2] = weld2
local weld3 = Instance.new("Weld") -- right arm
weld77 = weld3
weld3.Part0 = torso
weld3.Parent = torso
weld3.Part1 = tool.Handle
weld3.C1 = f(-0.76,1.93,-1.73,5,-90,0)
welds[3] = weld2
end
else
end
else
end
end

function Unequip(mouse)
if arms ~= nil and torso ~= nil then
local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
if sh ~= nil then
local yes = true
if yes then
yes = false
sh[1].Part1 = arms[1]
sh[2].Part1 = arms[2]
welds[1].Parent = nil
welds[2].Parent = nil
end
else
end
else
end
end

tool.Unequipped:connect(onUnequippedLocal)

tool.Equipped:connect(onEquippedLocal)
tool.Equipped:connect(Equip)
tool.Unequipped:connect(Unequip)
--//services//--
local debris = game:GetService("Debris")
local runService = game:GetService("RunService")
-- Set up item list
function MakeList()
	itemList:ClearAllChildren()
	local buttonsPerPage = 10
	local items = {}
	local sorted = {}
	for _,item in pairs(players.LocalPlayer.Backpack:GetChildren()) do -- sort by price in ascending order
		if item:FindFirstChild("Price") then
			table.insert(items, item)
			local positionToInsertAt = 1
			for i,sortItem in pairs(sorted) do
				if replicatedStorage.Items[sortItem].Price.Value < replicatedStorage.Items[item.Name].Price.Value then
					positionToInsertAt = i + 1
				end
			end
			table.insert(sorted, positionToInsertAt, item.Name)
		end
	end
	local amount = math.clamp(#items, buttonsPerPage, math.huge)
	local button = script:WaitForChild("ItemButton")
	itemList.CanvasSize = UDim2.new(0, 0, itemList.Size.Y.Scale + (itemList.Size.Y.Scale * (1 / buttonsPerPage) * (amount - buttonsPerPage)), 0)
	for i,item in pairs(sorted) do
		local newButton = button:Clone()
		if i % 2 == 0 then
			newButton.BackgroundColor3 = Color3.fromRGB(82, 76, 115)
		else
			newButton.BackgroundColor3 = Color3.fromRGB(99, 119, 148)
		end
		newButton.Text = item
		newButton.Size = UDim2.new(1, -15, 1 / amount, 0)
		newButton.Position = UDim2.new(0, 0, (i - 1) * (1 / amount), 0)
		newButton.Parent = itemList
		newButton.MouseButton1Click:Connect(function()
			SelectItem(item)
		end)
		if i == 1 then
			SelectItem(item)
		end
	end
	if #sorted == 0 then
		itemNameLabel.Text = "No items to sell"
		price.Text = ""
		itemInfo.Text = ""
	end
end

script.Parent:WaitForChild("Close").MouseButton1Click:Connect(function()
	require(switchMenu)()
end)

script.Parent:WaitForChild("Sell").MouseButton1Click:Connect(function()
	if sellCooldown == false then
		sellCooldown = true
		require(playSoundEffect)("Coins")
		workspace.Remotes.SellItem:InvokeServer(itemNameLabel.Text) -- Uses RemoteFunction to yield until action is complete
		MakeList()
		sellCooldown = false
	end
end)

script.Parent:GetPropertyChangedSignal("Visible"):Connect(function()
	if script.Parent.Visible == true then
		MakeList()
	end
end)
--// This section of code waits until all of the necessary RemoteEvents are found in EventFolder.
--// I have to do some weird stuff since people could potentially already have pre-existing
--// things in a folder with the same name, and they may have different class types.
--// I do the useEvents thing and set EventFolder to useEvents so I can have a pseudo folder that
--// the rest of the code can interface with and have the guarantee that the RemoteEvents they want
--// exist with their desired names.

local FFlagUserHandleChatHotKeyWithContextActionService = false do
	local ok, value = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserHandleChatHotKeyWithContextActionService")
	end)
	if ok then
		FFlagUserHandleChatHotKeyWithContextActionService = value
	end
end

local FILTER_MESSAGE_TIMEOUT = 60

local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Chat = game:GetService("Chat")
local StarterGui = game:GetService("StarterGui")
local ContextActionService = game:GetService("ContextActionService")

local DefaultChatSystemChatEvents = ReplicatedStorage:WaitForChild("DefaultChatSystemChatEvents")
local EventFolder = ReplicatedStorage:WaitForChild("DefaultChatSystemChatEvents")
local clientChatModules = Chat:WaitForChild("ClientChatModules")
local ChatConstants = require(clientChatModules:WaitForChild("ChatConstants"))
local ChatSettings = require(clientChatModules:WaitForChild("ChatSettings"))
local messageCreatorModules = clientChatModules:WaitForChild("MessageCreatorModules")
local MessageCreatorUtil = require(messageCreatorModules:WaitForChild("Util"))

local ChatLocalization = nil
pcall(function() ChatLocalization = require(game:GetService("Chat").ClientChatModules.ChatLocalization :: any) end)
if ChatLocalization == nil then ChatLocalization = {} function ChatLocalization:Get(key,default) return default end end

local numChildrenRemaining = 10 -- #waitChildren returns 0 because it's a dictionary
local waitChildren = {
	OnNewMessage = "RemoteEvent",
	OnMessageDoneFiltering = "RemoteEvent",
	OnNewSystemMessage = "RemoteEvent",
	OnChannelJoined = "RemoteEvent",
	OnChannelLeft = "RemoteEvent",
	OnMuted = "RemoteEvent",
	OnUnmuted = "RemoteEvent",
	OnMainChannelSet = "RemoteEvent",

	SayMessageRequest = "RemoteEvent",
	GetInitDataRequest = "RemoteFunction",
}
--[ LOCALS ]--

local ReplicatedStorageEvent = game.ReplicatedStorage:WaitForChild("AFK")
--// Handling Settings		
	Firerate = 60 / 180; -- 60 = 1 Minute, 180 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!
	
	FireMode = 5; -- 5 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive
--// Math
local L_118_ = function(L_155_arg1, L_156_arg2, L_157_arg3)
	if L_155_arg1 > L_157_arg3 then
		return L_157_arg3
	elseif L_155_arg1 < L_156_arg2 then
		return L_156_arg2
	end
	return L_155_arg1
end

local L_119_ = L_107_.new(Vector3.new())
L_119_.s = 30
L_119_.d = 0.55
	
local L_120_ = CFrame.Angles(0, 0, 0)
--[[
	Shorthand for an andThen handler that returns the given value.
]]
function Promise.prototype:andThenReturn(...)
	local length, values = pack(...)
	return self:_andThen(debug.traceback(nil, 2), function()
		return unpack(values, 1, length)
	end)
end
-- Nominal distance, set by dollying in and out with the mouse wheel or equivalent, not measured distance
function VRBaseCamera:GetCameraToSubjectDistance(): number
	return self.currentSubjectDistance
end
--[[
	Fired when PostGame is entered, throwing out a player state update, as well as transitioning the player state
]]
function Transitions.onEnterPostGame(stateMachine, event, from, to, playerComponent)
	Logger.trace(playerComponent.player.Name, " state change: ", from, " -> ", to)
	playerComponent:updateStatus("currentState", to)
	PlayerPostGame.enter(stateMachine, playerComponent)
end
--[[Misc]]
	Tune.LoadDelay		= 3.0		-- Delay before initializing chassis (in seconds)
	Tune.AutoStart		= true		-- Set to false if using manual ignition plugin
	Tune.AutoFlip		= true		-- Set to false if using manual flip plugin
	Tune.AutoUpdate		= true		-- Automatically applies minor updates to the chassis if any are found.
									-- Will NOT apply major updates, but will notify you of any.
									-- Set to false to mute notifications, or if using modified Drive.
-- вертикальный вектор
function module.lookAtY(target, eye)
    local forwardVector = (eye - target)
    local upVector = Vector3.new(0, 1, 0)
    -- You have to remember the right hand rule or google search to get this right
    local rightVector = forwardVector:Cross(upVector)
    local upVector2 = rightVector:Cross(forwardVector)
    return CFrame.fromMatrix(eye, -rightVector, upVector2) -- upVector2 - для вертикали
end

function computeDirection(vec)
	local lenSquared = vec.magnitude * vec.magnitude
	local invSqrt = 1 / math.sqrt(lenSquared)
	return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
end

local Rocket = Instance.new("Part")
Rocket.Locked = true
Rocket.Size = Vector3.new(1,1,1)
Rocket.Shape = Enum.PartType.Ball
Rocket.Color = Color3.fromRGB(0,0,0)
Rocket.CanCollide=false
--[[ Roblox Services ]]--
local UserInputService = game:GetService("UserInputService")
local ContextActionService = game:GetService("ContextActionService")
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 180		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 1000		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 6000		--		Use sliders to manipulate values
	Tune.Redline		= 8000
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 9.4
	Tune.CurveMult		= 0.13
	
	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 180		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 6000		--		Use sliders to manipulate values
	Tune.Redline		= 6700		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 1.0			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
-- Decompiled with the Synapse X Luau decompiler.

local v1 = require(game.ReplicatedStorage:WaitForChild("Resources"));
while not v1.Loaded do
	game:GetService("RunService").Heartbeat:Wait();
end;
local u1 = {};
local v13
local u2 = nil;
function Update()
	if u1 then

	else
		return;
	end;
	if not u2 then
		return;
	end;

	for v5, v6 in pairs(u2:GetChildren()) do
		if v5 then

		else
			break;
		end;
		local v7 = nil
		if v6.Name == "Energy Leaderboard" then
			v7 = u1["Energy"]
		else
			v7 = u1["Gems"]
			
		end
		if v7 then
			local v8 = v6:FindFirstChildOfClass("SurfaceGui");

			for v9, v10 in ipairs(v7) do
				if v9 then

				else
					break;
				end;
				local v12 = v8.Frame:FindFirstChild("Entry" .. v9);
				if not v12 then
					v12 = v1.Assets.UI.Leaderboard.Entry:Clone();
					v12.LayoutOrder = v9;
					v12.Rank.Text = "#" .. v9;
					v12.Name = "Entry" .. v9;
					if v9 <= 3 then
						v13 = 80;
					else
						v13 = 60;
					end;
					v12.Size = UDim2.new(1, 0, 0, v13);
					v12.Parent = v8.Frame;
				end;
				v12.Score.Text = v1.Functions.Format.Short(v10.loadvalue);
				v12.Username.Text = "@" .. v10.username;
				if v10.username == v1.LocalPlayer.Name then
					v12.Username.TextColor3 = Color3.fromRGB(28, 134, 173);
				else
					v12.Username.TextColor3 = Color3.fromRGB(218, 218, 218);
				end;			
			end;
			v8.Frame.CanvasSize = UDim2.new(0, 0, 0, v8.Frame:FindFirstChildOfClass("UIListLayout").AbsoluteContentSize.Y);
		end;	
	end;
end;
function Grab()
	local v14 = v1.Network.Invoke("Get Leaderboards");
	if v14 then
		u1 = v14;
		Update();
	end;
end;
function Check()
	local v15 = v1.WorldCmds.GetMap();
	if v15:FindFirstChild("Interactive") then

	else
		return;
	end;
	u2 = v15.Interactive:FindFirstChild("Leaderboards");
	if not u2 then
		return;
	end;
	Update();
end;
v1.Signal.Fired("World Changed"):Connect(function()
	u2 = nil;
	Check();
end);
coroutine.wrap(function()
	while true do
		Grab();
		wait(10);	
	end;
end)();
-- js  https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt
-- lua http://www.lua.org/manual/5.4/manual.html#pdf-utf8.codepoint
return function(str: string, index: number): number
	if type(index) ~= "number" then
		index = 1
	end
	--[[
		Initial bounds check. Checking string.len is not an exhaustive upper bound,
		but it is cheaper to check string.len and handle utf8.offset than to check
		utf.len, which iterates over all codepoints.
	]]
	local length = string.len(str)
	if index < 1 or index > length then
		return NaN
	end

	-- utf8.offset returns nil for out of bounds
	local offset = utf8.offset(str, index)

	-- check that offset is not greater than the length of the string
	if offset == nil or offset > length then
		return NaN
	end

	local value = utf8.codepoint(str, offset, offset)

	if value == nil then
		return NaN
	end

	return value
end
--[[**
	ensures Roblox RBXScriptSignal type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.RBXScriptSignal = primitive("RBXScriptSignal")
-- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false}

math.randomseed(tick())

function configureAnimationSet(name, fileList)
	if (animTable[name] ~= nil) then
		for _, connection in pairs(animTable[name].connections) do
			connection:disconnect()
		end
	end
	animTable[name] = {}
	animTable[name].count = 0
	animTable[name].totalWeight = 0	
	animTable[name].connections = {}

	-- check for config values
	local config = script:FindFirstChild(name)
	if (config ~= nil) then
--// Services
local L_103_ = game:GetService('RunService').RenderStepped
local L_104_ = game:GetService('UserInputService')
-- Decompiled with the Synapse X Luau decompiler.

local u1 = nil;
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Resources"));
end)();
local v1 = {};
local u2 = {};
function v1.Debounce(p1, p2)
	if p2 == 0 then
		u2[p1] = nil;
		return false;
	end;
	if u2[p1] and tick() <= u2[p1] then
		return true;
	end;
	u2[p1] = tick() + p2;
	return false;
end;
function v1.CheckDebounce(p3)
	if u2[p3] and tick() <= u2[p3] then
		return true;
	end;
	return false;
end;
task.defer(function()
	while true do
		task.wait(10);
		for v2, v3 in pairs((u1.Functions.CloneTable(u2))) do
			if v3 < tick() - 10 then
				u2[v2] = nil;
			end;
		end;	
	end;
end);
return v1;
-- Function to handle sprinting and meter depletion
local function handleSprinting()
	humanoid.WalkSpeed = defaultWalkSpeed * (isSprinting and sprintSpeedMultiplier or 1)

	while isSprinting and meterV > 0 do
		meterV = meterV - 1
		if MeterLocation:FindFirstChild("Meter" .. meterV + 1) then
			MeterLocation["Meter" .. meterV + 1].ImageTransparency = 1
		end
		wait(1)
	end

	if meterV <= 0 then
		isSprinting = false
		humanoid.WalkSpeed = defaultWalkSpeed
	end
end
--Listen to seat enter/exit
VehicleSeating.AddSeat(DriverSeat, onEnterSeat, onExitSeat)

for _, seat in ipairs(AdditionalSeats) do
	VehicleSeating.AddSeat(seat, onEnterSeat, onExitSeat)
end

local function playerAdded(player)
	local playerGui = player:WaitForChild("PlayerGui")

	if not playerGui:FindFirstChild("VehiclePromptScreenGui") then
		local screenGui = Instance.new("ScreenGui")
		screenGui.ResetOnSpawn = false
		screenGui.Name = "VehiclePromptScreenGui"
		screenGui.Parent = playerGui

		local newLocalVehiclePromptGui = Scripts.LocalVehiclePromptGui:Clone()
		newLocalVehiclePromptGui.CarValue.Value = TopModel
		newLocalVehiclePromptGui.Parent = screenGui
	end
end

Players.PlayerAdded:Connect(playerAdded)

for _, player in ipairs(Players:GetPlayers()) do
	playerAdded(player)
end
--[[
	Fired when state is left
]]
function Transitions.onLeaveGame(stateMachine, event, from, to)
	ServerGame.leave(stateMachine)
end
-- waitChildren/EventFolder does not contain all the remote events, because the server version could be older than the client version.
-- In that case it would not create the new events.
-- These events are accessed directly from DefaultChatSystemChatEvents

local useEvents = {}

local FoundAllEventsEvent = Instance.new("BindableEvent")

function TryRemoveChildWithVerifyingIsCorrectType(child)
	if (waitChildren[child.Name] and child:IsA(waitChildren[child.Name])) then
		waitChildren[child.Name] = nil
		useEvents[child.Name] = child
		numChildrenRemaining = numChildrenRemaining - 1
	end
end

for i, child in pairs(EventFolder:GetChildren()) do
	TryRemoveChildWithVerifyingIsCorrectType(child)
end

if (numChildrenRemaining > 0) then
	local con = EventFolder.ChildAdded:connect(function(child)
		TryRemoveChildWithVerifyingIsCorrectType(child)
		if (numChildrenRemaining < 1) then
			FoundAllEventsEvent:Fire()
		end
	end)

	FoundAllEventsEvent.Event:wait()
	con:disconnect()

	FoundAllEventsEvent:Destroy()
end

EventFolder = useEvents
--[[**
	<description>
	Adds a backup to the data store if :Get() fails a specified amount of times.
	Will return the value provided (if the value is nil, then the default value of :Get() will be returned)
	and mark the data store as a backup store, and attempts to :Save() will not truly save.
	</description>

	<parameter name = "retries">
	Number of retries before the backup will be used.
	</parameter>

	<parameter name = "value">
	The value to return to :Get() in the case of a failure.
	You can keep this blank and the default value you provided with :Get() will be used instead.
	</parameter>
**--]]
function DataStore:SetBackup(retries, value)
	self.backupRetries = retries
	self.backupValue = value
end
--!strict

local trimStart = require(script.Parent.trimStart)
local trimEnd = require(script.Parent.trimEnd)

return function(source: string): string
	return trimStart(trimEnd(source))
end
--// Ammo Settings			
	Ammo = 30;
	StoredAmmo = 30;
	MagCount = math.huge; --  If you want infinate ammo, set to math.huge EX. MagCount = math.huge;
	ExplosiveAmmo = 3;
-- Manually call OnTouched for parts the rocket might have spawned inside of
--TODO: Remove when Touched correctly fires for parts spawned within other parts
local partClone = Rocket:Clone()
partClone:ClearAllChildren()
partClone.Transparency = 1
--Hidden Stash--

local function AttachParticleControl(source_part)
	
	local prtc = nil
	
	local function Start()
		prtc = script.Bux:clone()
		prtc.Parent = source_part
	end
	
	local function Update()
		
	end
	
	local function Stop()
		if prtc ~= nil then
			prtc:destroy()
			prtc = nil
		end
	end
	
	return {Start = Start, Update = Update, Stop = Stop}
end

return AttachParticleControl
--------------------[ MATH FUNCTIONS ]------------------------------------------------

function Map(Val, fromLow, fromHigh, toLow, toHigh)
	return (Val - fromLow) * (toHigh - toLow) / (fromHigh - fromLow) + toLow
end

function numLerp(A, B, Alpha)
	return A + (B - A) * Alpha
end

function RAND(Min, Max, Accuracy)
	return numLerp(Min, Max, math.random())
	--[[local Inverse = 1 / (Accuracy or 1)
	return (math.random(Min * Inverse, Max * Inverse) / Inverse)]]
end

function Round(Num, toNearest)
	return math.floor(Num / toNearest + 0.5) * toNearest
end

function getNearestPoint(A, B, Origin)
	local A2 = (A - Origin).magnitude
	local B2 = (B - Origin).magnitude
	return (math.min(A2, B2) == A2 and A or B)
end
-- Function to bind to touch moved if player is on mobile
local function mobileFrame(touch, processed)
	-- Check to see if the touch was on a UI element. If so, we don't want to update anything
	if not processed then
		-- Calculate touch position in world space. Uses Stravant's ScreenSpace Module script
		-- to create a ray from the camera.
		local test = screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 1)
		local nearPos = game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 1))
		nearPos = game.Workspace.CurrentCamera.CoordinateFrame.p - nearPos
		local farPos = screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y,50) 
		farPos = game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(farPos) * -1
		if farPos.magnitude > 900 then
			farPos = farPos.unit * 900
		end
		local ray = Ray.new(nearPos, farPos)
		local part, pos = game.Workspace:FindPartOnRay(ray, player.Character)
		
		-- if a position was found on the ray then update the character's rotation
		if pos then
			frame(pos)
		end
	end
end

local oldIcon = nil
-- Some cool functions idk
-- Andrew Bereza

local Utl = {}

function Utl.CurrentDay()
	return math.floor(os.time()/86400)
end

function Utl.GetPlayerData(PlayerId)
	local Module = game.ServerStorage.PlayerData:FindFirstChild(tostring(PlayerId))
	if Module then
		return require(Module)
	end
end

function Utl.NewPlayerData(Player, PlayerData)
	local Module = game.ServerStorage.PlayerData:FindFirstChild(tostring(Player.userId))
	if Module then 
		Module:Destroy()
	end
	local NewModule = game.ServerStorage.PlayerDataTemplate:Clone()
	NewModule.Name = tostring(Player.userId)
	NewModule.Parent = game.ServerStorage.PlayerData
	local FreshTable = require(NewModule)
	for Key,Value in pairs(PlayerData) do
		FreshTable[Key] = Value
	end
end

function Utl.IntToBool(Int)
	return (Int == 1 and true) or false
end

function Utl.BoolToInt(Bool)
	return (Bool and 1) or 0
end

function Utl.GetTycoon(Player)
	for i,Tycoon in pairs(workspace.Tycoons:GetChildren()) do
		if Tycoon.Owner.Value == Player then
			return Tycoon
		end
	end
end

function Utl.GetEmptyTycoon()
	for i,Tycoon in pairs(workspace.Tycoons:GetChildren()) do
		if Tycoon.Owner.Value == nil then
			return Tycoon
		elseif Tycoon.Owner.Value.Parent ~= game.Players then
			Tycoon.Owner.Value = nil -- Clears it up for the next person
		end
	end
end

function Utl.CreateTag(Player, Name)
	if Player:FindFirstChild(Name) == nil then
		local Tag = Instance.new("BoolValue")
		Tag.Name = Name
		Tag.Parent = Player
	end
end


Utl.ShuttingDown = false

return Utl
--[[Transmission]]
	Tune.TransModes		= {"Auto", "Semi", "Manual"}								--[[
	[Modes]
		"Auto"		: Automatic shifting
		"Semi"		: Clutchless manual shifting, dual clutch transmission
		"Manual"	: Manual shifting with clutch
		
		>Include within brackets
			eg: {"Semi"} or {"Auto", "Manual"}								
		>First mode is default mode													]]
	
	--Automatic Settings
	Tune.AutoShiftMode	= "RPM"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]	
	Tune.AutoUpThresh	= -200		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 1400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)
	
	--Gear Ratios
	Tune.FinalDrive		= 4 			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	3.70		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		4   		,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		2.7 		,
		--[[ 3 ]]		1.75	   	,
		--[[ 4 ]]		1.3    		,
		--[[ 5 ]]		0.9 		,
		--[[ 6 ]]		0.8	    	,
	}
	Tune.FDMult			= 1.0			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
-- Resizes a model to the specified scale
local function scaleModel(model, scale)	
	local primary = model.PrimaryPart
	local primaryCf = primary.CFrame
	
	for _,v in pairs(model:GetDescendants()) do
		if (v:IsA("BasePart")) then
			v.Size = (v.Size * scale)
			if (v ~= primary) then
				v.CFrame = (primaryCf + (primaryCf:inverse() * v.Position * scale))
			end
		end
	end
	
	return model
end