Pinkstack/roblox-luau-corpus-text huggingface dataset:
--------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.defaultlights.Value)
game.Workspace.doorleft.l61.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l53.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l72.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l62.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l51.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l21.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l31.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l12.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l13.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l32.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l23.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l42.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)

game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
--[=[
	@param name string
	@param inboundMiddleware ServerMiddleware?
	@param outboundMiddleware ServerMiddleware?
	@return RemoteSignal

	Creates a signal that can be used to fire data to the clients
	or receive data from the clients.

	```lua
	local mySignal = serverComm:CreateSignal("MySignal")

	-- Examples of firing in different ways (see docs for RemoteSignal for further info):
	mySignal:Fire(somePlayer, "Hello world")
	mySignal:FireAll("Hi there")
	mySignal:FireExcept(somePlayer, "Hello everyone except " .. somePlayer.Name)
	mySignal:FireFilter(function(player) return player.Team == someCoolTeam end, "Hello cool team")

	-- Example of listening for clients to send data:
	mySignal:Connect(function(player, message)
		print("Got a message from " .. player.Name .. ":", message)
	end)
	```
]=]


function ServerComm:CreateSignal(name: string, inboundMiddleware: Types.ServerMiddleware?, outboundMiddleware: Types.ServerMiddleware?)
	return Comm.CreateSignal(self._instancesFolder, name, inboundMiddleware, outboundMiddleware)
end
--For R15 avatars


Animations = {
	R15Slash = 522635514,
	R15Lunge = 522638767
}

Damage = DamageValues.BaseDamage

Sounds = {
	Slash = Handle:WaitForChild("SwordSlash"),
	Lunge = Handle:WaitForChild("SwordLunge"),
	Unsheath = Handle:WaitForChild("Unsheath")
}

ToolEquipped = false
--------------------------------------------------------------------------------



local Tooltip = {}

function Tooltip:Set(Text: string)
	ChangeId += 1
	
	Frame:WaitForChild("TextLabel").Text = Text
	Frame.GroupTransparency = 1
	Frame.Visible = true
	Tween:Play(Frame, {0.3, "Exponential"}, {GroupTransparency = 0})
	Tween:Play(Frame:WaitForChild("UIStroke"), {0.3, "Exponential"}, {Transparency = 0})
end

function Tooltip:Clear()
	local Id = ChangeId
	
	Tween:Play(Frame:WaitForChild("UIStroke"), {0.3, "Exponential"}, {Transparency = 1})
	Tween:Play(Frame, {0.3, "Exponential"}, {GroupTransparency = 1}).Completed:Once(function()
		if ChangeId == Id then
			Frame.Visible = false
		end
	end)
end

local function GetTooltipPosition(): UDim2
	local MouseLocation = UserInputService:GetMouseLocation()
	local ViewportSize = workspace.CurrentCamera.ViewportSize
	local TooltipSize = Frame:WaitForChild("TextLabel").AbsoluteSize
	
	return UDim2.fromOffset(
		math.clamp(MouseLocation.X + 16, 0, ViewportSize.X - (TooltipSize.X+24)),
		math.clamp(MouseLocation.Y + 16, 0, ViewportSize.Y - (TooltipSize.Y+24))
	)
end
--------------------------CHARACTER CONTROL-------------------------------


local CurrentIgnoreList

local function GetCharacter()
	return Player and Player.Character
end

local function GetTorso()
	local humanoid = findPlayerHumanoid(Player)
	return humanoid and humanoid.RootPart
end

local function getIgnoreList()
	if CurrentIgnoreList then
		return CurrentIgnoreList
	end
	CurrentIgnoreList = {}
	table.insert(CurrentIgnoreList, GetCharacter())
	return CurrentIgnoreList
end
--//R//--


