Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_SoundsMisc")
local _Tune = require(car["A-Chassis Tune"])
local on = 0
local mult=0
local det=.13

script:WaitForChild("Rel")
script:WaitForChild("Start")

script.Parent.Values.Gear.Changed:connect(function() mult=1 end)

for i,v in pairs(car.DriveSeat:GetChildren()) do
	for _,a in pairs(script:GetChildren()) do
		if v.Name==a.Name then v:Stop() wait() v:Destroy() end
	end
end

handler:FireServer("newSound","Rel",car.DriveSeat,script.Rel.SoundId,0,script.Rel.Volume,true)
handler:FireServer("newSound","Start",car.DriveSeat,script.Start.SoundId,1,script.Start.Volume,false)
handler:FireServer("playSound","Rel")
car.DriveSeat:WaitForChild("Rel")
car.DriveSeat:WaitForChild("Start")

while wait() do
	mult=math.max(0,mult-.1)
	local _RPM = script.Parent.Values.RPM.Value
	if script.Parent.Values.PreOn.Value then
		handler:FireServer("playSound","Start")
		wait(4.0)
	else
		if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		RelVolume = 3*(1 - math.min(((script.Parent.Values.RPM.Value*3)/_Tune.Redline),1))
		RelPitch = (math.max((((script.Rel.SetPitch.Value + script.Rel.SetRev.Value*_RPM/_Tune.Redline))*on^2)+(det*mult*math.sin(80*tick())),script.Rel.SetPitch.Value)) * on
	end
	if FE then
		handler:FireServer("updateSound","Rel",script.Rel.SoundId,RelPitch,RelVolume)
	else
		car.DriveSeat.Rel.Volume = RelVolume
		car.DriveSeat.Rel.Pitch = RelPitch
	end
end
--Made by Luckymaxer



Model = script.Parent

Debris = game:GetService("Debris")

FadeRate = 0.025
Rate = (1 / 15)

Removing = false

function RemoveModel()
	if Removing then
		return
	end
	local Parts = {}
	for i, v in pairs(Model:GetChildren()) do
		if v:IsA("Model") then
			table.insert(Parts, v)
		end
	end
	if #Parts == 0 then
		Removing = true
		Model.Name = ""
		Debris:AddItem(Model, 0.5)
	end
end

Model.ChildRemoved:connect(function(Child)
	RemoveModel()
end)

RemoveModel()

while true do
	for i, v in pairs(Model:GetChildren()) do
		if v:IsA("Model") then
			for ii, vv in pairs(v:GetChildren()) do
				if vv:IsA("BasePart") and vv.Transparency < 1 then
					local NewTransparency = (vv.Transparency + FadeRate)
					vv.Transparency = ((NewTransparency <= 1 and NewTransparency) or 1)
					if vv.Transparency >= 1 then
						for iii, vvv in pairs(vv:GetChildren()) do
							if vvv:IsA("Light") or vvv:IsA("Fire") or vvv:IsA("Smoke") or vvv:IsA("ParticleEmitter") then
								vvv.Enabled = false
							end
						end
					end
				end
			end
		end
	end
	wait(Rate)
end
-- Data store for tracking purchases that were successfully processed


local purchaseHistoryStore = DataStoreService:GetDataStore("PurchaseHistory")
 



MarketplaceService.PromptProductPurchaseFinished:Connect(function(UserId , assetId ,  wasPurchased )
    
    _G.FinishedPurchase(UserId,assetId,wasPurchased)
    
    
end)
------------------------------------



function onTouched(part)
	if part.Parent ~= nil then
	local h = part.Parent:findFirstChild("Humanoid")
		if h~=nil then
			local teleportfrom=script.Parent.Enabled.Value
			if teleportfrom~=0 then
				if h==humanoid then
				return
				end
				local teleportto=script.Parent.Parent:findFirstChild(modelname)
				if teleportto~=nil then
					local torso = h.Parent.Torso
					local location = {teleportto.Position}
					local i = 1

					local x = location[i].x
					local y = location[i].y
					local z = location[i].z
				
					x = x + math.random(-1, 1)
					z = z + math.random(-1, 1)
					y = y + math.random(2, 3)

					local cf = torso.CFrame
					local lx = 0
					local ly = y
					local lz = 0
					
					script.Parent.Enabled.Value=0
					teleportto.Enabled.Value=0
					torso.CFrame = CFrame.new(Vector3.new(x,y,z), Vector3.new(lx,ly,lz))
					wait(1)
					script.Parent.Enabled.Value=1
					teleportto.Enabled.Value=1
				else
					print("Could not find teleporter!")
				end
			end
		end
	end
