Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- Constants


local DEBUG = false								-- Whether or not to use debugging features of FastCast, such as cast visualization.
local BULLET_SPEED = 100							-- Studs/second - the speed of the bullet
local BULLET_MAXDIST = 1000							-- The furthest distance the bullet can travel 
local BULLET_GRAVITY = Vector3.new(0, -workspace.Gravity, 0)		-- The amount of gravity applied to the bullet in world space (so yes, you can have sideways gravity)
local MIN_BULLET_SPREAD_ANGLE = 1					-- THIS VALUE IS VERY SENSITIVE. Try to keep changes to it small. The least accurate the bullet can be. This angle value is in degrees. A value of 0 means straight forward. Generally you want to keep this at 0 so there's at least some chance of a 100% accurate shot.
local MAX_BULLET_SPREAD_ANGLE = 4					-- THIS VALUE IS VERY SENSITIVE. Try to keep changes to it small. The most accurate the bullet can be. This angle value is in degrees. A value of 0 means straight forward. This cannot be less than the value above. A value of 90 will allow the gun to shoot sideways at most, and a value of 180 will allow the gun to shoot backwards at most. Exceeding 180 will not add any more angular varience.
local FIRE_DELAY = 0.05							-- The amount of time that must pass after firing the gun before we can fire again.
local BULLETS_PER_SHOT = 1							-- The amount of bullets to fire every shot. Make this greater than 1 for a shotgun effect.
local PIERCE_DEMO = true							-- True if the pierce demo should be used. See the CanRayPierce function for more info.
-- KEY SETTINGS


local Headlights = Enum.KeyCode.L

local RunningLights = Enum.KeyCode.N

local FogLights = Enum.KeyCode.J

local SignalLeft = Enum.KeyCode.Z

local SignalRight = Enum.KeyCode.C

local Hazards = Enum.KeyCode.X

local Popups = Enum.KeyCode.B

local Flash = Enum.KeyCode.L
-- If this script is added to an already-running game, this will set up the GUI for the players already in-game:


for _,p in pairs(game.Players:GetPlayers()) do
	repeat wait() until (p:findFirstChild("PlayerGui"))
	if (p.Character) then
		gui:clone().Parent = p.PlayerGui
	end
	characterHandling(p)
end

game.Players.PlayerAdded:connect(function(p)
	characterHandling(p)
end)
--[=[
	@param fn (player: Player, ...: any) -> nil -- The function to connect
	@return Connection
	Connect a function to the signal. Anytime a matching ClientRemoteSignal
	on a client fires, the connected function will be invoked with the
	arguments passed by the client.
]=]


function RemoteSignal:Connect(fn)
	if self._directConnect then
		return self._re.OnServerEvent:Connect(fn)
	else
		return self._signal:Connect(fn)
	end
end

function RemoteSignal:_processOutboundMiddleware(player: Player?, ...: any)
	if not self._hasOutbound then
		return ...
	end
	local args = table.pack(...)
	for _,middlewareFunc in ipairs(self._outbound) do
		local middlewareResult = table.pack(middlewareFunc(player, args))
		if not middlewareResult[1] then
			return table.unpack(middlewareResult, 2, middlewareResult.n)
		end
		args.n = #args
	end
	return table.unpack(args, 1, args.n)
end
--module is tagged "EffectModule"
--client gets all modules with this tag and calls initialize()


local CameraShaker = require(game.ReplicatedStorage.Modules.CameraShaker)
local camera = game.Workspace.CurrentCamera

local module = {}
	
local camShake = CameraShaker.new(Enum.RenderPriority.Camera.Value, function(shakeCFrame)
	camera.CFrame = camera.CFrame * shakeCFrame
end)

camShake:Start()

local minimumDistance = 300

function module.Initialize()
	while script.Parent and script.Parent ~= nil do
		wait(math.random(60,120))
		local distance = (camera.CFrame.Position - script.Parent.Position).Magnitude
		if distance <= minimumDistance then
			camShake:Shake(CameraShaker.Presets.Earthquake)
		end
			script.Parent.Erupt:Play()
			script.Parent.ParticleEmitter.Enabled = true
			wait(8)
			script.Parent.ParticleEmitter.Enabled = false
	end
end

return module
--PlayerGui:SetTopbarTransparency(0)



local screen = Instance.new("ScreenGui")
screen.Parent = PlayerGui

