Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[**
	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 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
-- find player's head pos



	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)

	local head = vCharacter:findFirstChild("Head")
	if head == nil then return end

	Tool.Handle.Fire:Play()

	local launch = head.Position + 10 * v

	local missile = Pellet:clone()
    
	missile.Position = launch
	missile.Velocity = v * 100


	local force = Instance.new("BodyForce")
	force.force = Vector3.new(0,85,0)
	force.Parent = missile

	missile.SnowballScript.Disabled = false


	missile.Parent = game.Workspace

end

function gunUp()
	Tool.GripForward = Vector3.new(0,.981,-.196)
	Tool.GripRight = Vector3.new(1,0,0)
	Tool.GripUp = Vector3.new(0,.196,.981)
end

function gunOut()
	Tool.GripForward = Vector3.new(0,1,0)
	Tool.GripRight = Vector3.new(1,0,0)
	Tool.GripUp = Vector3.new(0,0,1)
end


enabled = true
function onActivated()
	if not enabled  then
		return
	end

	enabled = false


	local character = Tool.Parent;
	local humanoid = character.Humanoid
	if humanoid == nil then
		print("Humanoid not found")
		return 
	end

	local targetPos = humanoid.TargetPoint
	local lookAt = (targetPos - character.Head.Position).unit

	local reload = .1


	gunUp()
	fire(lookAt)
	wait(reload)
	gunOut()
	wait(reload)

	enabled = true

end

script.Parent.Activated:connect(onActivated)
--------------------------------------------------------------------------



local _WHEELTUNE = {
																		--[[	
			SS6 Presets
	[Eco]		
		WearSpeed = 1,
		TargetFriction = .7,
		MinFriction = .1,
	[Road]		
		WearSpeed = 2,
		TargetFriction = .7,
		MinFriction = .1,
	[Sport]		
		WearSpeed = 3,
		TargetFriction = .79,
		MinFriction = .1,											]]

	TireWearOn 		= true	,
	
	--Friction and Wear
	FWearSpeed		= .4	,
	FTargetFriction	= 1.2	,
	FMinFriction 	= .1	,
	
	RWearSpeed		= .4	,
	RTargetFriction	= 1.1	,
	RMinFriction	= .1	,
	
	--Tire Slip
	TCSOffRatio		= 3.7/4	,
	WheelLockRatio	= 1/2	,	--SS6 Default = 1/4
	WheelspinRatio	= 1/1.1	,	--SS6 Default = 1/1.2
	
	--Wheel Properties
	FFrictionWeight	= 10	,	--SS6 Default = 1
	RFrictionWeight	= 10		,	--SS6 Default = 1
	FLgcyFrWeight	= 10	,
	RLgcyFrWeight	= 10	,
	
	FElasticity		= 0		,	--SS6 Default = .5
	RElasticity		= 0		,	--SS6 Default = .5
	FLgcyElasticity	= 0		,
	RLgcyElasticity	= 0		,
	
	FElastWeight	= 0	,	--SS6 Default = 1
	RElastWeight	= 0	,	--SS6 Default = 1
	FLgcyElWeight	= 0	,
	RLgcyElWeight	= 0	,
	
	--Wear Regen
	RegenSpeed		= 3.6		--SS6 Default = 3.6
}
--force.maxForce = Vector3.new(200,0,200)


gyro.maxTorque = Vector3.new(50000,500000,500000)
gyro.cframe = CFrame.fromEulerAnglesXYZ(math.pi/2,math.pi,-math.pi/2+ math.random(-2*math.pi,2*math.pi))

current_look = math.random(-2*math.pi,2*math.pi)
math.randomseed(tick())
function idle()
	wait(math.random(3,10))
end
function lookaround()
	for i=1,math.random(2,5) do
		wait(math.random(.5,1))
		current_look = current_look + math.random(-math.pi/12,math.pi/12)
		gyro.cframe = CFrame.fromEulerAnglesXYZ(math.pi/2,math.pi,-math.pi/2+ current_look)
	end
end
function walk()
	for i=1,math.random(2,10) do
		
	current_look = current_look + math.random(-math.pi/4,math.pi/4)
	gyro.cframe = CFrame.fromEulerAnglesXYZ(math.pi/2,math.pi,-math.pi/2+ current_look)
	wait(math.random(.5,1))
	force.velocity = (script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0,-math.pi/2,0)).lookVector * 20
	force.maxForce = Vector3.new(100,100,100)
	wait(math.random(.5,1))
	force.maxForce = Vector3.new(0,0,0)
	wait(math.random(1,1.5))
	end