end

script.Parent.Touched:connect(onTouched)
--// DO NOT EDIT THIS SCRIPT
--// DO NOT EDIT THIS SCRIPT
--// DO NOT EDIT THIS SCRIPT
--// DO NOT EDIT THIS SCRIPT
--// DO NOT EDIT THIS SCRIPT
--// DO NOT EDIT THIS SCRIPT
--// DO NOT EDIT THIS SCRIPT
--// DO NOT EDIT THIS SCRIPT
--// DO NOT EDIT THIS SCRIPT
--// DO NOT EDIT THIS SCRIPT



local PlayerTools = {}

PlayerTools.Players = {
	
}

return PlayerTools
-- folders


local powerupsFolder = replicatedStorage.Game.Powerups
local mapActivePowerupsFolder = game.ReplicatedStorage.MapSettings.Powerups



local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Sine)

local descendants = maxAmmoFrame:GetDescendants()
local instanceInfoTables = {}

for _, item in pairs (descendants) do
	local infoTable = nil 
	if item:IsA("ImageLabel") then
		infoTable = {INSTANCE = item, PROPERTY = "ImageTransparency", OFF = {ImageTransparency = 1}, ORIGINAL = {ImageTransparency = item["ImageTransparency"]}}
	elseif item:IsA("Frame") then
		infoTable = {INSTANCE = item, PROPERTY = "BackgroundTransparency", OFF = {BackgroundTransparency = 1}, ORIGINAL = {BackgroundTransparency = item["BackgroundTransparency"]}}
	elseif item:IsA("TextLabel") then
		infoTable = {INSTANCE = item, PROPERTY = "TextTransparency", OFF = {TextTransparency = 1}, ORIGINAL = {TextTransparency = item["TextTransparency"]}}
	else
		continue
	end
	table.insert(instanceInfoTables, infoTable)
end
table.insert(instanceInfoTables, {INSTANCE = maxAmmoFrame, PROPERTY = "ImageTransparency", OFF = {ImageTransparency = 1}, ORIGINAL = {ImageTransparency = maxAmmoFrame["ImageTransparency"]}})

local VisibleTime = 4
local Queue = 0
local function updateCard()
	Queue += 1
	maxAmmoFrame.Visible = true

	-- off
	for _, infoTable in pairs (instanceInfoTables) do
		local instance = infoTable["INSTANCE"]
		local property = infoTable["PROPERTY"]
		instance[property] = 1
	end

	-- on
	for _, infoTable in pairs (instanceInfoTables) do
		local instance = infoTable["INSTANCE"]
		local original = infoTable["ORIGINAL"]
		tweenService:Create(instance, tweenInfo, original):Play()
	end

	local start = tick()
	repeat wait() until (tick() - start) > VisibleTime or Queue > 1
	if Queue > 1 then Queue -= 1 return end

	-- off
	for _, infoTable in pairs (instanceInfoTables) do
		local instance = infoTable["INSTANCE"]
		local off = infoTable["OFF"]
		tweenService:Create(instance, tweenInfo, off):Play()
	end

	local start = tick()
	repeat wait() until (tick() - start) > 1 or Queue > 1
	if Queue > 1 then Queue -= 1 return end

	maxAmmoFrame.Visible = false
	Queue -= 1
end

local function powerUpAdded(powerUp)
	if powerUp.Name == "MaxAmmo" then
		updateCard()
	end
end
mapActivePowerupsFolder.ChildAdded:Connect(powerUpAdded)
--[[Weight and CG]]


	Tune.Weight			= 3968		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		3.5		,
	 --[[Length]]		14		}
	Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible
	
	--Unsprung Weight
	Tune.FWheelDensity	= .1		-- Front Wheel Density
	Tune.RWheelDensity	= .1		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1			-- Rear Wheel Density [PGS OFF]
	
	Tune.AxleSize		= 2			-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members