local textLabel = Instance.new("TextLabel")
textLabel.Text = "Loading"
textLabel.BackgroundTransparency = 1
textLabel.Position = UDim2.new(0.5,0,.5,0)
textLabel.TextStrokeColor3 = Color3.new(0,0,0)
textLabel.TextStrokeTransparency = 0
textLabel.TextColor3 = Color3.new(1,1,1)
textLabel.AnchorPoint = Vector2.new(.5,.5)
textLabel.Size = UDim2.new(.6,0,.5,0)
textLabel.Font = Enum.Font.ArialBold
textLabel.TextScaled = true
textLabel.Parent = screen

script.Parent:RemoveDefaultLoadingScreen()

local count = 0
local start = tick()
while tick() - start < 6 do
textLabel.Text = "Loading " .. string.rep(".",count)
count = (count + 1) % 4
wait(.3) 
end

screen.Parent = nil
--Dupes a part from the template.


local function MakeFromTemplate(template: BasePart, currentCacheParent: Instance): BasePart
	local part: BasePart = template:Clone()
	-- ^ Ignore W000 type mismatch between Instance and BasePart. False alert.
	
	part.CFrame = CF_REALLY_FAR_AWAY
	part.Anchored = true
	part.Parent = currentCacheParent
	return part
end

function PartCacheStatic.new(template: BasePart, numPrecreatedParts: number?, currentCacheParent: Instance?): PartCache
	local newNumPrecreatedParts: number = numPrecreatedParts or 5
	local newCurrentCacheParent: Instance = currentCacheParent or workspace
	
	--PrecreatedParts value.
	--Same thing. Ensure it's a number, ensure it's not negative, warn if it's really huge or 0.
	assert(numPrecreatedParts > 0, "PrecreatedParts can not be negative!")
	assertwarn(numPrecreatedParts ~= 0, "PrecreatedParts is 0! This may have adverse effects when initially using the cache.")
	assertwarn(template.Archivable, "The template's Archivable property has been set to false, which prevents it from being cloned. It will temporarily be set to true.")
	
	local oldArchivable = template.Archivable
	template.Archivable = true
	local newTemplate: BasePart = template:Clone()
	-- ^ Ignore W000 type mismatch between Instance and BasePart. False alert.
	
	template.Archivable = oldArchivable
	template = newTemplate
	
	local object: PartCache = {
		Open = {},
		InUse = {},
		CurrentCacheParent = newCurrentCacheParent,
		Template = template,
		ExpansionSize = 10
	}
	setmetatable(object, PartCacheStatic)
	
	-- Below: Ignore type mismatch nil | number and the nil | Instance mismatch on the table.insert line.
	for _ = 1, newNumPrecreatedParts do
		table.insert(object.Open, MakeFromTemplate(template, object.CurrentCacheParent))
	end
	object.Template.Parent = nil
	
	return object
	-- ^ Ignore mismatch here too
end
--[=[
	Converts this arbitrary value into an observable suitable for use in properties.

	@param value any
	@return Observable?
]=]


function Blend.toPropertyObservable(value)
	if Observable.isObservable(value) then
		return value
	elseif typeof(value) == "Instance" then
		-- IntValue, ObjectValue, et cetera
		if ValueBaseUtils.isValueBase(value) then
			return RxValueBaseUtils.observeValue(value)
		end
	elseif type(value) == "table" then
		if ValueObject.isValueObject(value) then
			return ValueObjectUtils.observeValue(value)
		elseif Promise.isPromise(value) then
			return Rx.fromPromise(value)
		elseif value.Observe then
			return value:Observe()
		end
	end

	return nil
end
--// KeyBindings


	FireSelectKey = Enum.KeyCode.V;
	CycleSightKey = Enum.KeyCode.T;
	LaserKey = Enum.KeyCode.L;
	LightKey = Enum.KeyCode.G;
	InteractKey = Enum.KeyCode.E;
	AlternateAimKey = Enum.KeyCode.Z;
	InspectionKey = Enum.KeyCode.H;
	AttachmentKey = Enum.KeyCode.LeftControl;
-- Roblox character sound script



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