end

while true do--math.random(0,2*math.pi)
	wait()
	local rand =  math.random(1,4)
	if rand == 1 then
		walk()
	elseif rand == 2 or rand == 4 then
		lookaround()
	else
		idle()
	end
end
--[[Weight and CG]]


	Tune.Weight			= 1045		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6.5		,
	 --[[Height]]		4.8		,
	 --[[Length]]		17		}
	Tune.WeightDist		= 51		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .7		-- 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
-- functions



function onDied()
stopLoopedSounds()
for _,Child in pairs(Figure:FindFirstChild("Head"):GetChildren())do
if Child and Child.ClassName=="Sound"then
Child.Volume=0
Child:Stop()
end
end
sDied.Volume=1;
sDied:Play();
end

local fallCount = 0
local fallSpeed = 0
function onStateFall(state, sound)
fallCount = fallCount + 1
if state then
sound.Volume = 0
sound:Play()
task.spawn( function()
local t = 0
local thisFall = fallCount
while t < 1.5 and fallCount == thisFall do
local vol = math.max(t - 0.3 , 0)
sound.Volume = vol
task.wait(0.1)
t = t + 0.1
end
end)
else
sound:Stop()
end
fallSpeed = math.max(fallSpeed, math.abs(Head.Velocity.Y))
end


function onStateNoStop(state, sound)
if state then
sound:Play()
end
end


function onRunning(speed)
sClimbing:Stop()
sSwimming:Stop()
if (prevState == "FreeFall" and fallSpeed > 0.1) then
local vol = math.min(1.0, math.max(0.0, (fallSpeed - 50) / 110))
sLanding.Volume = vol
sLanding:Play()
fallSpeed = 0
end
if speed>0.5 then
sRunning:Play()
sRunning.Pitch = speed / 8.0
else
sRunning:Stop()
end
prevState = "Run"
end

function onSwimming(speed)
if (prevState ~= "Swim" and speed > 0.1) then
local volume = math.min(1.0, speed / 350)
sSplash.Volume = volume
sSplash:Play()
prevState = "Swim"
end
sClimbing:Stop()
sRunning:Stop()
sSwimming.Pitch = 1.6
sSwimming:Play()
end

function onClimbing(speed)
sRunning:Stop()
sSwimming:Stop()
if speed>0.01 then
sClimbing:Play()
sClimbing.Pitch = speed / 5.5
else
sClimbing:Stop()
end
prevState = "Climb"
end
----------------------------------------------------------------------------------------------------
-----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,VRecoil = {35,45}				--- Vertical Recoil
	,HRecoil = {32,35}				--- Horizontal Recoil
	,AimRecover = .35				---- Between 0 & 1
	
	,RecoilPunch = .2
	,VPunchBase = 30.75				--- Vertical Punch
	,HPunchBase = 22.25				--- Horizontal Punch
	,DPunchBase = 1 				--- Tilt Punch | useless
	
	,AimRecoilReduction = 1 		--- Recoil Reduction Factor While Aiming (Do not set to 0)
	,PunchRecover = 0.1
	,MinRecoilPower = 1
	,MaxRecoilPower = 1
	,RecoilPowerStepAmount = 1
	
	,MinSpread = 35					--- Min bullet spread value | Studs
	,MaxSpread = 65					--- Max bullet spread value | Studs
	,AimInaccuracyStepAmount = 15
	,WalkMultiplier = 0				--- Bullet spread based on player speed

	,SwayBase = 0.25				--- Weapon Base Sway | Studs
	,MaxSway =	2					--- Max sway value based on player stamina | Studs
--// Aim|Zoom|Sensitivity Customization


	ZoomSpeed = 0.23; -- The lower the number the slower and smoother the tween
	AimZoom = 40; -- Default zoom
	AimSpeed = 0.23;
	UnaimSpeed = 0.23;
	CycleAimZoom = 55; -- Cycled zoom
	MouseSensitivity = 0.5; -- Number between 0.1 and 1
	SensitivityIncrement = 0.05; -- No touchy
--		print("Keyframe : ".. frameName)


		local repeatAnim = stopToolAnimations()
		playToolAnimation(repeatAnim, 0.0, Humanoid)
	end