--Localize


local instance,newRay	= Instance.new,Ray.new
local v2,v3,cf,udim2	= Vector2.new,Vector3.new,CFrame.new,UDim2.new
local insert,random,abs	= table.insert,math.random,math.abs


local Player			= game.Players.LocalPlayer
local Character			= Player.Character or Player.CharacterAdded:Wait()
--𝐁𝐮 𝐊𝐢𝐭 𝐇𝐞𝐲𝐞𝐜𝐚𝐧𝐥ı𝐘𝐓 𝐓𝐚𝐫𝐚𝐟ı𝐧𝐝𝐚𝐧 𝐘𝐚𝐩ı𝐥𝐦ış𝐭ı𝐫 İ𝐳𝐢𝐧𝐬𝐢𝐳 𝐕𝐢𝐝𝐞𝐨𝐬𝐮 Ç𝐞𝐤𝐢𝐥𝐦𝐞𝐬𝐢 𝐘𝐚𝐬𝐚𝐤𝐭ı𝐫


while true do
	for i, v in pairs(game.Players:GetPlayers()) do
		local Stats = v.leaderstats:WaitForChild(StatsName).Value
		if Stats then
			pcall(function()--𝐁𝐮 𝐊𝐢𝐭 𝐇𝐞𝐲𝐞𝐜𝐚𝐧𝐥ı𝐘𝐓 𝐓𝐚𝐫𝐚𝐟ı𝐧𝐝𝐚𝐧 𝐘𝐚𝐩ı𝐥𝐦ış𝐭ı𝐫 İ𝐳𝐢𝐧𝐬𝐢𝐳 𝐕𝐢𝐝𝐞𝐨𝐬𝐮 Ç𝐞𝐤𝐢𝐥𝐦𝐞𝐬𝐢 𝐘𝐚𝐬𝐚𝐤𝐭ı𝐫
				DataStore:UpdateAsync(v.UserId, function(Value)
					return tonumber(Stats)
				end)
			end)
		end
	end
	
	for i, v in pairs(ItemsFrame:GetChildren()) do--𝐁𝐮 𝐊𝐢𝐭 𝐇𝐞𝐲𝐞𝐜𝐚𝐧𝐥ı𝐘𝐓 𝐓𝐚𝐫𝐚𝐟ı𝐧𝐝𝐚𝐧 𝐘𝐚𝐩ı𝐥𝐦ış𝐭ı𝐫 İ𝐳𝐢𝐧𝐬𝐢𝐳 𝐕𝐢𝐝𝐞𝐨𝐬𝐮 Ç𝐞𝐤𝐢𝐥𝐦𝐞𝐬𝐢 𝐘𝐚𝐬𝐚𝐤𝐭ı𝐫
		if v:IsA("ImageLabel") then
			v:Destroy()
		end--𝐁𝐮 𝐊𝐢𝐭 𝐇𝐞𝐲𝐞𝐜𝐚𝐧𝐥ı𝐘𝐓 𝐓𝐚𝐫𝐚𝐟ı𝐧𝐝𝐚𝐧 𝐘𝐚𝐩ı𝐥𝐦ış𝐭ı𝐫 İ𝐳𝐢𝐧𝐬𝐢𝐳 𝐕𝐢𝐝𝐞𝐨𝐬𝐮 Ç𝐞𝐤𝐢𝐥𝐦𝐞𝐬𝐢 𝐘𝐚𝐬𝐚𝐤𝐭ı𝐫
	end
	
	GetItems()--𝐁𝐮 𝐊𝐢𝐭 𝐇𝐞𝐲𝐞𝐜𝐚𝐧𝐥ı𝐘𝐓 𝐓𝐚𝐫𝐚𝐟ı𝐧𝐝𝐚𝐧 𝐘𝐚𝐩ı𝐥𝐦ış𝐭ı𝐫 İ𝐳𝐢𝐧𝐬𝐢𝐳 𝐕𝐢𝐝𝐞𝐨𝐬𝐮 Ç𝐞𝐤𝐢𝐥𝐦𝐞𝐬𝐢 𝐘𝐚𝐬𝐚𝐤𝐭ı𝐫
	
	wait()
	SurfaceGui.Heading.Heading.Text = StatsName .. " Leaderboard"--𝐁𝐮 𝐊𝐢𝐭 𝐇𝐞𝐲𝐞𝐜𝐚𝐧𝐥ı𝐘𝐓 𝐓𝐚𝐫𝐚𝐟ı𝐧𝐝𝐚𝐧 𝐘𝐚𝐩ı𝐥𝐦ış𝐭ı𝐫 İ𝐳𝐢𝐧𝐬𝐢𝐳 𝐕𝐢𝐝𝐞𝐨𝐬𝐮 Ç𝐞𝐤𝐢𝐥𝐦𝐞𝐬𝐢 𝐘𝐚𝐬𝐚𝐤𝐭ı𝐫
	List.ListContent.GuideTopBar.Value.Text = StatsName
	List.CanvasSize = UDim2.new(0, 0, 0, ItemsFrame.UIListLayout.AbsoluteContentSize.Y + 35)
	wait(UpdateEvery)