local SOUND_DATA : { [string]: {[string]: any}} = {
	Climbing = {
		SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3", --Change these IDs to what you want, it can be numbers, Roblox just has their default sounds look different.
		Looped = true,  --For example, if i change "rbxasset://sounds/action_footsteps_plastic.mp3" to your custom sound, it would play that sound when you have action footsteps. I don't know what action footsteps are im assuming it's just walking.
	},
	Died = {
		SoundId = "rbxasset://sounds/uuhhh.mp3",
	},
	FreeFalling = {
		SoundId = "rbxasset://sounds/action_falling.mp3",
		Looped = true,
	},
	GettingUp = {
		SoundId = "rbxasset://sounds/action_get_up.mp3",
	},
	Jumping = {
		SoundId = "rbxasset://sounds/action_jump.mp3",
	},
	Landing = {
		SoundId = "rbxasset://sounds/action_jump_land.mp3",
	},
	Running = {
		SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3",
		Looped = true,
		Pitch = 1.85,
	},
	Splash = {
		SoundId = "rbxasset://sounds/impact_water.mp3",
	},
	Swimming = {
		SoundId = "rbxasset://sounds/action_swim.mp3",
		Looped = true,
		Pitch = 1.6,
	},
}
--[=[
	Creates an immediately rejected Promise with the given value.

	:::caution
	Something needs to consume this rejection (i.e. `:catch()` it), otherwise it will emit an unhandled Promise rejection warning on the next frame. Thus, you should not create and store rejected Promises for later use. Only create them on-demand as needed.
	:::

	```lua
	-- Example using Promise.resolve to deliver cached values:
	function getSomething(name)
		if cache[name] then
			return Promise.resolve(cache[name])
		else
			return Promise.new(function(resolve, reject)
				local thing = getTheThing()
				cache[name] = thing

				resolve(thing)
			end)
		end
	end
	```

	@param ... any
	@return Promise<...any>
]=]


function Promise.reject(...)
	local length, values = pack(...)
	return Promise._new(debug.traceback(nil, 2), function(_, reject)
		reject(unpack(values, 1, length))
	end)
end
-- padding between each entry


local ENTRY_MARGIN = 1

local explorerPanel = script.Parent
local Input = game:GetService("UserInputService")
local HoldingCtrl = false
local HoldingShift = false

local addObject
local removeObject
local gameChildren = {}

table.insert(gameChildren, game:GetService("Workspace"))
table.insert(gameChildren, game:GetService("Players"))
table.insert(gameChildren, game:GetService("Lighting"))
table.insert(gameChildren, game:GetService("ReplicatedFirst"))
table.insert(gameChildren, game:GetService("ReplicatedStorage"))


pcall(function()
	table.insert(gameChildren, game:GetService("CoreGui"))
end)

table.insert(gameChildren, game:GetService("StarterGui"))
table.insert(gameChildren, game:GetService("StarterPack"))
table.insert(gameChildren, game:GetService("StarterPlayer"))
table.insert(gameChildren, game:GetService("SoundService"))
table.insert(gameChildren, game:GetService("Chat"))
table.insert(gameChildren, game:GetService("LocalizationService"))
table.insert(gameChildren, game:GetService("TestService"))

local childrenGame = {}

childrenGame[game:GetService("Workspace")] = true
childrenGame[game:GetService("Players")] = true
childrenGame[game:GetService("Lighting")] = true
childrenGame[game:GetService("ReplicatedFirst")] = true
childrenGame[game:GetService("ReplicatedStorage")] = true

pcall(function()
	childrenGame[game:GetService("CoreGui")] = true
end)

childrenGame[game:GetService("StarterGui")] = true
childrenGame[game:GetService("StarterPack")] = true
childrenGame[game:GetService("StarterPlayer")] = true
childrenGame[game:GetService("SoundService")] = true
childrenGame[game:GetService("Chat")] = true
childrenGame[game:GetService("LocalizationService")] = true
childrenGame[game:GetService("TestService")] = true

local MuteHiddenItems = true

local DexOutput = Instance_new("Folder")
DexOutput.Name = "Output"
local DexOutputMain = Instance_new("ScreenGui", DexOutput)
DexOutputMain.Name = "Dex Output"

local HiddenEntries = Instance_new("Folder")
local HiddenGame = Instance_new("Folder")
HiddenEntries.Name = "HiddenEntriesParent"
local HiddenEntriesMain = Instance_new("TextButton", HiddenEntries)
Instance_new("Folder", HiddenEntriesMain)