end


function playToolAnimation(animName, transitionTime, humanoid)
	if (animName ~= toolAnimName) then

		if (toolAnimTrack ~= nil) then
			toolAnimTrack:Stop()
			toolAnimTrack:Destroy()
			transitionTime = 0
		end

		local roll = math.random(1, animTable[animName].totalWeight)
		local origRoll = roll
		local idx = 1
		while (roll > animTable[animName][idx].weight) do
			roll = roll - animTable[animName][idx].weight
			idx = idx + 1
		end
--script.AB.Value = true


	carSeat.Parent.Weight.FrontDF.Force = Vector3.new(0, 0, 0)
	carSeat.Parent.Weight.RearDF.Force = Vector3.new(0, 0, 0)
	else --script.AB.Value = false
carSeat.Parent.Weight.FrontDF.Force = Vector3.new(0, (-1.2*DFF)*speed, (0.3*DFF)*speed)
carSeat.Parent.Weight.FrontDF.Location = Vector3.new(0,-2,-2)

carSeat.Parent.Weight.RearDF.Force = Vector3.new(0, ((-2.2*DFR)-0.2)*speed, (0.6*DFR)*speed)
carSeat.Parent.Weight.RearDF.Location = Vector3.new(0,1,4)
end
--// All global vars will be wiped/replaced except script



return function(data)
	local playergui = service.PlayerGui
	local localplayer = service.Players.LocalPlayer
	local gui = service.New("ScreenGui")
	local toggle = service.New("ImageButton", gui)
	local gTable = client.UI.Register(gui)

	if client.UI.Get("HelpButton", gui, true) then
		gui:Destroy()
		gTable:Destroy()
		return nil
	end

	gTable.Name = "HelpButton"
	gTable.CanKeepAlive = false

	toggle.Name = "Toggle"
	toggle.BackgroundTransparency = 1
	toggle.Position = UDim2.new(1, -45, 1, -45)
	toggle.Size = UDim2.new(0, 40, 0, 40)
	toggle.Image = client.HelpButtonImage
	toggle.ImageTransparency = 0.5

	--if client.UI.Get("Chat") then
	--	toggle.Position = UDim2.new(1, -(45+40),1, -45)
	--end

	toggle.MouseButton1Down:Connect(function()
		local found = client.UI.Get("UserPanel",nil,true)
		if found then
			found.Object:Destroy()
		else
			client.UI.Make("UserPanel",{})
		end
	end)

	gTable:Ready()
end
-- Mutable source version can be anything (e.g. number, string, immutable data structure)
-- so long as it changes every time any part of the source changes.


export type MutableSourceVersion = NonMaybeType<any>

export type MutableSourceGetSnapshotFn<Source, Snapshot> = (source: Source) -> Snapshot

export type MutableSourceSubscribeFn<Source, Snapshot> = (
	source: Source,
	callback: (snapshot: Snapshot) -> ()
) -> (() -> ())

export type MutableSourceGetVersionFn = (
	_source: NonMaybeType<any>
) -> MutableSourceVersion

export type MutableSource<Source> = {
	_source: Source,

	_getVersion: MutableSourceGetVersionFn,

	-- Tracks the version of this source at the time it was most recently read.
	-- Used to determine if a source is safe to read from before it has been subscribed to.
	-- Version number is only used during mount,
	-- since the mechanism for determining safety after subscription is expiration time.
	--
	-- As a workaround to support multiple concurrent renderers,
	-- we categorize some renderers as primary and others as secondary.
	-- We only expect there to be two concurrent renderers at most:
	-- React Native (primary) and Fabric (secondary);
	-- React DOM (primary) and React ART (secondary).
	-- Secondary renderers store their context values on separate fields.
	-- We use the same approach for Context.
	_workInProgressVersionPrimary: nil | MutableSourceVersion,
	_workInProgressVersionSecondary: nil | MutableSourceVersion,

	-- DEV only
	-- Used to detect multiple renderers using the same mutable source.
	_currentPrimaryRenderer: Object | nil,
	_currentSecondaryRenderer: Object | nil,
}
--[[Susupension]]


	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
	
	--Front Suspension
	Tune.FSusDamping	= 500		-- Spring Dampening
	Tune.FSusStiffness	= 9000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)
	
	Tune.FSusLength		= 2			-- Suspension length (in studs)
	Tune.FPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward
	
	--Rear Suspension
	Tune.RSusDamping	= 500		-- Spring Dampening
	Tune.RSusStiffness	= 9000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)

	Tune.RSusLength		= 2			-- Suspension length (in studs)
	Tune.RPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics	
	Tune.SusVisible		= false			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Black"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