end--𝐁𝐮 𝐊𝐢𝐭 𝐇𝐞𝐲𝐞𝐜𝐚𝐧𝐥ı𝐘𝐓 𝐓𝐚𝐫𝐚𝐟ı𝐧𝐝𝐚𝐧 𝐘𝐚𝐩ı𝐥𝐦ış𝐭ı𝐫 İ𝐳𝐢𝐧𝐬𝐢𝐳 𝐕𝐢𝐝𝐞𝐨𝐬𝐮 Ç𝐞𝐤𝐢𝐥𝐦𝐞𝐬𝐢 𝐘𝐚𝐬𝐚𝐤𝐭ı𝐫
--//doors


local dl = Instance.new("Motor", script.Parent.Parent.Misc.FL.Door.SS)
dl.MaxVelocity = 0.03
dl.Part0 = script.Parent.FL
dl.Part1 = dl.Parent

local dr = Instance.new("Motor", script.Parent.Parent.Misc.FR.Door.SS)
dr.MaxVelocity = 0.03
dr.Part0 = script.Parent.FR
dr.Part1 = dr.Parent
-- General settings


local XRAY_TIME = 10
local COOLDOWN = 25

local plr = game.Players.LocalPlayer
local inputService = game:GetService("UserInputService")

game.ReplicatedStorage.Interactions.Client.Perks.UseXRay.OnClientEvent:connect(function()
	
	-- Make sure character is alive
	if plr.Character ~= nil then
		local originalChr = plr.Character
		
		-- Show tip
		plr.PlayerGui.MainGui.Tip.Text = "Press Q to use X-Ray"
		
		-- Set map object
		local map = workspace:FindFirstChild("Map")
	
		-- Connect input event
		local debounce = false
		local event
		local done = false
		event = inputService.InputBegan:connect(function(inputObj)
			
			-- Check if states are correct
			if not debounce and not done and inputObj.KeyCode == Enum.KeyCode.Q and workspace:FindFirstChild("Map") == map then
				debounce = true
				
				-- Show location of each player
				local playingPlayers = game.ReplicatedStorage.Interactions.Server.GetPlayingPlayers:InvokeServer()
				for n, i in pairs(playingPlayers) do
					if i == plr then
						table.remove(playingPlayers, n)
						break
					end
				end
				for _, i in pairs(playingPlayers) do
					
					-- Make sure character is alive
					local chr = i.Character
					if chr ~= nil and chr:FindFirstChild("Humanoid") and chr.Humanoid.Health > 0 and chr:FindFirstChild("Torso") then
						
						-- Place X Gui in torso
						local gui = script.XMarker:clone()
						gui.Parent = chr.Torso
						
						-- Remove after 10 seconds
						spawn(function()
							wait(XRAY_TIME)
							if gui ~= nil then
								gui:destroy()
								gui = nil
							end
						end)
						
						-- Connect death
						chr.Humanoid.Died:connect(function()
							if gui ~= nil then
								gui:destroy()
								gui = nil
							end
						end)
						
					end
					
				end
				
				-- Update text to match state
				for i=1, XRAY_TIME do
					if done or workspace:FindFirstChild("Map") == nil then
						break
					end
					plr.PlayerGui.MainGui.Tip.Text = "Can see others for " .. (XRAY_TIME - i + 1) .. " seconds"
					wait(1)
				end
				if not done and workspace:FindFirstChild("Map") then
					for i=1, COOLDOWN do
						if done or workspace:FindFirstChild("Map") == nil then
							break
						end
						plr.PlayerGui.MainGui.Tip.Text = "Can use again in " .. (COOLDOWN - i + 1) .. " seconds"
						wait(1)
					end
					if not done and workspace:FindFirstChild("Map") then
						plr.PlayerGui.MainGui.Tip.Text = "Press Q to turn use X-Ray"
					end
				end
				if done or workspace:FindFirstChild("Map") == nil then
					if event ~= nil then
						event:disconnect()
						event = nil
					end
					done = true
					plr.PlayerGui.MainGui.Tip.Text = ""
				end
				
				debounce = false
			elseif workspace:FindFirstChild("Map") ~= map then
				if event ~= nil then
					event:disconnect()
					event = nil
				end
				done = true
				plr.PlayerGui.MainGui.Tip.Text = ""
			end
			
		end)
		
		-- Connect disconnect
		originalChr.Humanoid.Died:connect(function()
			if not done then
				event:disconnect()
				event = nil
				done = true
				plr.PlayerGui.MainGui.Tip.Text = ""
			end
		end)
	
	end
	
end)
--[[
	Returns the value of an attribute on an instance, erroring if the
	attribute doesn't exist. Normally, calling :GetAttribute() doesn't error,
	but in most cases, getting an attribute should only happen where it's guaranteed
	to exist, and we therefore want it to error.
--]]