local function NameHiddenEntries()
	if MuteHiddenItems then
		HiddenEntriesMain.Name = "Expand to view (" .. (#game:children() - #gameChildren) .. ") hidden items"
	else
		HiddenEntriesMain.Name = "Collapse to hide (" .. (#game:children() - #gameChildren) .. ") more items"
	end
end

NameHiddenEntries()

local function print(...)
	local Obj = Instance_new("Dialog")
	Obj.Parent = DexOutputMain
	Obj.Name = ""
	for i,v in pairs(table.pack(...)) do
		Obj.Name = Obj.Name .. tostring(v) .. " "
	end
end

explorerPanel:WaitForChild("GetPrint").OnInvoke = function()
	return print
end
--[[
	An xpcall() error handler to collect and parse useful information about
	errors, such as clean messages and stack traces.
]]



local Package = script.Parent.Parent
local Types = require(Package.Types)

local function parseError(err: string): Types.Error
	return {
		raw = err,
		message = err:gsub("^.+:%d+:%s*", ""),
		trace = debug.traceback(nil, 2)
	}
end

return parseError
-- Parts


local Frame = Home:WaitForChild("Frame")

local Hook1 = Swing1:WaitForChild("Hook1")
local Hook2 = Swing1:WaitForChild("Hook2")
local Hook3 = Swing2:WaitForChild("Hook3")
local Hook4 = Swing2:WaitForChild("Hook4")
local SwingSeat1 = Swing1:WaitForChild("SwingSeat1")
local SwingSeat2 = Swing2:WaitForChild("SwingSeat2")
local SwingMesh1 = Swing1:WaitForChild("SwingMesh1")
local SwingMesh2 = Swing2:WaitForChild("SwingMesh2")

local RopeSupport1 = Supports:WaitForChild("RopeSupport1")
local RopeSupport2 = Supports:WaitForChild("RopeSupport2")
local RopeSupport3 = Supports:WaitForChild("RopeSupport3")
local RopeSupport4 = Supports:WaitForChild("RopeSupport4")
--- Validates that all of the arguments are in a valid state.
-- This must be called before :Run() is called.
-- Returns boolean (true if ok), errorText


function Command:Validate (isFinal)
	self._Validated = true
	local errorText = ""
	local success = true

	for i, arg in pairs(self.Arguments) do
		local argSuccess, argErrorText = arg:Validate(isFinal)

		if not argSuccess then
			success = false
			errorText = ("%s; #%d %s: %s"):format(errorText, i, arg.Name, argErrorText or "error")
		end
	end

	return success, errorText:sub(3)
end
--I am an academic weapon and machine.


local MWorks = require(game:GetService("ReplicatedStorage"):WaitForChild("Package").MWorks)
local module = {}

function module:setupUpdate() --Not used externally. Used for setting up classes of all types
	self.Updated = MWorks.newBindable()
end

function module.newClass(attributes)
	local self = {}
	if attributes then 
		for i,v in pairs(attributes) do
			self[i] = v
		end
	end
	setmetatable(self,{
		__index = module;
	})
	self:setupUpdate()
	return self
end

function module:newSubClass(Name,attributes)
	local subClass = {}
	self[Name] = subClass
	if attributes then 
		for i,v in pairs(attributes) do
			self[i] = v
		end
	end
	setmetatable(subClass,{__index = self})
	subClass:setupUpdate()
	return subClass
end

function module:Update(...)
	local args = table.pack(...)
	if type(args[1]) == "table" then 
		local Table = args[1]
		for i,v in pairs(Table) do
			if self[i] then 
				self[i] = v
				self.Updated:Fire(i,v)
			end
		end
	elseif args[1] ~= nil then  
		local Name = args[1]
		local Value = args[2]
		self[Name] = Value
		self.Updated:Fire(Name,Value)
	else 
		self.Updated:Fire()
	end
end

function module:newValue(...)
	local args = table.pack(...)
	local index; 
	local Value;
	if #args < 1 then return end 
	if #args > 1 then 
		index = args[1]
		Value = args[2]
	else 
		index = #self+1
		Value = args[1]
	end
	self[index] = Value 
	self:Update(index,Value)
	return index 
end

function module:removeValue(index)
	if self[index] == nil then return end 
	self[index] = nil 
	self:Update()
end

return module
--Protected Turn 2A--: Standard GYR with a protected turn for two signal directions on one road and one on intersecting road


	--USES: Signal1, Signal1a, Signal2, Signal2a, Turn1, Turn2
while true do
	PedValues = script.Parent.Parent.PedValues
	SignalValues = script.Parent.Parent.SignalValues
	TurnValues = script.Parent.Parent.TurnValues
--Body Mover Setup--


local bp = body.BodyPosition
bp.Position = body.Position
bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge)

local bg = myRoot.BodyGyro
bg.CFrame = myRoot.CFrame
bg.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
bgTorque = bg.MaxTorque
--[[Transmission]]


	Tune.TransModes		= {"Auto", "Semi", "Manual"}								--[[
	[Modes]
		"Auto"		: Automatic shifting
		"Semi"		: Clutchless manual shifting, dual clutch transmission
		"Manual"	: Manual shifting with clutch
		
		>Include within brackets
			eg: {"Semi"} or {"Auto", "Manual"}								
		>First mode is default mode													]]
	
	--Automatic Settings
	Tune.AutoShiftMode	= "Speed"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]	
	Tune.AutoUpThresh	= -200		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 1400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)
	
	--Gear Ratios
	Tune.FinalDrive		= 2.65			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	0.5		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		0.350		,	-- Reverse, Neutral, and 1st gear are required
		
	}
	Tune.FDMult			= 1.5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