if script.Parent.Gear.Value == -1 then
if carSeat.Throttle == 1 then
carSeat.Parent.Parent.RFW.VS.Throttle = -1
carSeat.Parent.Parent.LFW.VS.Throttle = -1
carSeat.Parent.Parent.RRW.VS.Throttle = -1
carSeat.Parent.Parent.LRW.VS.Throttle = -1	
carSeat.Parent.Parent.RFW.VS.MaxSpeed = 20
carSeat.Parent.Parent.LFW.VS.MaxSpeed = 20
carSeat.Parent.Parent.RRW.VS.MaxSpeed = 20
carSeat.Parent.Parent.LRW.VS.MaxSpeed = 20
else
carSeat.Parent.Parent.RFW.VS.Throttle = 0
carSeat.Parent.Parent.LFW.VS.Throttle = 0
carSeat.Parent.Parent.RRW.VS.Throttle = 0
carSeat.Parent.Parent.LRW.VS.Throttle = 0
carSeat.Parent.Parent.RFW.VS.MaxSpeed = 20
carSeat.Parent.Parent.LFW.VS.MaxSpeed = 20
carSeat.Parent.Parent.RRW.VS.MaxSpeed = 20
carSeat.Parent.Parent.LRW.VS.MaxSpeed = 20
end
	

if carSeat.Throttle == 1 then	
carSeat.Parent.Parent.RRW.VS.Torque = tq.Value/2
carSeat.Parent.Parent.RFW.VS.Torque = tq.Value*2.4
carSeat.Parent.Parent.LRW.VS.Torque = tq.Value/2
carSeat.Parent.Parent.LFW.VS.Torque = tq.Value*2.4
elseif carSeat.Throttle == 0 and carSeat.Steer == 0 then
carSeat.Parent.Parent.RRW.VS.Torque = cst.Value
carSeat.Parent.Parent.RFW.VS.Torque = cst.Value
carSeat.Parent.Parent.LRW.VS.Torque = cst.Value
carSeat.Parent.Parent.LFW.VS.Torque = cst.Value
	end
end
--Let the world load before starting


wait(1)


function Render(Character)

	ViewPort:ClearAllChildren()
	--Render the character
	local Char = instance("Model")
		Char.Name = ""
		Char.Parent = ViewPort
	RenderHumanoid(Character,Char)
end



function module:MakeDupe (Character, V)
	--Handle changes 
	-- These cause disapear
	--Character.DescendantAdded:Connect(Render)
	--Character.DescendantRemoving:Connect(Render)
	
	--Initialize
	
	if (V) then
		ViewPort = V;
		ViewPort.CurrentCamera = Camera;
	end
	
	Render(Character);
	
	local CameraUpdater = RunService.Heartbeat:Connect(function()
		Character = Player.Character;
		if Character:FindFirstChild("HumanoidRootPart") then
			Camera.CFrame =  cf(Character.HumanoidRootPart.CFrame:toWorldSpace(Offset).p, Character.HumanoidRootPart.CFrame.p)
		end
	end)
	
end

return module;
--Handles behaviours


local function characterTouchedBrick(partTouched)
	local behaviours = partTouched:FindFirstChild("Behaviours")
	if behaviours ~= nil then
		behaviours = behaviours:GetChildren()
		for i = 1, #behaviours do
			if behaviours[i].Value == true then
				game.ReplicatedStorage.RemoteEvents.ExecuteBehaviour:FireServer(player.Character, partTouched, behaviours[i].Name)
			end
		end
	end
end
--



run_service.RenderStepped:Connect(function()
	tween_service:Create(bound, info, {Position = UDim2.new(.5, mouse.X / 40, .1,  mouse.Y / 8)}):Play()
end)

frame.MouseEnter:Connect(function()
	inui = true 
end)
	
frame.MouseLeave:Connect(function()
	inui = false 
end)
--[[

Dax,

See the MeleeScript.

]]



local canmelee = true;
local tool = script.Parent;

function onKeyDown(key)
	key:lower();
	if key == "v" then
		if canmelee == false then
			return;
		end

		tool.Melee:play()

		canmelee = false;

		local rgrip = tool.Parent["Right Arm"].RightGrip;

		script.melee.Value = true;

		for i = 1,6 do
			rgrip.C1 = rgrip.C1 * CFrame.fromEulerAnglesXYZ(-0.55,0,0);
			wait();
		end

		wait(0.25);

		for i = 1, 6 do
			rgrip.C1 = rgrip.C1 * CFrame.fromEulerAnglesXYZ(0.55,0,0);
			wait();
		end

		script.melee.Value = false;

		wait(0.5);

		canmelee = true;
	end
end

function onSelect(mouse)
	mouse.KeyDown:connect(onKeyDown);