local ReplicatedStorage = game:GetService("ReplicatedStorage")

local Attribute = require(ReplicatedStorage.Source.SharedConstants.Attribute)

local function getAttribute<T>(instance: Instance, attributeName: Attribute.EnumType): T
	local value = instance:GetAttribute(attributeName)
	assert(value ~= nil, ("%s is not a valid attribute of %s"):format(attributeName, instance:GetFullName()))

	return value
end

return getAttribute
--[[
	[How fast the body rotates.]
	[If you set it on 0, your torso and head won't move, if you set it on 0.5, it'll look smoother, if you set it on 1, it will do instant rotate.]
	[Setting this any higher than 1 causes weird glitchy shaking occasionally.]
--]]


local UpdateSpeed = 1

local NeckOrgnC0 = Neck.C0	--[Get the base C0 to manipulate off of.]
local WaistOrgnC0 = (not IsR6 and Waist.C0)	--[Get the base C0 to manipulate off of.]
-- play the animation


toolAnimTrack:Play(transitionTime)
toolAnimName = animName
toolAnimInstance = anim
currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:Connect(toolKeyFrameReachedFunc)
end
end
function stopToolAnimations()
local oldAnim = toolAnimName
if (currentToolAnimKeyframeHandler ~= nil) then
currentToolAnimKeyframeHandler:Disconnect()
end
toolAnimName = ""
toolAnimInstance = nil
if (toolAnimTrack ~= nil) then
toolAnimTrack:Stop()
toolAnimTrack:Destroy()
toolAnimTrack = nil
end
return oldAnim
end
--!nocheck



local LocalizationService = game:GetService("LocalizationService")
local ChatService = game:GetService("Chat")
local success, userShouldLocalizeServerMessages = pcall(function() return UserSettings():IsUserFeatureEnabled("UserShouldLocalizeServerMessages") end)
local userShouldLocalizeServerMessages = success and userShouldLocalizeServerMessages

local existingKey = {
	["System"] = "InGame.Chat.Label.SystemMessagePrefix",
	["Team"] = "InGame.Chat.Label.TeamMessagePrefix",
	["From "] = "InGame.Chat.Label.From",
	["To "] = "InGame.Chat.Label.To",
}
local ChatLocalization = {
	_hasFetchedLocalization = false,
}

function ChatLocalization:_getTranslator()
	if not self._translator and not self._hasFetchedLocalization then
		-- Don't keep retrying if this fails.
		self._hasFetchedLocalization = true
		
		local localizationTable = ChatService:WaitForChild("ChatLocalization", 4)
		if localizationTable then
			self._translator = localizationTable:GetTranslator(LocalizationService.RobloxLocaleId)
			LocalizationService:GetPropertyChangedSignal("RobloxLocaleId"):Connect(function()
				-- If RobloxLocaleId changes invalidate the cached Translator.
				self._hasFetchedLocalization = false
				self._translator = nil
			end)
		else
			warn("Missing ChatLocalization. Chat interface will not be localized.")
		end
	end
	return self._translator
