Pinkstack/roblox-luau-corpus-text huggingface dataset:
--local Util = require(game.ReplicatedStorage.Modules.Util)



game:GetService("UserInputService").InputBegan:Connect(function(input,gameprocessed)
	if input.KeyCode == Enum.KeyCode.LeftAlt then
		--Util:UnlockMouse("Admin")
	end
	if gameprocessed then
		return
	end
	if input.UserInputType == Enum.UserInputType.MouseButton1 and game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.LeftAlt) then
		game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = Mouse.Hit * CFrame.new(0,3,0)
	end
end)

game:GetService("UserInputService").InputEnded:Connect(function(input,gameprocessed)
	if input.KeyCode == Enum.KeyCode.LeftAlt then
		--Util:DeleteMouseUnlock("Admin")
	end
end)

game:GetService("UserInputService").InputBegan:Connect(function(input,gameprocessed)
	if not gameprocessed then
		if input.KeyCode == Enum.KeyCode.F2 then
			script.Parent.Enabled = not script.Parent.Enabled
			
		end
	end
end)
--[[Drivetrain]]

	
	Tune.Config			= "AWD"		--"FWD" , "RWD" , "AWD"
	
	--Differential Settings	
	Tune.FDiffSlipThres	= 60		-- 1 - 100%				(Max threshold of applying full lock determined by deviation from avg speed)
	Tune.FDiffLockThres	= 65		-- 0 - 100%				(0 - Bias toward slower wheel, 100 - Bias toward faster wheel)
	Tune.RDiffSlipThres	= 45    	-- 1 - 100%
	Tune.RDiffLockThres	= 45  		-- 0 - 100%
	Tune.CDiffSlipThres	= 45		-- 1 - 100%				[AWD Only]
	Tune.CDiffLockThres	= 50		-- 0 - 100%				[AWD Only]
	
	--Traction Control Settings
	Tune.TCSEnabled		= true		-- Implements TCS
	Tune.TCSThreshold	= 20		-- Slip speed allowed before TCS starts working (in SPS)
	Tune.TCSGradient	= 20		-- Slip speed gradient between 0 to max reduction (in SPS)
	Tune.TCSLimit		= 10		-- Minimum amount of torque at max reduction (in percent)
--// Recoil Settings	


	gunrecoil = -0.1; -- How much the gun recoils backwards when not aiming
	camrecoil = 0.16; -- How much the camera flicks when not aiming
	AimGunRecoil = -0.1; -- How much the gun recoils backwards when aiming
	AimCamRecoil = 0.13; -- How much the camera flicks when aiming
	
	CamShake = 0.5; -- THIS IS NEW!!!! CONTROLS CAMERA SHAKE WHEN FIRING
	AimCamShake = 0.5; -- THIS IS ALSO NEW!!!!
	
	Kickback = 0.2; -- Upward gun rotation when not aiming
	AimKickback = 0.2; -- Upward gun rotation when aiming
-- Properties


local held = false
local step = 0.010
local percentage = 0

function snap(number, factor)
	if factor == 0 then
		return number
	else
		return math.floor(number/factor+0.5)*factor
	end
end

UIS.InputEnded:connect(function(input, processed)
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		held = false
	end
end)

SliderBtn.MouseButton1Down:connect(function()
	held = true
end)


RuS.RenderStepped:connect(function(delta)
	if held then
		local MousePos = UIS:GetMouseLocation().X
		local BtnPos = SliderBtn.Position
		local SliderSize = Slider.AbsoluteSize.X
		local SliderPos = Slider.AbsolutePosition.X
		local pos = snap((MousePos-SliderPos)/SliderSize,step)
		percentage = math.clamp(pos,0,1)
		SliderBtn.Position = UDim2.new(percentage,0,BtnPos.Y.Scale, BtnPos.Y.Offset)
	end
end)
--// F key, Horn