-- Each note takes up exactly 8 seconds in audio. i.e C2 lasts 8 secs, C2# lasts 8 secs, C3 lasts 8 secs, C3# lasts 8 secs etc. for each audio
-- These are the IDs of the piano sounds.



settings.SoundSource = Box

settings.CameraCFrame = CFrame.new(
	(Box.CFrame * CFrame.new(0, 5, 3)).p, -- +z is towards player
	(Box.CFrame * CFrame.new(0, 1, 1)).p
)
--DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!


local hitPart = script.Parent
local debounce = true
local tool = game.ServerStorage.ShrinkPotion-- Change "Sword" to the name of your tool, make sure your tool is in ServerStorage

hitPart.Touched:Connect(function(hit)
	if debounce == true then
		if hit.Parent:FindFirstChild("Humanoid") then
			local plr = game.Players:FindFirstChild(hit.Parent.Name)
			if plr then
				debounce = false
				hitPart.BrickColor = BrickColor.new("Bright red")
				tool:Clone().Parent = plr.Backpack
				wait(3) -- Change "3" to however long you want the player to have to wait before they can get the tool again
				debounce = true
				hitPart.BrickColor = BrickColor.new("Bright green")
			end
		end
	end
end)
-- Local Functions


local function setupPlayerStats(player)
	local character = player.Character or player.CharacterAdded:wait()
	local humanoid = character:WaitForChild("Humanoid")	
	
	local stats = Instance.new("Folder")
	stats.Name = "stats"
	stats.Parent = player
 
	local points = Instance.new("NumberValue")
	points.Name = GameSettings.pointsName
	points.Value = DataStore:GetCurrentPoints(player)
	points.Parent = stats

	local totalpoints = Instance.new("IntValue")
	totalpoints.Name = "Total" .. GameSettings.pointsName
	totalpoints.Value = DataStore:GetTotalPoints(player)
	totalpoints.Parent = stats
	
	local upgrade = Instance.new("IntValue")
	upgrade.Name = GameSettings.upgradeName
	upgrade.Value = DataStore:GetUpgrades(player)
	upgrade.Parent = stats
end
-- Loading


local CutsceneFolder = workspace.Cutscenes:WaitForChild("run") -- The folder that contains the cutscene data (Cameras...)
local Destroy = true -- Destroy folder after loading? you don't want your player to see your cameras floating around!
local NoYield = false -- Generally you want this to be set to false, because loading takes a little bit of time, and you don't want to interact with the cutscene when it's not loaded
local SafeMode = true -- This is adviced to be turned on, especially if the cutscene folder data is too big to load at one frame. when turned on, it loads a camera every frame, not all at once.

local Cutscene = require(CutsceneModule)

local Demo = Cutscene.new(Camera, Looping, Speed, FreezeControls) -- Create cutscene
Demo:Load(CutsceneFolder, Destroy, NoYield, SafeMode) -- Load cutscene data from folder