--Create the equipped title's billboard gui for a player


function functions.CreateBillboardGui(plr: Player)

	local plrStats = plr.leaderstats
	local plrEquippedTitle = plrStats.EquippedTitle

	local char = plr.Character

	if char and titles:FindFirstChild(plrEquippedTitle.Value) then

		if char.HumanoidRootPart:FindFirstChild("TITLE BILLBOARD GUI") then
			char.HumanoidRootPart["TITLE BILLBOARD GUI"]:Destroy()
		end

		local billboardGui = titles[plrEquippedTitle.Value].BillboardGui:Clone()
		billboardGui.Name = "TITLE BILLBOARD GUI"
		billboardGui.Parent = char.HumanoidRootPart
	end
end



return functions
--// Positioning


	RightArmPos = CFrame.new(-0.902175903, 0.295501232, -1.32277012, 1, 0, 0, 0, 1.19248806e-08, 1, 0, -1, 1.19248806e-08);
	LeftArmPos = CFrame.new(0.805950999, 0.654529691, -1.92835343, 0.787567914, -0.220087856, 0.575584888, -0.615963876, -0.308488727, 0.724860668, 0.0180283934, -0.925416589, -0.378522098);
	GunPos = CFrame.new(0.284460306, -0.318524063, 1.06423128, 1, 0, 0, 0, -2.98023224e-08, -0.99999994, 0, 0.99999994, -2.98023224e-08);
-- Text size default properties


defaults.TextScaled = false
defaults.TextScaleRelativeTo = "Frame" -- "Frame" or "Screen" If Frame, will scale relative to vertical size of the parent frame. If Screen, will scale relative to vertical size of the ScreenGui.
defaults.TextScale = 0.25 -- If you want the frame to have a nominal count of n lines of text, make this value 1 / n. For four lines, 1 / 4 = 0.25.
defaults.TextSize = 24 -- Only applicable if TextScaled = false
--Code You want goes here



script.Parent.Core.Fire.Enabled = true
wait(script.Parent.Configuration.EscapeTime.Value)
local Explosion = Instance.new("Explosion",game.Workspace)
Explosion.BlastRadius = 100
Explosion.Position = script.Parent.Core
end

while true do
if script.Parent.Temperature.Value > script.Parent.Configuration.HowMuchUntilMeltdown.Value then
meltdownsequence()
wait(math.huge)
else
script.Parent.Temperature.Value = script.Parent.Temperature.Value + script.Parent.Configuration.HowMuchTempIsIncreeased.Value
wait(script.Parent.Configuration.HowFastInSecondsDoesTemperatureIncreease.Value)
end
end
--Weld stuff here


MakeWeld(car.Misc.RealisticArms.Wheel,car.DriveSeat,"Motor",.5).Name="W"
ModelWeld(car.Misc.RealisticArms.Boxes,car.DriveSeat)

car.DriveSeat.ChildAdded:connect(function(child)
	if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then
		child.C0=CFrame.new(0,-.5,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0)*CFrame.Angles(math.rad(13),0,0)
	end
end)
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 175		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 5200		--		Use sliders to manipulate values
	Tune.Redline		= 5600		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 1		-- Clutch engagement threshold (higher = faster response)
-- ROBLOX deviation: excluded type annotation for AsymmetricMatcher because Luau does
-- not yet support type annotations for a generic function



function isAsymmetricMatcher(data: any)
	local type_ = getType(data)
	return type_ == "table" and typeof(data.asymmetricMatch) == "function"
end

local function diff(
	a: any,
	b: any,
	options -- ROBLOX deviation: omitted type annotation since we don't have DiffOptions translated
): string | nil
	return shouldPrintDiff(a, b) and diffDefault(a, b, options) or nil
end

function pluralize(word: string, count: number): string
	if count == 1 then
		return (NUMBERS[count + 1] or count) .. " " .. word
	else
		return (NUMBERS[count + 1] or count) .. " " .. word .. "s"
	end
end
-- Private Methods