mouse.KeyUp:connect(function(key)
	if key=="f" then 
		veh.Lightbar.middle.Airhorn:Stop()
		veh.Lightbar.middle.Wail.Volume = 2
		veh.Lightbar.middle.Yelp.Volume = 2
		veh.Lightbar.middle.Priority.Volume = 2
		veh.Lightbar.middle.Manual.Volume = 2
	end
end)










mouse.KeyDown:connect(function(key)
	if key=="j" then 
		veh.Lightbar.middle.Beep:Play()
veh.Lightbar.RemoteEvent:FireServer(true)
	end
	end)
-- Types


export type CastVisualiser = typeof(CastVisualiser)
type CastVisualiserPrivate = CastVisualiser & {
	Color: Color3,
	WorldRoot: WorldRoot,
	CastOriginPart: BasePart,
	
	LineVisual: LineHandleAdornment,
	ConeVisual: ConeHandleAdornment,
	BoxVisual: BoxHandleAdornment,
	SphereVisual: SphereHandleAdornment,
}
-- Local private variables and constants


local UNIT_X = Vector3.new(1,0,0)
local UNIT_Y = Vector3.new(0,1,0)
local UNIT_Z = Vector3.new(0,0,1)
local X1_Y0_Z1 = Vector3.new(1,0,1)	--Note: not a unit vector, used for projecting onto XZ plane
local ZERO_VECTOR3 = Vector3.new(0,0,0)
local ZERO_VECTOR2 = Vector2.new(0,0)
local TAU = 2 * math.pi

local VR_PITCH_FRACTION = 0.25
local tweenAcceleration = math.rad(220)		--Radians/Second^2
local tweenSpeed = math.rad(0)				--Radians/Second
local tweenMaxSpeed = math.rad(250)			--Radians/Second
local TIME_BEFORE_AUTO_ROTATE = 2.0 		--Seconds, used when auto-aligning camera with vehicles
local PORTRAIT_OFFSET = Vector3.new(0,-3,0)
--[[
	Sets the new view, destructing any previous view if it exists, and then creating the specified
	new view.
]]


function UIController.setView(view, ...)
	if not views[view] then
		Logger.warn("Tried to set UIController view to ", view, ", but it does not exist!")
		return
	end

	if currentView then
		currentView.exit()
	end

	currentView = views[view]
	currentView.enter(...)
end
--!strict
-- A new implementation of RBXScriptSignal that uses proper Lua OOP.
-- This was explicitly made to transport other OOP objects.
-- I would be using BindableEvents, but they don't like cyclic tables (part of OOP objects with __index)



local SignalStatic = {}
SignalStatic.__index = SignalStatic
local ConnectionStatic = {}
ConnectionStatic.__index = ConnectionStatic

export type Signal = {
	Connections: {[number]: Connection}
}

export type Connection = {
	Signal: Signal?,
	Delegate: any,
	Index: number	
}
--// Handling Settings		


	Firerate = 60 / 720; -- 60 = 1 Minute, 700 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!
	
	FireMode = 6; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive
-- To make this work, simply group it with the model you want!




local modelbackup = script.Parent.Parent:FindFirstChild(modelname):clone()
local trigger = script.Parent

enabled = true

function onClick(player)

	if enabled == true then

		enabled = false
		trigger.BrickColor = BrickColor.new("Really black")
		script.Parent.BillboardGui.Enabled = false
		script.Parent.bing:Play()


	if script.Parent.Parent:FindFirstChild(modelname) ~= nil then

		script.Parent.Parent:FindFirstChild(modelname):Destroy()

	end

		local modelclone = modelbackup:clone()
		modelclone.Parent = script.Parent.Parent
		modelclone:MakeJoints()
		player.Character.Torso.CFrame = CFrame.new(modelclone.seat.Position) * CFrame.new(0, 0.5, 0) 
		modelclone.seat.sitsound:Play()
		wait(1)
		modelclone.seat.Anchored = false

		wait(WaitTime)
		script.Parent.BillboardGui.Enabled = true		
		enabled = true
		trigger.BrickColor = BrickColor.new("Bright violet")

	end

end

script.Parent.ClickDetector.MouseClick:connect(onClick)
--Workspace.CurrentCamera.CameraType="Track"