end

function ChatLocalization:Get(key, default, extraParameters)
	local rtv = default
	pcall(function()
		local translator = self:_getTranslator()
		if translator then
			rtv = translator:FormatByKey(key, extraParameters)
		else
			warn("Missing Translator. Used default for", key)
		end
	end)
	return rtv
end

function ChatLocalization:LocalizeFormattedMessage(message)

	if not userShouldLocalizeServerMessages then
		return message
	end

	local keyStart, keyEnd = string.find(message, "{RBX_LOCALIZATION_KEY}")
	if not keyStart then
		return message
	end
	local defaultStart, defaultEnd = string.find(message, "{RBX_LOCALIZATION_DEFAULT}")
	if not defaultStart then
		return message
	end
	local paramStart, paramEnd = string.find(message, "{RBX_LOCALIZATION_PARAMS}")
	local key = string.sub(message, keyEnd + 1, defaultStart - 1)
	local default
	if not paramStart then
		default = string.sub(message, defaultEnd + 1)
		return self:Get(key, default)
	end
	default = string.sub(message, defaultEnd + 1, paramStart - 1)
	local params = string.sub(message, paramEnd + 1)
	local extraParameters = {}
	for k,v in string.gmatch(params,"([^%s]+)=([^%s]+)") do
		extraParameters[k] = v
	end

	return self:Get(key, default, extraParameters)
end

function ChatLocalization:FormatMessageToSend(key, defaultMessage, parameterName, value)
	if userShouldLocalizeServerMessages then
		if parameterName and value then
			return "{RBX_LOCALIZATION_KEY}"..key.."{RBX_LOCALIZATION_DEFAULT}"..defaultMessage
				.."{RBX_LOCALIZATION_PARAMS}"..parameterName.."="..value
		else
			return "{RBX_LOCALIZATION_KEY}"..key.."{RBX_LOCALIZATION_DEFAULT}"..defaultMessage
		end
	else
		if parameterName and value then
			return string.gsub(self:Get(key,defaultMessage), "{"..parameterName.."}", value)
		else
			return self:Get(key,defaultMessage)
		end
	end
end
--                                                    in the aboutWindow


aboutCloseButton.MouseButton1Down:Connect(function()
	topbar_acloseButton_p:Play()
	hideAboutWindow()
	lightenScreen()
end)

aboutCloseButton.MouseButton1Up:Connect(function()
	topbar_acloseButton_f:Cancel()
	topbar_aclosebutton_r:Play()
	topbar_aclosebutton_r.Completed:Wait()
	topbar_acloseButton_nf:Play()
end)
---- This script is most useful for when you're trying to assign teams to people based on their rank within your group, such as a team for the owner, admins, etc.



game.Players.PlayerAdded:connect(function(newPlayer)
	local rank = newPlayer:GetRankInGroup(16072157) ---- Change that number to the ID of your group
    local teamName = ""
	if rank == 253 then ---- Change this number to that of the desired rank, find it on the admin page
        teamName = "Owners" ---- Change this to the name of the team you want this person on
	elseif rank >= 252 and rank ~= 8 then
		teamName = "Hostiles"
	elseif rank == 250 then ---- Change this number to that of the desired rank, find it on the admin page
		teamName = "High Command" ---- Change this to the name of the team you want this person on
    elseif rank >= 1 and rank ~= 5 then ---- This one accounts for all members not in the previous ranks, but excludes the prison rank, adjust for your purposes
		teamName = "Visitor"
	elseif rank == 0 then ---- Change this number to that of the desired rank, find it on the admin page
        teamName = "Guest" ---- Change this to the name of the team you want this person on

    end
    newPlayer.TeamColor = game.Teams[teamName].TeamColor
end)
--// Bullet Physics


	BulletPhysics = Vector3.new(0,55,0); -- Drop fixation: Lower number = more drop
	BulletSpeed = 2500; -- Bullet Speed
	BulletSpread = 1; -- How much spread the bullet has
	
	ExploPhysics = Vector3.new(0,20,0); -- Drop for explosive rounds
	ExploSpeed = 600; -- Speed for explosive rounds
	
	BulletDecay = 10000; -- How far the bullet travels before slowing down and being deleted (BUGGY)