end


function blow(hit)
	local humanoid = hit.Parent:findFirstChild("Humanoid")
	if not humanoid then return end
	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)
	local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
	if humanoid ~= hum and hum ~= nil and game.Players:playerFromCharacter(humanoid.Parent) and game.Players:playerFromCharacter(humanoid.Parent).TeamColor~=cc then
		tagHumanoid(humanoid, vPlayer)
		humanoid:TakeDamage(300)
		wait(1)
		untagHumanoid(humanoid)
	end
end


tool.Equipped:connect(onSelect);
--Activate Function


tool.Activated:connect(function()
	--Activate Function 1
	if not debounce then
		debounce = true
		tool.TimeStopSFX.Playing = true
		tool.TimeStop.Playing = true
		color.Enabled = true
		wait(5)
		tool.TimeResumeSFX.Playing = true
		wait(0.5)
		tool.TimeResume.Playing = true
		wait(1.5)
		color.Enabled = false
		debounce = false
		wait(5)
		debounce = true
	end
end)
--[[Weight and CG]]


	Tune.Weight			= 1500		-- 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		= 100		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= 1		-- 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
--DO NOT DELETE, THIS WILL BREAK THE GUN



function Stick(x, y)
	local W = Instance.new("Weld")
	W.Part0 = x
	W.Part1 = y
	local CJ = CFrame.new(x.Position)
	local C0 = x.CFrame:inverse()*CJ
	local C1 = y.CFrame:inverse()*CJ
	W.C0 = C0
	W.C1 = C1
	W.Parent = x
end

function Get(A)
	if A.ClassName == ("Part") then
		Stick(script.Parent.Handle, A)
		--A.Anchored = false
	else
		local C = A:GetChildren()
		for i=1, #C do
		Get(C[i])
		end
	end
end

function Finale()
	Get(script.Parent)
end

script.Parent.Equipped:connect(Finale)
script.Parent.Unequipped:connect(Finale)
Finale()
--[[
By AxisAngle, (Trey Reynolds)
Documentation
http://www.roblox.com/item.aspx?id=227509468

Region constructors:
	Region Region.new(CFrame RegionCFrame, Vector3 RegionSize)
		>Returns a new Region object

	Region Region.FromPart(Instance Part)
		>Returns a new Region objects


Region methods:
	table Region:Cast([Instance or table Ignore])
		>Returns all parts in the Region, ignoring the Ignore

	bool Region:CastPart(Instance Part)
		>Returns true if Part is within Region, false otherwise

	table Region:CastParts(table Parts)
		>Returns a table of all parts within the region

	bool Region:CastPoint(Vector3 Point)
		>Returns true if Point intersects Region, false otherwise

	bool Region:CastSphere(Vector3 SphereCenter, number SphereRadius)
		>Returns true if Sphere intersects Region, false otherwise

	bool Region:CastBox(CFrame BoxCFrame, Vector3 BoxSize)
		>Returns true if Box intersects Region, false otherwise



Region properties: (Regions are mutable)
	CFrame	CFrame
	Vector3	Size
	Region3	Region3



Region functions:
	Region3 Region.Region3BoundingBox(CFrame BoxCFrame, Vector3 BoxSize)
		>Returns the enclosing boundingbox of Box

	table Region.FindAllPartsInRegion3(Region3 Region3, [Instance or table Ignore])
		>Returns all parts within a Region3 of any size

	bool Region.BoxPointCollision(CFrame BoxCFrame, Vector3 BoxSize, Vector3 Point)
		>Returns true if the Point is intersecting the Box, false otherwise

	bool Region.BoxSphereCollision(CFrame BoxCFrame, Vector3 BoxSize, Vector3 SphereCenter, number SphereRadius)
		>Returns true if the Sphere is intersecting the Box, false otherwise

	bool Region.BoxCollision(CFrame Box0CFrame, Vector3 Box0Size, CFrame Box1CFrame, Vector3 Box1Size, [bool AssumeTrue])
		>Returns true if the boxes are intersecting, false otherwise
		If AssumeTrue is left blank, it does the full check to see if Box0 is intersecting Box1
		If AssumeTrue is true, it skips the heavy check and assumes that any part that could possibly be in the Region is
		If AssumeTrue is false, it skips the heavy check and assumes that any part that could possible be outside the Region is
	
	bool Region.CastPoint(Vector3 Point, [Instance or table Ignore])
		>Returns true if the point intersects a part, false otherwise
]]



local Region={}



local BoxPointCollision do
	local VecDiv=CFrame.new().pointToObjectSpace--Right Division, yo.
	function BoxPointCollision(CFrame,Size,Point)
		local Relative	=VecDiv(CFrame, Point)
		local sx,sy,sz	=Size.x/2,Size.y/2,Size.z/2
		local rx,ry,rz	=Relative.x,Relative.y,Relative.z
		return			rx*rx<sx*sx and ry*ry<sy*sy and rz*rz<sz*sz
	end
end



local BoxSphereCollision do
	local VecDiv=CFrame.new().pointToObjectSpace--Right Division, yo.
	function BoxSphereCollision(CFrame,Size,Center,Radius)
		local Relative	=VecDiv(CFrame,Center)
		local sx,sy,sz	=Size.x/2,Size.y/2,Size.z/2
		local rx,ry,rz	=Relative.x,Relative.y,Relative.z
		local dx		=rx>sx and rx-sx--Faster than if statement
						or rx<-sx and rx+sx
						or 0
		local dy		=ry>sy and ry-sy
						or ry<-sy and ry+sy
						or 0
		local dz		=rz>sz and rz-sz
						or rz<-sz and rz+sz
						or 0
		return dx*dx+dy*dy+dz*dz<Radius*Radius
	end
end
-- Remote Functions Client -> Server


	-- Getters
		RF_getPlayerData.OnServerInvoke = function(player)
			local cahced = database.GetCachedProfile(player.UserId) 
			return cahced
		end
		RF_vehicleSpawnRequest.OnServerInvoke = function(player) return vehicles.SpawnPlayerVehicle(player, 1) end
		RF_vehicleRemoveRequest.OnServerInvoke = function(player) return vehicles.RemovePlayerVehicle(player) end
		RF_redeemCode.OnServerInvoke = function(player, code) return twitter.RedeemCode(player, code)  end
		
		-- Weapons
		RF_GetUnlockedWeapons.OnServerInvoke = function(player) return weapons.GetUnlockedWeapons(player)  end
		RF_GetWeaponInfo.OnServerInvoke = function(player, weaponID) return weapons.GetWeaponInfo(player, weaponID) end
		RF_GetEquipedWeapon.OnServerInvoke = function(player) return weapons.GetEquipedWeapon(player) end
		
		RF_EquipWeapon.OnServerInvoke = function(player,weaponID) return weapons.EquipWeapon(player, weaponID) end
		RF_UnEquipWeapon.OnServerInvoke = function(player) return weapons.UnEquipWeapon(player) end
		RF_BuyWeapon.OnServerInvoke = function(player, weaponID) return weapons.BuyWeapon(player, weaponID) end
		-- Bullet
		RF_DamageVehicle.OnServerInvoke = function(player, bullet, hitVehicle) return damageReplicator.ApplyDamageToVehicle(bullet,hitVehicle) end
-- stops all playin anims


module.stopalltracks = function(hum, fold)
	local AnimationTracks = hum:GetPlayingAnimationTracks()
	local Fold =  fold
	
	local tab = {}
	
	if Fold then
		
		--
		for i, track in pairs (Fold:GetDescendants()) do
			if track:IsA('Animation') then
				tab[track.Name] = track.Name
				--table.insert(tab, track.Name)
			end
		end
		
		--print(tab)
		-- action
		for i, v in pairs(hum.Animator:GetPlayingAnimationTracks()) do
			if Fold:FindFirstChild(v.Name) and v.Name == Fold:FindFirstChild(v.Name).Name then
				v:Stop()
				--print("Fold found match: ",v," Table found ->", tab[v])
			end
		end
		
	else
		for i, track in pairs (AnimationTracks) do
			track:Stop()
		end
	end
	

end

module.StopAnim = function(hum,name)
	for i, v in pairs(hum.Animator:GetPlayingAnimationTracks()) do
		if v.Name == name then
			v:Stop()
		end
	end
end

module.LoadTrack = function(hum, anim)
	local animationTrack
	if hum:FindFirstChild("Animator") then
		animationTrack = hum.Animator:LoadAnimation(anim)
	else
		animationTrack = hum:LoadAnimation(anim)
	end
	
	--animationTrack:Play()


	return animationTrack
end

module.play = function(hum, anim)
	local char = hum.Parent
	
	local animationTrack = hum.Animator:LoadAnimation(anim)
	animationTrack:Play()
	
	
	return animationTrack
	
end
--[[
	Manually respawns characters when they die, used because
	Players.CharacterAutoLoads is false so that we can wait to spawn the character
	until their data is fully loaded.
--]]



local Players = game:GetService("Players")
local ServerStorage = game:GetService("ServerStorage")

local PlayerObjectsContainer = require(ServerStorage.Source.PlayerObjectsContainer)

local CharacterSpawner = {}

function CharacterSpawner.onPlayerAdded(player: Player)
	local characterLoadedWrapper = PlayerObjectsContainer.getCharacterLoadedWrapper(player)
	task.spawn(function()
		while player:IsDescendantOf(Players) do
			player:LoadCharacter()
			characterLoadedWrapper.died:Wait()
		end
	end)
end

return CharacterSpawner
--[=[
	Connects a handler to a ScriptSignal object.

	```lua
	ScriptSignal:Connect(function(text)
		print(text)
	end)

	ScriptSignal:Fire("Something")
	ScriptSignal:Fire("Something else")

	-- "Something" and then "Something else" are printed
	```

	@param handler (...: any) -> ()
	@return ScriptConnection
	@ignore
]=]


function ScriptSignal:Connect(
	handler: (...any) -> ()
): ScriptConnection

	assert(
		typeof(handler) == 'function',
		"Must be function"
	)

	if self._active ~= true then
		return setmetatable({
			Connected = false,
			_node = nil
		}, ScriptConnection)
	end

	local _head: ScriptConnectionNode? = self._head

	local node: ScriptConnectionNode = {
		_signal = self :: Class,
		_connection = nil,
		_handler = handler,

		_next = _head,
		_prev = nil
	}

	if _head ~= nil then
		_head._prev = node
	end

	self._head = node

	local connection = setmetatable({
		Connected = true,
		_node = node
	}, ScriptConnection)

	node._connection = connection

	return connection :: ScriptConnection
end
-- So in the example above, the door will move thirty times, with a distance of 0.1 every 0.01 seconds.
-- Feel free to mess around with values to try and get the door moving as smoothly as possible.
-- Remember, if the door is say 3 studs wide, you will have to move it 3 studs, like in the example above 0.1 x 30 = 3


	
		wait(1) -- How long the door will remain open

		for i=1, 30 do
				p.CFrame = p.CFrame + Vector3.new(0, 0, -0.1)
				wait(.01) 
				end
-- productKey = "<Player.UserId>_<Number<PurchaseId>>"


local function processReceipt(receiptInfo: receiptInfo)
	local playerProductKey, purchased = `{receiptInfo.PlayerId}_{receiptInfo.PurchaseId}`, false
	local success, errorMessage

	success, errorMessage = pcall(function()
		purchased = purchaseHistoryStore:GetAsync(playerProductKey)
	end)

	assert(success, `Data store error: {errorMessage}`)

	if success and purchased then
		return Enum.ProductPurchaseDecision.PurchaseGranted
	end
	
	local success, isPurchaseRecorded = pcall(function()
		return purchaseHistoryStore:UpdateAsync(playerProductKey, function(alreadyPurchased): boolean?
			if alreadyPurchased then return true end

			local player = Players:GetPlayerByUserId(receiptInfo.PlayerId)
			if not player then return end

			local success, result = pcall(
				Functions.products[receiptInfo.ProductId], 
				receiptInfo, 
				player
			)

			assert((success and result), `Failed to process a product purchase for ProductId: {receiptInfo.ProductId} Player: {player} Error: {result}`)

			return true
		end)
	end)

	assert(success, 'Failed to process receipt due to data store error.')

	if isPurchaseRecorded then
		return Enum.ProductPurchaseDecision.PurchaseGranted
	end
	return Enum.ProductPurchaseDecision.NotProcessedYet
end

MarketplaceService.ProcessReceipt = processReceipt

return module
---SG Is  Here---
---Please Dont Change Anything Can Dont Work If You Change--



local Part = script.Parent
Part.Touched:Connect(function(HIT)
	local H = HIT.Parent:FindFirstChild("Humanoid")	
	if H then
		local player = game.Players:GetPlayerFromCharacter(HIT.Parent)	
if player then
	local leaderstats = player:WaitForChild("leaderstats")
	local Currency = leaderstats:WaitForChild("Coins")
	local Selling = leaderstats:WaitForChild("Clicks") 
		if Selling.Value > 0 then
			Currency.Value = Currency.Value + Selling.Value
			Selling.Value = 0
		end
end
end
end)
-------------------------


 
mouse.KeyDown:connect(function (key)
    key = string.lower(key)
        if key == "a" then
            	a = true
        elseif key == "d" then
                d = true
        elseif key == "w" then
                w = true
                rwd.Throttle = 1
				rwd.Torque = tq
				lwd.Throttle = 1
				lwd.Torque = ftq
				rrwd.Throttle = 1
				rrwd.Torque = ftq
				rwd.MaxSpeed = 210
				lwd.MaxSpeed = 210
				rrwd.MaxSpeed = 210
                carSeat.Throttle = 1
                carSeat.Torque = 0
                elseif key == "s" then
                s = true    
                carSeat.Throttle = 0
                carSeat.Torque = 0
				rwd.Throttle = -1
				rwd.Torque = brk
				lwd.Throttle = -1
				lwd.Torque = brk
				rrwd.Throttle = -1
				rrwd.Torque = brk
				rwd.MaxSpeed = 25
				lwd.MaxSpeed = 25
				rrwd.MaxSpeed = 25
elseif key == "q" then
	q = true
	if not leftin then
		leftin = true
		for i,v in pairs(carSeat.Parent:GetChildren()) do
			coroutine.resume(coroutine.create(function()
				if v.Name == "LeftIndicator" then
					while leftin do
						script.Parent:WaitForChild("TickTock").Pitch = .8
						script.Parent.TickTock:Play()
						v.PointLight.Enabled = false
						v.BillboardGui.Enabled = false
						wait(0.5)
						script.Parent.TickTock.Pitch = .7
						script.Parent.TickTock:Play()
						v.BillboardGui.Enabled = true
						v.PointLight.Enabled = true
						wait(0.5)
					end
					v.PointLight.Enabled = false
					v.BillboardGui.Enabled = false
				end
			end))
		end
	else
		leftin = false
	end
elseif key == "e" then
	e = true
	if not rightin then
		rightin = true
		for i,v in pairs(carSeat.Parent:GetChildren()) do
			coroutine.resume(coroutine.create(function()
				if v.Name == "RightIndicator" then
					while rightin do
						script.Parent:WaitForChild("TickTock").Pitch = .8
						script.Parent.TickTock:Play()
						v.PointLight.Enabled = false
						v.BillboardGui.Enabled = false
						wait(0.5)
						script.Parent.TickTock.Pitch = .7
						script.Parent.TickTock:Play()
						v.BillboardGui.Enabled = true
						v.PointLight.Enabled = true
						wait(0.5)
					end
					v.PointLight.Enabled = false
					v.BillboardGui.Enabled = false
				end
			end))
		end
	else
		rightin = false
	    end
	end
end)
 
mouse.KeyUp:connect(function (key)
    key = string.lower(key)
        if key == "a" then
                print("a up")
                if d == false then
                m.DesiredAngle = 0
                        n.DesiredAngle = m.DesiredAngle
                end
        elseif key == "d" then
                print("d up")
                if a == false then
                m.DesiredAngle = 0
                        n.DesiredAngle = m.DesiredAngle
end
        end
        a = false
        d = false
end)
 
mouse.KeyUp:connect(function (key)
    key = string.lower(key)
if key == "w" or key == "s" then
        rwd.Throttle = 0
        rwd.Torque = 0
	    lwd.Throttle = 0
		lwd.Torque = 0
		rrwd.Throttle = 0
		rrwd.Torque = 0

       carSeat.Throttle = 0
carSeat.Torque = cst
        end
end)   
               
 
 
limitButton.MouseButton1Click:connect(function()