mouse.Button1Down:connect(function() bin.keyDown:FireServer(player:GetMouse()) end)
mouse.Button1Up:connect(function() bin.keyUp:FireServer() end)
mouse.KeyDown:connect(function(key) bin.Key:FireServer(key) end)
mouse.Move:Connect(function() bin.Moved:FireServer(player:GetMouse().Hit) end)


bin.Unequipped:connect(function(mouse)
Aim = false
--		if script.Parent.Parent.Engine:FindFirstChild("BodyGyro") then
--			script.Parent.Parent.Engine.BodyGyro:Destroy()
--		end
--		if script.Parent.Parent.Engine:FindFirstChild("BodyVelocity") then
--			script.Parent.Parent.Engine.BodyBodyVelocity:Destroy()
--		end


		if script.Parent.Parent:FindFirstChild("LocalScript") then
			script.Parent.Parent:FindFirstChild("LocalScript"):Destroy()
		end
		script.Parent.Parent.Rotor1.sound:Stop()
		for i,v in ipairs(script.Parent.Parent:GetChildren()) do
			if v:IsA("Seat") then
				v.Disabled = true
			end
		end
	end
end)
-----------------------------------


elseif script.Parent.Parent.Parent.TrafficControl.Value == "" then

script.Parent.Parent.Off.Spotlight2.Transparency = 0.3
script.Parent.Parent.Off.Spotlight3.Transparency = 0
script.Parent.Parent.Off.Part.Transparency = 0
script.Parent.Parent.Off.Union.Transparency = 0
script.Parent.Parent.Off.a1.Transparency = 0

script.Parent.Parent.Front.Spotlight2.Transparency = 1
script.Parent.Parent.Front.Spotlight2.Point.Enabled = false
script.Parent.Parent.Front.Spotlight2.Lighto.Enabled = false
script.Parent.Parent.Front.Part.Transparency = 1
script.Parent.Parent.Front.Union.Transparency = 1
script.Parent.Parent.Front.a1.Transparency = 1


script.Parent.Parent.Left.Spotlight2.Transparency = 1
script.Parent.Parent.Left.Spotlight2.Point.Enabled = false
script.Parent.Parent.Left.Spotlight2.Lighto.Enabled = false
script.Parent.Parent.Left.Part.Transparency = 1
script.Parent.Parent.Left.Union.Transparency = 1
script.Parent.Parent.Left.a1.Transparency = 1

script.Parent.Parent.Right.Spotlight2.Transparency = 1
script.Parent.Parent.Right.Spotlight2.Point.Enabled = false
script.Parent.Parent.Right.Spotlight2.Lighto.Enabled = false
script.Parent.Parent.Right.Part.Transparency = 1
script.Parent.Parent.Right.Union.Transparency = 1
script.Parent.Parent.Right.a1.Transparency = 1
	