-- Variables


local inputBeganHandle = nil

local function OnCharacterAdded(character)
	
	local humanoid = character:WaitForChild("Humanoid")
	
	-- Listen for inputs from the local player
	inputBeganHandle = UserInputService.InputBegan:Connect(function(inputObject)
		
		local humanoidState = humanoid:GetState()
		-- Can't do any equipment management if you're dead.
		if humanoidState == Enum.HumanoidStateType.Dead then return end
		
		-- [Q] to swap weapons
		if inputObject.KeyCode == Enum.KeyCode.Q then
			-- Inform the server that we want to swap our weapons
			APIEquipment.SwapWeapons()
		elseif inputObject.KeyCode == Enum.KeyCode.G then
			
			local currentlyEquippedTool = APIEquipment.GetEquippedToolFromPlayer(Local_Player)
			
			local throwableTool = APIEquipment.GetThrowableFromPlayer(Local_Player)
			
			-- Don't swap to the grenade if we're already holding the grenade
			if throwableTool == currentlyEquippedTool then return end
			
			local throwableDefinition = APIEquipment.GetWeaponDefinitionFromTool(throwableTool)
			local throwableRuntime = APIEquipment.GetLocalCurrentWeaponRuntimeData(throwableDefinition)
			
			-- Don't allow throwing of grenades if they're out.
			if throwableRuntime:IsEmpty() then return end

			APIEquipment.SwapToThrowable()
		end
	end)
	
	-- Don't allow weapon switching when the player has died.
	humanoid.Died:Connect(function()
		if inputBeganHandle then
			inputBeganHandle:Disconnect()
		end
	end)
	
end

local function OnCharacterRemoved()
	-- Clear input handle when the character is not existing
	if inputBeganHandle then
		inputBeganHandle:Disconnect()
	end
end



if Local_Player.Character then
	OnCharacterAdded(Local_Player.Character)
end

Local_Player.CharacterAdded:Connect(OnCharacterAdded)

Local_Player.CharacterRemoving:Connect(OnCharacterRemoved)
--[[Brakes]]


	Tune.ABSEnabled		= true		-- Implements ABS
	Tune.ABSThreshold	= 20		-- Slip speed allowed before ABS starts working (in SPS) 

	Tune.FBrakeForce	= 5000		-- Front brake force
	Tune.RBrakeForce	= 5000		-- Rear brake force
	Tune.PBrakeForce	= 5000		-- Handbrake force
	
	Tune.FLgcyBForce	= 15000		-- Front brake force [PGS OFF]
	Tune.RLgcyBForce	= 10000		-- Rear brake force [PGS OFF]
	Tune.LgcyPBForce	= 25000		-- Handbrake force [PGS OFF]
--[[
	Restricts the reading of missing members for a table.
]]



local Package = script.Parent.Parent
local logError = require(Package.Logging.logError)

local function restrictRead(tableName: string, strictTable: table): table
	local metatable = getmetatable(strictTable)

	if metatable == nil then
		metatable = {}
		setmetatable(strictTable, metatable)
	end

	function metatable:__index(memberName)
		logError("strictReadError", nil, tostring(memberName), tableName)
	end

	return strictTable
end

return restrictRead
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]




local autoscaling	= false					--Estimates top speed

local UNITS	= {								--Click on speed to change units
											--First unit is default	
	{
		units			= "MPH"				,
		scaling			= (10/12) * (60/88)	, -- 1 stud : 10 inches | ft/s to MPH
		maxSpeed		= 160				,
		spInc			= 20				, -- Increment between labelled notches
	},
	
	{
		units			= "KM/H"			,
		scaling			= (10/12) * 1.09728	, -- 1 stud : 10 inches | ft/s to KP/H
		maxSpeed		= 270				,
		spInc			= 40				, -- Increment between labelled notches
	},
	
	{
		units			= "SPS"				,
		scaling			= 1					, -- Roblox standard
		maxSpeed		= 400				,
		spInc			= 40				, -- Increment between labelled notches
	}
}