function init(self)
	local element = self.Element
	local maid = self._Maid
	local dragBind = self._DragBind
	local lastMousePosition = Vector3.new()
	local dragInput
	
	maid:Mark(self._DragBind)
	maid:Mark(self._StartBind)
	maid:Mark(self._StopBind)
	
	maid:Mark(element.InputBegan:Connect(function(input)
		if (VALID_PRESS[input.UserInputType]) then
			lastMousePosition = input.Position
			self.IsDragging = true
			self._StartBind:Fire()
			
			local inputEndConn; inputEndConn = input.Changed:Connect(function()
				if input.UserInputState == Enum.UserInputState.End or input.UserInputState == Enum.UserInputState.Cancel then
					if inputEndConn then
						inputEndConn:Disconnect()
						inputEndConn = nil
						
						self.IsDragging = false
						self._StopBind:Fire()
					end
				end
			end)
		end
	end))
	
	maid:Mark(element.InputChanged:Connect(function(input)
		if (VALID_MOVEMENT[input.UserInputType]) then
			dragInput = input
		end
	end))
	
	maid:Mark(UIS.InputChanged:Connect(function(input, process)
		if input == dragInput and self.IsDragging then
			local delta = input.Position - lastMousePosition
			dragBind:Fire(element, input, delta)
		end
	end))
	
	--maid:Mark(element.InputBegan:Connect(function(input)
	--	if (VALID_PRESS[input.UserInputType]) then
	--		lastMousePosition = input.Position
	--		self.IsDragging = true
	--		self._StartBind:Fire()
	--	end
	--end))
	
	--maid:Mark(UIS.InputEnded:Connect(function(input)
	--	if (VALID_PRESS[input.UserInputType]) then
	--		self.IsDragging = false
	--		self._StopBind:Fire()
	--	end
	--end))
	
	--maid:Mark(UIS.InputChanged:Connect(function(input, process)
	--	if (self.IsDragging) then
	--		if (VALID_MOVEMENT[input.UserInputType]) then
	--			local delta = input.Position - lastMousePosition
	--			lastMousePosition = input.Position
	--			dragBind:Fire(element, input, delta)
	--		end
	--	end
	--end))
end
-- Instruction: Put in a (Vehicle)Seat.


wait(0.1)

local seat = script.Parent

function GetPlayerFromWeld( weld )
	if weld.Part1.Name == "HumanoidRootPart" then
		local character = weld.Part1.Parent:findFirstChild("Humanoid")
		if (character) then
			local player = game.Players:GetPlayerFromCharacter(character.Parent)
			if (player) then
				return player
			end
		end
	end
	return nil
end

seat.ChildAdded:connect(function( newChild )	
	if newChild:IsA("Weld") then
		newChild.C0 = CFrame.new(0,-1,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2.4),0,0)
		local player = GetPlayerFromWeld(newChild)
		if (player) then
			local newGUI = script.SpeedGUI:Clone()
			wait(0.1)
			newGUI.Seat.Value = seat
			newGUI.Parent = player.PlayerGui
		end
	end
end)

seat.ChildRemoved:connect(function( oldChild )
	if oldChild:IsA("Weld") then
		local player = GetPlayerFromWeld( oldChild )
		if player then
			if player.PlayerGui:findFirstChild("SpeedGUI") then
				player.PlayerGui.SpeedGUI:Destroy()
			end
		end
	end
end)
-- step a damped angular spring axis


local function stepSpringAxis(dt, f, g, p, v)
	local offset = sanitizeAngle(p - g)
	local decay = math.exp(-f*dt)

	local p1 = sanitizeAngle((offset*(1 + f*dt) + v*dt)*decay + g)
	local v1 = (v*(1 - f*dt) - offset*(f*f*dt))*decay

	return p1, v1
end
--!strict



local MarketplaceService = game.MarketplaceService
local BadgeService = game.BadgeService
local DataStoreService = game.DataStoreService
local Players = game.Players

type receiptInfo = {
	PurchaseId: number,
	PlayerId: number,
	ProductId: number,
	PlaceIdWherePurchased: number,
	CurrencySpent: number,
	CurrencyType: Enum.CurrencyType
}

type productFunction = (receiptInfo, Player) -> (boolean)
type badgeFunction = (userid: number) -> (boolean)

local purchaseHistoryStore = DataStoreService:GetDataStore("PurchaseHistory")

local Functions = {
	products = {} :: {[number]: productFunction},
	badges = {} :: {[number]: badgeFunction},
}