local PlayOnPartTouch = script:FindFirstChild("PlayOnPartTouch")
local PlayOnPlayerJoin = script:FindFirstChild("PlayOnPlayerJoin")
local PlayOnCharacterAdded = script:FindFirstChild("PlayOnCharacterAdded")
local PlayOnCharacterDied = script:FindFirstChild("PlayOnCharacterDied")
local PlayOnEventFire = script:FindFirstChild("PlayOnEventFire")
local PlayOnRemoteEventFire = script:FindFirstChild("PlayOnRemoteEventFire")
local ProtectTheCharacterWhilePlaying = script:FindFirstChild("ProtectTheCharacterWhilePlaying")
local CharacterProtector = script:FindFirstChild("CharacterProtector")
local Music = script:FindFirstChild("Music")
local StopMusicWhenFinished = script:FindFirstChild("StopMusicWhenFinished")
local StopOnEventFire = script:FindFirstChild("StopOnEventFire")
local StopOnRemoteEventFire = script:FindFirstChild("StopOnRemoteEventFire")
local PlayOnce = script:FindFirstChild("PlayOnce")
local Debounce = script:FindFirstChild("Cooldown")
local OnFinishedRemove = script:FindFirstChild("OnFinishedRemove")
local bin = true
local Player = game:GetService("Players").LocalPlayer
local CutsceneGui = script:FindFirstChild("Cutscene")
-- ROBLOX scripter hackers, see what you can do with this:
-- game:GetService("BadgeService"):UserHasBadge(userid, badgeid)



local db = false


function OnTouch(part)
	if db then return else db = true end
	if (part.Parent:FindFirstChild("Humanoid") ~= nil) then
		local p = game.Players:GetPlayerFromCharacter(part.Parent)
		if (p ~= nil) then
			if not game:GetService("BadgeService"):UserHasBadge(p.userId, script.Parent.BadgeID.Value) then
				print("Awarding BadgeID: " ..script.Parent.BadgeID.Value .. " to UserID: " .. p.userId)
				local b = game:GetService("BadgeService")
				b:AwardBadge(p.userId, script.Parent.BadgeID.Value)
				game.PointsService:AwardPoints(p.userId,1000)
				wait(4 + math.random())
			end
		end
	end
	db = false
end

script.Parent.Touched:connect(OnTouch)
--Weld stuff here



MakeWeld(misc.Wiper.Hinge,car.DriveSeat,"Motor",.1)
ModelWeld(misc.Wiper.Parts,misc.Wiper.Hinge)
MakeWeld(misc.Wiper2.Hinge,car.DriveSeat,"Motor",.1)
ModelWeld(misc.Wiper2.Parts,misc.Wiper2.Hinge)

MakeWeld(car.Misc.Spoiler.SS,car.DriveSeat,"Motor",.04).Name="W"
ModelWeld(car.Misc.Spoiler.Parts,car.Misc.Spoiler.SS)


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)
----------------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------



function Create(ty,data)
	local obj
	if type(ty) == 'string' then
		obj = Instance.new(ty)
	else
		obj = ty
	end
	for k, v in pairs(data) do
		if type(k) == 'number' then
			v.Parent = obj
		else
			obj[k] = v
		end
	end
	return obj
end

local barActive = false
local activeOptions = {}

function createDDown(dBut, callback,...)
	if barActive then
		for i,v in pairs(activeOptions) do
			v:Destroy()
		end
		activeOptions = {}
		barActive = false
		return
	else
		barActive = true
	end
	local slots = {...}
	local base = dBut
	for i,v in pairs(slots) do
		local newOption = base:Clone()
		newOption.ZIndex = 5
		newOption.Name = "Option "..tostring(i)
		newOption.Parent = base.Parent.Parent.Parent
		newOption.BackgroundTransparency = 0
		newOption.ZIndex = 2
		table.insert(activeOptions,newOption)
		newOption.Position = UDim2.new(-0.4, dBut.Position.X.Offset, dBut.Position.Y.Scale, dBut.Position.Y.Offset + (#activeOptions * dBut.Size.Y.Offset))
		newOption.Text = slots[i]
		newOption.MouseButton1Down:connect(function()
			dBut.Text = slots[i]
			callback(slots[i])
			for i,v in pairs(activeOptions) do
				v:Destroy()
			end
			activeOptions = {}
			barActive = false
		end)
	end
end