end
end
--[[function playsound(time)
	nextsound=time+5+(math.random()*5)
	local randomsound=sounds[math.random(1,#sounds)]
	randomsound.Volume=.5+(.5*math.random())
	randomsound.Pitch=.5+(.5*math.random())
	randomsound:Play()
end]]



while sp.Parent~=nil and Humanoid and Humanoid.Parent~=nil and Humanoid.Health>0 and Torso and Head and Torso~=nil and Torso.Parent~=nil do
	local _,time=wait(0.25)--wait(1/3)
	humanoids={}
	populatehumanoids(game.Workspace)
	closesttarget=nil
	closestdist=sightrange
	local creator=sp:FindFirstChild("creator")
	for i,h in ipairs(humanoids) do
		if h and h.Parent~=nil then
			if h.Health>0 and h.Parent~=sp then
				local plr=game.Players:GetPlayerFromCharacter(h.Parent)
				if creator==nil or plr==nil or creator.Value~=plr then
					local t=h.Parent:FindFirstChild("Torso")
					if t~=nil then
						local dist=(t.Position-Torso.Position).magnitude
						if dist<closestdist then
							closestdist=dist
							closesttarget=t
						end
					end
				end
			end
		end
	end
	if closesttarget~=nil then
		if not chasing then
			--playsound(time)
			chasing=true
			Humanoid.WalkSpeed=runspeed
		end
		Humanoid:MoveTo(closesttarget.Position+(Vector3.new(1,1,1)*(variance*((math.random()*2)-1))),closesttarget)
		if math.random()<.5 then
			attack(time,closesttarget.Position)
		end
	else
		if chasing then
			chasing=false
			Humanoid.WalkSpeed=wonderspeed
		end
		if time>nextrandom then
			nextrandom=time+3+(math.random()*5)
			local randompos=Torso.Position+((Vector3.new(1,1,1)*math.random()-Vector3.new(.5,.5,.5))*40)
			Humanoid:MoveTo(randompos,game.Workspace.Terrain)
		end
	end
	if time>nextsound then
		--playsound(time)
	end
	if time>nextjump then
		nextjump=time+7+(math.random()*5)
		Humanoid.Jump=true
	end
	animate(time)
end

wait(4)
sp:remove() --Rest In Pizza
------------------------------------------------------------------------
-- opening of a function
------------------------------------------------------------------------


function luaY:open_func(ls, fs)
  local L = ls.L
  local f = self:newproto(ls.L)
  fs.f = f
  fs.prev = ls.fs  -- linked list of funcstates
  fs.ls = ls
  fs.L = L
  ls.fs = fs
  fs.pc = 0
  fs.lasttarget = -1
  fs.jpc = luaK.NO_JUMP
  fs.freereg = 0
  fs.nk = 0
  fs.np = 0
  fs.nlocvars = 0
  fs.nactvar = 0
  fs.bl = nil
  f.source = ls.source
  f.maxstacksize = 2  -- registers 0/1 are always valid
  fs.h = {}  -- constant table; was luaH_new call
  -- anchor table of constants and prototype (to avoid being collected)
  -- sethvalue2s(L, L->top, fs->h); incr_top(L); /* C */
  -- setptvalue2s(L, L->top, f); incr_top(L);
end
--//Toggle event//--


script.Parent.Door.MainDoor.ClickDetector.MouseClick:Connect(function()
	if DoorStatus == "Closed" and Debounce == false then
		Debounce = true
		DoorMain.Open:Play()
		TweenModel(script.Parent.Door, TGP)
		DoorStatus = "Opened"
		Debounce = false
	elseif DoorStatus == "Opened" and Debounce == false then
		Debounce = true
		DoorMain.Close:Play()
		TweenModel(script.Parent.Door, OrigPos)
		DoorStatus = "Closed"
		Debounce = false
	end
	end)
--[[

This class allows queueing up functions to be run at once.

Constructor:
	new()
Methods:
	Add(func, args...): adds a function to the queue with corresponding arguments.
	Dispatch(): fires all functions in order.

Note: a failed function will not impact the remainder of the functions.

--]]



local Utils = require(script.Parent.Parent);
local Log = Utils.Log;

local FunctionQueue = Utils.new("Class", "FunctionQueue");
-- << DISPLAY CERTAIN PAGES >>


local homeSortOrder = {"About", "Commands", "Special", "Admin", "Settings"}
function module:DisplayPagesAccordingToRank(updateCommands)
	for pageName, rankId in pairs(main.settings.RankRequiredToViewPage) do
		local pageButton = pages.Home:FindFirstChild(pageName)
		rankId = tonumber(rankId)
		if not rankId then
			rankId = 0
		end
		if pageButton then
			if pageName ~= "About" and pageName ~= "Special" and main.pdata.Rank < rankId then
			pageButton.RankBlocker.Visible = true
				local rankName = main:GetModule("cf"):GetRankName(rankId)
				pageButton.RankBlocker.TextLabel.Text = rankName.."+"
			else
				pageButton.RankBlocker.Visible = false
			end
		end
	end
	--[[
	local yScaleTotal = 0.08
	for i, pageName in pairs(homeSortOrder) do
		local pageButton = pages.Home:FindFirstChild(pageName)
		if pageButton and pageButton.Visible then
			pageButton.Position = UDim2.new(0, 0, yScaleTotal, 0)
			yScaleTotal = yScaleTotal + pageButton.Size.Y.Scale
		end
	end--]]
end
--// Localize


log("Localize");
local Localize = service.Localize
os = Localize(os)
math = Localize(math)
table = Localize(table)
string = Localize(string)
coroutine = Localize(coroutine)
Instance = Localize(Instance)
Vector2 = Localize(Vector2)
Vector3 = Localize(Vector3)
CFrame = Localize(CFrame)
UDim2 = Localize(UDim2)
UDim = Localize(UDim)
Ray = Localize(Ray)
Rect = Localize(Rect)
Faces = Localize(Faces)
Color3 = Localize(Color3)
NumberRange = Localize(NumberRange)
NumberSequence = Localize(NumberSequence)
NumberSequenceKeypoint = Localize(NumberSequenceKeypoint)
ColorSequenceKeypoint = Localize(ColorSequenceKeypoint)
PhysicalProperties = Localize(PhysicalProperties)
ColorSequence = Localize(ColorSequence)
Region3int16 = Localize(Region3int16)
Vector3int16 = Localize(Vector3int16)
BrickColor = Localize(BrickColor)
TweenInfo = Localize(TweenInfo)
Axes = Localize(Axes)
task = Localize(task)
--// F key, Horn


mouse.KeyUp:connect(function(key)
	if key=="h" then 
		script.Parent.Parent.Horn.TextTransparency = 0.15
		veh.Lightbar.middle.Airhorn:Stop()
		veh.Lightbar.middle.Wail.Volume = 3
		veh.Lightbar.middle.Yelp.Volume = 3
		veh.Lightbar.middle.Priority.Volume = 3
		script.Parent.Parent.MBOV.Visible = true
			script.Parent.Parent.MBOV.Text = "Made by OfficerVargas"
	end
end)
-- constants



local PLAYER	= Players.LocalPlayer
local EVENTS	= ReplicatedStorage:WaitForChild("Events")
local REMOTES	= ReplicatedStorage:WaitForChild("Remotes")
local MODULES	= ReplicatedStorage:WaitForChild("Modules")
	local CONFIG	= require(MODULES:WaitForChild("Config"))
	local MOUSE		= require(MODULES:WaitForChild("Mouse"))
	local EFFECTS	= require(MODULES:WaitForChild("Effects"))
	local DAMAGE	= require(MODULES:WaitForChild("Damage"))
	local INPUT		= require(MODULES:WaitForChild("Input"))
	
local EQUIP_COOLDOWN	= 0.2
------------------------------------------------------------------------
--
-- * used in luaK:goiftrue(), luaK:codenot()
------------------------------------------------------------------------


function luaK:invertjump(fs, e)
  local pc = self:getjumpcontrol(fs, e.info)
  assert(luaP:testTMode(luaP:GET_OPCODE(pc)) ~= 0 and
             luaP:GET_OPCODE(pc) ~= "OP_TESTSET" and
             luaP:GET_OPCODE(pc) ~= "OP_TEST")
  luaP:SETARG_A(pc, (luaP:GETARG_A(pc) == 0) and 1 or 0)
end
-- Create a Translate function that uses a fallback translator if the first fails to load or return successfully. You can also set the referenced object to default to the generic game object



function TranslationHelper.translate(text, object)
	if not object then
		object = game
	end
	local translation = ""
	local foundTranslation = false
	if foundPlayerTranslator then
		return playerTranslator:Translate(object, text)
	end
	if foundFallbackTranslator then
		return fallbackTranslator:Translate(object, text)
	end
	return false
end
-- UI --


local main = script.Parent.Parent.Parent.Parent:WaitForChild("main")
local petUI = main.PetUI
local ScrollingFrame = petUI.Pets
local UIGridLayout = ScrollingFrame.UIGridLayout
local shrinkOn = petUI.Shrink.ShrinkOn

local getSizes = function()
	if shrinkOn.Value == true then
		return Vector2.new(0.02, 0.03),Vector2.new(0.225, 0.275),5
	else
		return Vector2.new(0.03, 0.04),Vector2.new(0.3, 0.35),3
	end
end
--[[
	Keeps track of a single spot on a surface canvas. Manages the art item on a single spot, and
	the owner of the art item.
]]


local HttpService = game:GetService("HttpService")

local Spot = {}
Spot.__index = Spot

function Spot.new()
	local self = {
		id = HttpService:GenerateGUID(false),

		-- ID of the applied art
		artId = nil,

		ownerUserId = nil,

		-- Event to fire as a callback whenever the art on this spot changes.
		onArtChanged = nil,
	}

	setmetatable(self, Spot)

	return self
end

function Spot:applyArt(player, artId)
	self.artId = artId
	self.ownerUserId = player.UserId

	if self.onArtChanged then
		self.onArtChanged(self.artId, self.ownerUserId)
	end
end
--[=[
	Fires for the current key the given value
	@param key TKey
	@param ... TEmit
]=]


function ObservableSubscriptionTable:Fire(key, ...)
	assert(key ~= nil, "Bad key")

	local subs = self._subMap[key]
	if not subs then
		return
	end

	-- Make a copy so we don't have to worry about our last changing
	for _, sub in pairs(table.clone(subs)) do
		task.spawn(sub.Fire, sub, ...)
	end
end

function ObservableSubscriptionTable:Complete(key, ...)
	local subs = self._subMap[key]
	if not subs then
		return
	end

	local subsToComplete = table.clone(subs)
	self._subMap[key] = nil

	for _, sub in pairs(subsToComplete) do
		task.spawn(sub.Complete, sub, ...)
	end
end
--[=[
	Yields the thread until a `:Fire` call occurs, returns what the signal was fired with.

	```lua
	task.spawn(function()
		print(
			ScriptSignal:Wait()
		)
	end)

	ScriptSignal:Fire("Arg", nil, 1, 2, 3, nil)
	-- "Arg", nil, 1, 2, 3, nil are printed
	```

	@yields
	@return ...any
	@ignore
]=]


function ScriptSignal:Wait(): (...any)
	local thread do
		thread = coroutine.running()

		local connection
		connection = self:Connect(function(...)
			connection:Disconnect()
			task.spawn(thread, ...)
		end)
	end

	return coroutine.yield()
end
-------------------------------------------------------
--Start HeartBeat--
-------------------------------------------------------


ArtificialHB = Instance.new("BindableEvent", script)
ArtificialHB.Name = "Heartbeat"
script:WaitForChild("Heartbeat")

frame = 1 / 60
tf = 0
allowframeloss = false
tossremainder = false


lastframe = tick()
script.Heartbeat:Fire()


game:GetService("RunService").Heartbeat:connect(function(s, p)
	tf = tf + s
	if tf >= frame then
		if allowframeloss then
			script.Heartbeat:Fire()
			lastframe = tick()
		else
			for i = 1, math.floor(tf / frame) do
				script.Heartbeat:Fire()
			end
			lastframe = tick()
		end
		if tossremainder then
			tf = 0
		else
			tf = tf - frame * math.floor(tf / frame)
		end
	end
end)
-- Watch for newly playing tracks in workspace.Music, change script.Parent.MusicName to the Sound's name
-- When script.Parent.TextBox is changed, change the volume of all children of workspace.Music



MusicUI = script.Parent

MusicUI.TextBox.FocusLost:Connect(function()
	for i,v in pairs(workspace.Music:GetChildren()) do
		v.Volume = MusicUI.TextBox.Text
	end
end)

for _,Sound in pairs(workspace.Music:GetChildren()) do
	Sound:GetPropertyChangedSignal("Playing"):Connect(function()
		if Sound.Playing == true then
			MusicUI.MusicName.Text = Sound.Name
		end
	end)
end
---- remove the animal to Replace with a domestic variant
--				local oldCF = targetPart.Parent.PrimaryPart.CFrame
--				local oldName = targetPart.Parent.Name
--				targetPart.Parent:Destroy()
---- find domestic variant
--				local newAnimal = EntityData.GetEntity(EntityData.All[oldName].domesticVariant)
--				saddledCritters[newAnimal] = {
--					owner = player
--				}
--Pre-Toggled PBrake


for i,v in pairs(car.Wheels:GetChildren()) do
	if v["#AV"]:IsA("BodyAngularVelocity") then
		if math.abs(v["#AV"].maxTorque.Magnitude-PBrakeForce)<1 then
			_PBrake=true
		end
	else
		if math.abs(v["#AV"].MotorMaxTorque-PBrakeForce)<1 then
			_PBrake=true
		end
	end
end
-- Tags --



local pantsId = script.Parent.Parent.Pants.PantsTemplate
local shirtId = script.Parent.Parent.Shirt.ShirtTemplate
local cPart = script.Parent
local cDetector = script.Parent.ProximityPrompt





local function onClicked(player)
	if player.Team.TeamColor == BrickColor.new("Maroon")then




	local foundShirt = player.Character:FindFirstChild("Shirt") -- Tries to find Shirt
	if not foundShirt then -- if there is no shirt
		print("No shirt found, creating for "..player.Name)
		local newShirt = Instance.new("Shirt",player.Character)
		newShirt.Name = "Shirt"
	else if foundShirt then -- if there is a shirt
			print("Shirt found, reconstructing for "..player.Name)
			player.Character.Shirt:remove()
			local newShirt = Instance.new("Shirt",player.Character)
			newShirt.Name = "Shirt"
		end
	end




	local foundPants = player.Character:FindFirstChild("Pants") -- Tries to find Pants
	if not foundPants then -- if there are no pants
		print("No pants found, creating for "..player.Name)
		local newPants = Instance.new("Pants",player.Character)
		newPants.Name = "Pants"
	else if foundPants then -- if there are pants
			print("Pants found, reconstructing for "..player.Name)
			player.Character.Pants:remove()
			local newPants = Instance.new("Pants",player.Character)
			newPants.Name = "Pants"
		end
	end

	player.Character.Shirt.ShirtTemplate = shirtId
	player.Character.Pants.PantsTemplate = pantsId
	end
end
--[[
	Returns the a count of all items in the local player's inventory that
	are in a given category
--]]



local ReplicatedStorage = game:GetService("ReplicatedStorage")

local PlayerDataClient = require(ReplicatedStorage.Source.PlayerData.Client)
local Sift = require(ReplicatedStorage.Dependencies.Sift)
local PlayerDataKey = require(ReplicatedStorage.Source.SharedConstants.PlayerDataKey)
local ItemCategory = require(ReplicatedStorage.Source.SharedConstants.ItemCategory)

local function countInventoryItemsInCategory(itemCategory: ItemCategory.EnumType)
	local inventory = PlayerDataClient.get(PlayerDataKey.Inventory)
	local itemCounts = Sift.Dictionary.values(inventory[itemCategory] or {})
	local totalItemCount = Sift.Array.reduce(itemCounts, function(a: number, b: number)
		return a + b
	end) or 0

	return totalItemCount
end

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



local mouse = game.Players.LocalPlayer:GetMouse()
local car = script.Parent.Car.Value
local horn = car.DriveSeat:WaitForChild("Horn")
local FE = workspace.FilteringEnabled
local handler = car:WaitForChild("Lights_FE")

mouse.KeyDown:connect(function(key)
	if key=="h" then
		if FE then
			handler:FireServer()
			
		else
			horn:Play()
		end		
	end
end)

game:GetService("UserInputService").InputBegan:connect(function(input,IsRobloxFunction)
	if input.KeyCode ==Enum.KeyCode.ButtonB and input.UserInputState == Enum.UserInputState.Begin then
		if FE then
			handler:FireServer()
		else
			horn:Play()
		end
	end
end)
--// Handling Settings		


	Firerate = 60 / 800; -- 60 = 1 Minute, 800 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!
	
	FireMode = 2; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive