Roblox/luau_corpus huggingface dataset:
-----------------------------------------------------------------------------------------------

local player=game.Players.LocalPlayer
local mouse=player:GetMouse()

local car = script.Parent.Parent.Car.Value
local _Tune = require(car["A-Chassis Tune"])

local gauges = script.Parent
local values = script.Parent.Parent.Values
local isOn = script.Parent.Parent.IsOn
local RPM = 0
local RPM2 = 0

gauges:WaitForChild("Tach")
gauges:WaitForChild("ln")
gauges:WaitForChild("bln")
gauges:WaitForChild("Gear")

car.DriveSeat.HeadsUpDisplay = false

local _pRPM = _Tune.PeakRPM
local _lRPM = _Tune.Redline

local currentUnits = 1
local revEnd = math.ceil(_lRPM/1000)
local BST = 0
if _Tune.Aspiration == "Single" then
BST = _Tune.Boost
end
if _Tune.Aspiration == "Double" then
BST = _Tune.Boost*2
end
if _Tune.Aspiration == "Super" then
BST = _Tune.Boost
end
-- Services
local PathfindingService = game:GetService("PathfindingService")
-- Script-readable version information.
export type Version = {
	major: number,
	minor: number,
	isRelease: boolean
}
------------------------------------------------------------------------
-- reads a long string or long comment
------------------------------------------------------------------------
function luaX:read_long_string(ls, Token, sep)
  local cont = 0
  self:save_and_next(ls)  -- skip 2nd '['
  if self:currIsNewline(ls) then  -- string starts with a newline?
    self:inclinenumber(ls)  -- skip it
  end
  while true do
    local c = ls.current
    if c == "EOZ" then
      self:lexerror(ls, Token and "unfinished long string" or
                    "unfinished long comment", "TK_EOS")
    elseif c == "[" then
      --# compatibility code start
      if self.LUA_COMPAT_LSTR then
        if self:skip_sep(ls) == sep then
          self:save_and_next(ls)  -- skip 2nd '['
          cont = cont + 1
          --# compatibility code start
          if self.LUA_COMPAT_LSTR == 1 then
            if sep == 0 then
              self:lexerror(ls, "nesting of [[...]] is deprecated", "[")
            end
          end
          --# compatibility code end
        end
      end
      --# compatibility code end
    elseif c == "]" then
      if self:skip_sep(ls) == sep then
        self:save_and_next(ls)  -- skip 2nd ']'
        --# compatibility code start
        if self.LUA_COMPAT_LSTR and self.LUA_COMPAT_LSTR == 2 then
          cont = cont - 1
          if sep == 0 and cont >= 0 then break end
        end
        --# compatibility code end
        break
      end
    elseif self:currIsNewline(ls) then
      self:save(ls, "\n")
      self:inclinenumber(ls)
      if not Token then ls.buff = "" end -- avoid wasting space
    else  -- default
      if Token then
        self:save_and_next(ls)
      else
        self:nextc(ls)
      end
    end--if c
  end--while
  if Token then
    local p = 3 + sep
    Token.seminfo = string.sub(ls.buff, p, -p)
  end
end
-- Initialize material tool
local MaterialTool = require(CoreTools.MaterialTool)
Core.AssignHotkey('N', Core.Support.Call(Core.EquipTool, MaterialTool));
Core.Dock.AddToolButton(Core.Assets.MaterialIcon, 'N', MaterialTool, 'MaterialInfo');
--the guts of the code (DO NOT TOUCH)
local function Chat(message: string, color)
	game:GetService("Chat"):Chat(NPC.Head, message, CC)
end
local function Jump()
	NPC.Humanoid.Jump = true
end
local function Move(pos: Vector3, spawn_thread)
	spawn_thread = spawn_thread or false
	NPC.Humanoid:MoveTo(pos)
	if not spawn_thread then NPC.Humanoid.MoveToFinished:Wait() end
end
local walkpoint = script.Parent.Parent.WalkPoints
local PlayersService = game:GetService("Players");
PlayersService.PlayerAdded:Connect(function(Player)
	Player.Chatted:Connect(function(Message)
		if string.find(string.lower(Message), string.lower(playerchat)) then
			wait(waittime)
--// bolekinds

local debounce = false

script.Parent.Touched:Connect(function(t)
	--local e, s = pcall(function()
	if debounce == false and game.Players:FindFirstChild(t.Parent.Name) then
		debounce = true
		local cash = 1
		if game.ServerStorage.ServerData.contract.Value == true then
			cash = cash + 3
		end
		if game.ServerStorage.ServerData.MsFloppa.Value == true then
			cash = cash + cash
		end
		if game.ServerStorage.ServerData.happy.Value > 100 then
			cash = cash + cash
		end
		if game.ServerStorage.ServerData.happy.Value < 25 then
			cash = cash/2
		end
			game.Players:FindFirstChild(t.Parent.Name).YouCash.Value += cash
		script.Parent:Destroy()
		debounce = false
		end
	--end)
end)
-- Cast Ray
castray.OnServerEvent:Connect(function(fired, ray, position)
	local beam = Instance.new("Part")
	
	beam.BrickColor = BrickColor.new("Neon orange")
	beam.FormFactor = Enum.FormFactor.Custom
	beam.Material = Enum.Material.Neon
	beam.Transparency = 0
	beam.Anchored = true
	beam.Locked = true
	beam.CanCollide = false
	beam.Parent = workspace
	
	local distance = (tool:WaitForChild("Hole").CFrame.p - position).Magnitude
	beam.Size = Vector3.new(0.1, 0.1, distance)
	beam.CFrame = CFrame.new(tool:WaitForChild("Hole").CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
	
	game:GetService("Debris"):AddItem(beam, 0.025)
end)
-- ROBLOX TODO: import jest-matcher-utils when available
-- import * as matcherUtils from 'jest-matcher-utils';
local matcherUtils = {} :: any
local JasmineUtils = require(CurrentModule.jasmineUtils)
local equals = JasmineUtils.equals
local hasProperty = JasmineUtils.hasProperty
local isA = JasmineUtils.isA
local isUndefined = JasmineUtils.isUndefined

local getState = require(CurrentModule.jestMatchersObject_extracted).getState
local Types = require(CurrentModule.types)
-- functions
script.Parent.Text = "I GOT IT!"
wait(2)
game.ReplicatedStorage.kicker:FireAllClients()
--		print("Keyframe : ".. frameName)

		local repeatAnim = currentAnim
		-- return to idle if finishing an emote
		if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
			repeatAnim = "idle"
		end
		
		local animSpeed = currentAnimSpeed
		playAnimation(repeatAnim, 0.15, Humanoid)
		setAnimationSpeed(animSpeed)
	end
end
--[[Super Util]]--
function WaitForChild(parent,...)
	local debugPrint = false
	for _, i in ipairs({...}) do
		if type(i)=='boolean' then
			debugPrint = i
		else
			while not parent:FindFirstChild(i) do  
				wait(1/30) 
				if debugPrint then
					print(script.Name..':'..parent.Name..' Waiting for '.. i)
				end
			end
			parent=parent[i]
		end
	end
	return parent
end

function ForEach(parent,func)

end

function MakeValue(class,name,value,parent)

end	

function TweenProperty(obj, propName, inita, enda, length,sentinel)

end
-- You don't need to touch anything below this line. All customisable features are above.

local fC = fontColor.Color -- converts brickcolor to color3

game.Workspace.ClientChat.OnClientEvent:connect(function(messageType, message)
	print(message)
	game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{
   		Text = ("["..messageType.."]: "..message);
		Color = fC;
    	Font = font;
    	FontSize = fontSize; 
	})
end)
-- Also listen for errors fired from the client by cloning a LocalScript
--  into StarterPlayerScripts that will fire a RemoteEvent when a clientside error occurs.
local cer = ErrorObserverClient:Clone()
cer.Parent = StarterPlayer.StarterPlayerScripts
--[[Weight and CG]]
Tune.Weight			= 4000		-- Total weight (in pounds)
Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	--[[Width]]		8.6		,
	--[[Height]]		7.9		,
	--[[Length]]		32.8	}
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
-- services

local Workspace		= game:GetService("Workspace")
local Players		= game:GetService("Players")
local RunService	= game:GetService("RunService")
local Debris		= game:GetService("Debris")
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------

function onSwimming(speed)
	if speed > 1.00 then
		local scale = 10.0
		playAnimation("swim", 0.4, Humanoid)
		setAnimationSpeed(speed / scale)
		pose = "Swimming"
	else
		playAnimation("swimidle", 0.4, Humanoid)
		pose = "Standing"
	end
end

function animateTool()
	if (toolAnim == "None") then
		playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
		return
	end

	if (toolAnim == "Slash") then
		playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end

	if (toolAnim == "Lunge") then
		playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end
end

function getToolAnim(tool)
	for _, c in ipairs(tool:GetChildren()) do
		if c.Name == "toolanim" and c.className == "StringValue" then
			return c
		end
	end
	return nil
end

local lastTick = 0

function stepAnimate(currentTime)
	local amplitude = 1
	local frequency = 1
  	local deltaTime = currentTime - lastTick
  	lastTick = currentTime

	local climbFudge = 0
	local setAngles = false

  	if (jumpAnimTime > 0) then
  		jumpAnimTime = jumpAnimTime - deltaTime
  	end

	if (pose == "FreeFall" and jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	elseif (pose == "Seated") then
		playAnimation("sit", 0.5, Humanoid)
		return
	elseif (pose == "Running") then
		playAnimation("walk", 0.2, Humanoid)
		if UserInputService.MouseBehavior == Enum.MouseBehavior.LockCenter then		
			if not wasStrafe then
				doForAllRunTracks(function(trackRec, name)
					trackRec.track:AdjustWeight(smallButNotZero, blendTime)
					trackRec.lastWeight = smallButNotZero							
				end)				
			end
			setRunSpeed(0) -- speed doesn't matter if in mouse lock mode
			wasStrafe = true
		else
			if wasStrafe then
				doForAllRunTracks(function(trackRec, name)
					trackRec.track:AdjustWeight(smallButNotZero, blendTime)
					trackRec.lastWeight = smallButNotZero							
				end)
				setRunSpeed(currentAnimSpeed)		
				wasStrafe = false
			end
		end		
	elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
		stopAllAnimations()
		amplitude = 0.1
		frequency = 1
		setAngles = true
	end

	-- Tool Animation handling
	local tool = Character:FindFirstChildOfClass("Tool")
	if tool and tool:FindFirstChild("Handle") then
		local animStringValueObject = getToolAnim(tool)

		if animStringValueObject then
			toolAnim = animStringValueObject.Value
			-- message recieved, delete StringValue
			animStringValueObject.Parent = nil
			toolAnimTime = currentTime + .3
		end

		if currentTime > toolAnimTime then
			toolAnimTime = 0
			toolAnim = "None"
		end

		animateTool()		
	else
		stopToolAnimations()
		toolAnim = "None"
		toolAnimInstance = nil
		toolAnimTime = 0
	end
end
-- Mimic roblox menu when opened and closed
guiService.MenuClosed:Connect(function()
	menuOpen = false
	if not IconController.controllerModeEnabled then
		IconController.setTopbarEnabled(IconController.topbarEnabled,false)
	end
end)
guiService.MenuOpened:Connect(function()
	menuOpen = true
	IconController.setTopbarEnabled(false,false)
end)
--// # key, Priority
mouse.KeyDown:connect(function(key)
	if key=="y" then 
		if veh.Lightbar.middle.Priority.IsPlaying == true then
		veh.Lightbar.middle.Wail:Stop()
		veh.Lightbar.middle.Yelp:Stop()
		veh.Lightbar.middle.Priority:Stop()
		script.Parent.Parent.Sirens.Priority.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		else
		veh.Lightbar.middle.Wail:Stop()
		veh.Lightbar.middle.Yelp:Stop()
		veh.Lightbar.middle.Priority:Play()
		script.Parent.Parent.Sirens.Priority.BackgroundColor3 = Color3.fromRGB(215, 135, 110)
		script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		script.Parent.Parent.Sirens.Yelp.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		end
	end
end)
--[[**
	ensures all values in given table pass check

	@param check The function to use to check the values

	@returns A function that will return true iff the condition is passed
**--]]
function t.values(check)
	assert(t.callback(check))
	return function(value)
		local tableSuccess, tableErrMsg = t.table(value)
		if tableSuccess == false then
			return false, tableErrMsg or ""
		end

		for key, val in pairs(value) do
			local success, errMsg = check(val)
			if success == false then
				return false, string.format("bad value for key %s:\n\t%s", tostring(key), errMsg or "")
			end
		end

		return true
	end
end
------------------------------------------------------------------------
-- Attempt to convert a number by translating '.' decimal points to
-- the decimal point character used by the current locale. This is not
-- needed in Yueliang as Lua's tonumber() is already locale-aware.
-- Instead, the code is here in case the user implements localeconv().
------------------------------------------------------------------------
function luaX:trydecpoint(ls, Token)
  -- format error: try to update decimal point separator
  local old = ls.decpoint
  -- translate the following to Lua if you implement localeconv():
  -- struct lconv *cv = localeconv();
  -- ls->decpoint = (cv ? cv->decimal_point[0] : '.');
  self:buffreplace(ls, old, ls.decpoint)  -- try updated decimal separator
  local seminfo = self:str2d(ls.buff)
  Token.seminfo = seminfo
  if not seminfo then
    -- format error with correct decimal point: no more options
    self:buffreplace(ls, ls.decpoint, ".")  -- undo change (for error message)
    self:lexerror(ls, "malformed number", "TK_NUMBER")
  end
end
--Similar to assert but warns instead of errors.
local function assertwarn(requirement: boolean, messageIfNotMet: string)
	if requirement == false then
		warn(messageIfNotMet)
	end
end
--		print(animName .. " " .. idx .. " [" .. origRoll .. "]")
	local anim = animTable[animName][idx].anim

	-- switch animation		
	if (anim ~= currentAnimInstance) then
		
		if (currentAnimTrack ~= nil) then
			currentAnimTrack:Stop(transitionTime)
			currentAnimTrack:Destroy()
		end

		currentAnimSpeed = 1.0
	
		-- load it to the humanoid; get AnimationTrack
		currentAnimTrack = humanoid:LoadAnimation(anim)
		currentAnimTrack.Priority = Enum.AnimationPriority.Core
		 
		-- play the animation
		currentAnimTrack:Play(transitionTime)
		currentAnim = animName
		currentAnimInstance = anim

		-- set up keyframe name triggers
		if (currentAnimKeyframeHandler ~= nil) then
			currentAnimKeyframeHandler:disconnect()
		end
		currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
		
	end

end
--[[
    Modifies a product or asset type (typically from its enum value) into
    something suitable to be displayed on screen:
    - With CamelCase words separated by spaces
    - With the word "Accessory" brought to the beginning, if present (this is to
      mirror the behavior in the Roblox catalog)
]]
local formatProductTypeString = function(input: string)
	local output = string.gsub(input, "(.)(%u)", "%1 %2")
	output = string.gsub(output, "(.*) Accessory", "Accessory | %1")
	output = string.gsub(output, "T Shirt", "T-Shirt")
	return output
end

return formatProductTypeString
-- Roblox User Input Control Modules - each returns a new() constructor function used to create controllers as needed
local Keyboard = require(script:WaitForChild("Keyboard"))
local Gamepad = require(script:WaitForChild("Gamepad"))
local DynamicThumbstick = require(script:WaitForChild("DynamicThumbstick"))

local FFlagUserMakeThumbstickDynamic do
	local success, value = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserMakeThumbstickDynamic")
	end)
	FFlagUserMakeThumbstickDynamic = success and value
end

local TouchThumbstick = FFlagUserMakeThumbstickDynamic and DynamicThumbstick or require(script:WaitForChild("TouchThumbstick"))
--FIRST DOOR
local LMLOP = script.Parent.Door1.Left.LockMechanisms.LM.CFrame
local LMLTGP = script.Parent.Door1.Left.LockMechanisms.LMToGo.CFrame
local RMLOP = script.Parent.Door1.Right.LockMechanisms.LM.CFrame
local RMLTGP = script.Parent.Door1.Right.LockMechanisms.LMToGo.CFrame
local LDOP = script.Parent.Door1.Left.LeftDoor.CFrame
local LDTGP = script.Parent.Door1.Left.ToGoPos.CFrame
local RDOP = script.Parent.Door1.Right.RightDoor.CFrame
local RDTGP = script.Parent.Door1.Right.ToGoPos.CFrame
--[[
	Create a copy of a list doing a combination filter and map.

	If callback returns nil for any item, it is considered filtered from the
	list. Any other value is considered the result of the 'map' operation.
]]
local function filterMap(list, callback)
	local new = {}
	local index = 1

	for i = 1, #list do
		local result = callback(list[i], i)

		if result ~= nil then
			new[index] = result
			index = index + 1
		end
	end

	return new
end

return filterMap
-- wrapping long conditional in function
local function isShiftLockMode()
	return LocalPlayer.DevEnableMouseLock and GameSettings.ControlMode == Enum.ControlMode.MouseLockSwitch and
			LocalPlayer.DevComputerMovementMode ~= Enum.DevComputerMovementMode.ClickToMove and
			GameSettings.ComputerMovementMode ~= Enum.ComputerMovementMode.ClickToMove and
			LocalPlayer.DevComputerMovementMode ~= Enum.DevComputerMovementMode.Scriptable
end

if not UserInputService.TouchEnabled then	-- TODO: Remove when safe on mobile
	IsShiftLockMode = isShiftLockMode()
end
-- put this script in the workspace not the model you want to regen, if you want a regen script that doesn't have a message when it regens delete the lines with a * after them
model = game.Workspace.Lime-BiPlane --Change "MyModelName" To the name of the model you want to regen
 



backup = model:clone() 

while true do 
wait(50) --Change to how long you want in between regenerations 

 
model:remove() 

 
model = backup:clone() 
model.Parent = game.Workspace 
model:makeJoints() 

end
-- Note, arguments do not match the new math.clamp
-- Eventually we will replace these calls with math.clamp, but right now
-- this is safer as math.clamp is not tolerant of min>max
function CameraUtils.Clamp(low, high, val)
	return math.min(math.max(val, low), high)
end
--[[ EDIT STAND STUFF ]]--

local EditStandFrame = script.Parent.Frame.EditStand
local DefaultButton = EditStandFrame.Default
local OneThousandButton = EditStandFrame.OneThousand
local TenThousandButton = EditStandFrame.TenThousand
local OneHundredThousandButton = EditStandFrame.OneHundredThousand

local AdminButton = EditStandFrame.AdminStand

for _, AdminName in ipairs(AdminNames) do
	if AdminName:lower() == player.Name:lower() then
		AdminButton.Visible = true
		AdminButton.Active = true
	end
end


local GetDataEvent = game.ReplicatedStorage.Events.GetDataEvent
local ChangeTheme = game.ReplicatedStorage.Events.StandEvents.ChangeTheme

local EditPrompt = nil
local Booth = nil

DefaultButton.Activated:Connect(function(plr) -- DEFAULT BUTTON 0 POINTS NEEDED
	ChangeTheme:FireServer(player, "default", 0)	-- fire server event here
	-- send noti saying completed
end)

OneThousandButton.Activated:Connect(function(plr) -- ONE THOUSAND BUTTON 1,000 DONATIONS NEEDED
	--GetDataEvent:FireServer(player.UserId, "Donated", 1)
	--GetDataEvent.OnClientEvent:Connect(function(value, button)
	--	if value >= 1000 and button == 1 then
			ChangeTheme:FireServer(player, "onethousand", 1000)
			-- do stuff
		--else
		--end
	-- how can we check to see if they are able to change booth color
	-- send a noti to player they need more points or if successfull
	-- send sound error or complete
	-- fire server event here if completed
end)

TenThousandButton.Activated:Connect(function(plr) -- TEN THOUSAND BUTTON 10,000 DONATIONS NEEDED
	--GetDataEvent:FireServer(player.UserId, "Donated", 2)	
	--GetDataEvent.OnClientEvent:Connect(function(value, button)
		--if value >= 10000 and button == 2 then
			ChangeTheme:FireServer(player, "tenthousand", 10000)
			-- do stuff
		--else
	--	--end
	--end)
	-- how can we check to see if they are able to change booth color
	-- send a noti to player they need more points or if successfull
	-- send sound error or complete
	-- fire server event here if completed
end)

OneHundredThousandButton.Activated:Connect(function(plr) -- ONEHUNDRED THOUSAND BUTTON 100,000 DONATIONS NEEDED
	--GetDataEvent:FireServer(player.UserId, "Donated", 3)	
	--GetDataEvent.OnClientEvent:Connect(function(value, button)
	--	if value >= 100000 and button == 3 then
			ChangeTheme:FireServer(player, "onehundredthousand", 100000)
			-- do stuff
	--	else

	--	end
	--end)
	-- how can we check to see if they are able to change booth color
	-- send a noti to player they need more points or if successfull
	-- send sound error or complete
	-- fire server event here if completed
end)

AdminButton.Activated:Connect(function()
	for _, AdminName in ipairs(AdminNames) do
		if AdminName:lower() == player.Name:lower() then
			ChangeTheme:FireServer(player, "admin", 0)
		end
	end
end)
-- Libraries
Region = require(Tool.Libraries.Region)
Signal = require(Tool.Libraries.Signal)
Support = require(Tool.Libraries.SupportLibrary)
Cheer = require(Tool.Libraries.Cheer)
Try = require(Tool.Libraries.Try)
Make = require(Tool.Libraries.Make)
local Roact = require(Tool.Vendor:WaitForChild 'Roact')
local Maid = require(Tool.Libraries:WaitForChild 'Maid')
-------------------LIGHTCONTROLS------------------- 
				if(key == "l") and (on == true) and (plane:findFirstChild("Lights") ~= nil) 
					and(light == true) then
					local lm = plane.Lights
					local val = plane.Values.Light
					if(val.Value == false) then
						for i,v in pairs(lm:GetChildren()) do 
							if(v.Name == "Posli") then 
								v.Gui.Enabled = true
							elseif(v.Name == "Flali") then 
									lm:findFirstChild("FlashScript").Disabled = false
								end
							end
						val.Value = true
						elseif(val.Value == true) then 
						for i,v in pairs(lm:GetChildren()) do 
						if(v.Name == "Posli") then
							v.Gui.Enabled = false
						elseif(v.Name == "Flali") then
							lm:findFirstChild("FlashScript").Disabled = true 
							v.Gui.Enabled = false
						end
						end
						val.Value = false
					end
				end
--// Bullet Physics
	BulletPhysics = Vector3.new(0,0,0); -- Drop fixation: Lower number = more drop
	BulletSpeed = 10000; -- Bullet Speed
	BulletSpread = 1; -- How much spread the bullet has
	
	ExploPhysics = Vector3.new(0,0,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)