Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- Helper function to lazily instantiate a controller if it does not yet exist,
-- disable the active controller if it is different from the on being switched to,
-- and then enable the requested controller. The argument to this function must be
-- a reference to one of the control modules, i.e. Keyboard, Gamepad, etc.


function ControlModule:SwitchToController(controlModule)
	if not controlModule then
		if self.activeController then
			self.activeController:Enable(false)
		end
		self.activeController = nil
		self.activeControlModule = nil
	else
		if not self.controllers[controlModule] then
			self.controllers[controlModule] = controlModule.new(CONTROL_ACTION_PRIORITY)
		end

		if self.activeController ~= self.controllers[controlModule] then
			if self.activeController then
				self.activeController:Enable(false)
			end
			self.activeController = self.controllers[controlModule]
			self.activeControlModule = controlModule -- Only used to check if controller switch is necessary
			if self.touchControlFrame then
				self.activeController:Enable(true, self.touchControlFrame)
			else
				if self.activeControlModule == ClickToMove then
					-- For ClickToMove, when it is the player's choice, we also enable the full keyboard controls.
					-- When the developer is forcing click to move, the most keyboard controls (WASD) are not available, only spacebar to jump.
					self.activeController:Enable(true, Players.LocalPlayer.DevComputerMovementMode == Enum.DevComputerMovementMode.UserChoice)
				else				
					self.activeController:Enable(true)
				end
			end
			if self.touchControlFrame and (self.activeControlModule == TouchThumbpad
									or self.activeControlModule == TouchThumbstick
									or self.activeControlModule == ClickToMove
									or self.activeControlModule == DynamicThumbstick) then
				if not self.controllers[TouchJump] then
					self.controllers[TouchJump] = TouchJump.new()
				end
				self.touchJumpController = self.controllers[TouchJump]
				self.touchJumpController:Enable(true, self.touchControlFrame)
			else
				if self.touchJumpController then
					self.touchJumpController:Enable(false)
				end
			end
		end
	end
end

function ControlModule:OnLastInputTypeChanged(newLastInputType)
	if lastInputType == newLastInputType then
		warn("LastInputType Change listener called with current type.")
	end
	lastInputType = newLastInputType

	if lastInputType == Enum.UserInputType.Touch then
		-- TODO: Check if touch module already active
		local touchModule, success = self:SelectTouchModule()
		if success then
			while not self.touchControlFrame do
				wait()
			end
			self:SwitchToController(touchModule)
		end
	elseif computerInputTypeToModuleMap[lastInputType] ~= nil then
		local computerModule = self:SelectComputerMovementModule()
		if computerModule then
			self:SwitchToController(computerModule)
		end
	end
end
--[[
	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.
]]


function Functional.FilterMap(list, callback)
	local new = {}

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

		if result ~= nil then
			table.insert(new, result)
		end
	end

	return new
end
--//Shifting//-


if key == "1" then
	carSeat.Wheels.FR.Spring.Stiffness = 8000
 	carSeat.Wheels.FL.Spring.Stiffness = 8000
	carSeat.Wheels.RR.Spring.Stiffness = 8000
	carSeat.Wheels.RL.Spring.Stiffness = 8000
	carSeat.Wheels.FR.Spring.MinLength = 1.6
	carSeat.Wheels.FL.Spring.MinLength = 1.6
	carSeat.Wheels.RR.Spring.MinLength = 1.6
	carSeat.Wheels.RL.Spring.MinLength = 1.6
	car.DriveSeat.Air:Play()
	wait(0.1)
	carSeat.Wheels.FR.Spring.Stiffness = 7000
 	carSeat.Wheels.FL.Spring.Stiffness = 7000
	carSeat.Wheels.RR.Spring.Stiffness = 7000
	carSeat.Wheels.RL.Spring.Stiffness = 7000
	carSeat.Wheels.FR.Spring.MinLength = 1.575
	carSeat.Wheels.FL.Spring.MinLength = 1.575
	carSeat.Wheels.RR.Spring.MinLength = 1.575
	carSeat.Wheels.RL.Spring.MinLength = 1.575
	wait(0.1)
	carSeat.Wheels.FR.Spring.Stiffness = 6000
 	carSeat.Wheels.FL.Spring.Stiffness = 6000
	carSeat.Wheels.RR.Spring.Stiffness = 6000
	carSeat.Wheels.RL.Spring.Stiffness = 6000
	carSeat.Wheels.FR.Spring.MinLength = 1.560
	carSeat.Wheels.FL.Spring.MinLength = 1.560
	carSeat.Wheels.RR.Spring.MinLength = 1.560
	carSeat.Wheels.RL.Spring.MinLength = 1.560
	wait(0.1)
	carSeat.Wheels.FR.Spring.Stiffness = 5000
 	carSeat.Wheels.FL.Spring.Stiffness = 5000
	carSeat.Wheels.RR.Spring.Stiffness = 5000
	carSeat.Wheels.RL.Spring.Stiffness = 5000
	carSeat.Wheels.FR.Spring.MinLength = 1.545
	carSeat.Wheels.FL.Spring.MinLength = 1.545
	carSeat.Wheels.RR.Spring.MinLength = 1.545
	carSeat.Wheels.RL.Spring.MinLength = 1.545
	car.DriveSeat.Air:Stop()
elseif key == "2" then
	car.DriveSeat.Air:Play()
	carSeat.Wheels.FR.Spring.Stiffness = 5000
 	carSeat.Wheels.FL.Spring.Stiffness = 5000
	carSeat.Wheels.RR.Spring.Stiffness = 5000
	carSeat.Wheels.RL.Spring.Stiffness = 5000
	carSeat.Wheels.FR.Spring.MinLength = 1.545
	carSeat.Wheels.FL.Spring.MinLength = 1.545
	carSeat.Wheels.RR.Spring.MinLength = 1.545
	carSeat.Wheels.RL.Spring.MinLength = 1.545
	wait(0.1)
	carSeat.Wheels.FR.Spring.Stiffness = 6000
 	carSeat.Wheels.FL.Spring.Stiffness = 6000
	carSeat.Wheels.RR.Spring.Stiffness = 6000
	carSeat.Wheels.RL.Spring.Stiffness = 6000
	carSeat.Wheels.FR.Spring.MinLength = 1.560
	carSeat.Wheels.FL.Spring.MinLength = 1.560
	carSeat.Wheels.RR.Spring.MinLength = 1.560
	carSeat.Wheels.RL.Spring.MinLength = 1.560
	wait(0.1)
	carSeat.Wheels.FR.Spring.Stiffness = 7000
	carSeat.Wheels.FL.Spring.Stiffness = 7000
	carSeat.Wheels.RR.Spring.Stiffness = 7000
	carSeat.Wheels.RL.Spring.Stiffness = 7000
	carSeat.Wheels.FR.Spring.MinLength = 1.575
	carSeat.Wheels.FL.Spring.MinLength = 1.575
	carSeat.Wheels.RR.Spring.MinLength = 1.575
	carSeat.Wheels.RL.Spring.MinLength = 1.575
	wait(0.1)
	carSeat.Wheels.FR.Spring.Stiffness = 8000
	carSeat.Wheels.FL.Spring.Stiffness = 8000
	carSeat.Wheels.RR.Spring.Stiffness = 8000
	carSeat.Wheels.RL.Spring.Stiffness = 8000
	carSeat.Wheels.FR.Spring.MinLength = 1.6
	carSeat.Wheels.FL.Spring.MinLength = 1.6
	carSeat.Wheels.RR.Spring.MinLength = 1.6
	carSeat.Wheels.RL.Spring.MinLength = 1.6
	car.DriveSeat.Air:Stop()
	end
end)
--Put in ServerScriptService



game.Players.PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function(character)
		script.RagdollClient:Clone().Parent = character
		
		character:WaitForChild("Humanoid").Died:connect(function()
			character.UpperTorso:SetNetworkOwner(player)
		end)
	end)
end)
--			game.Workspace.Points:ClearAllChildren()
--			local ps = path:GetPointCoordinates()
--			for _, point in pairs(ps) do
--				local part = Instance.new("Part", game.Workspace.Points)
--				part.CanCollide = false
--				part.Anchored = true
--				part.FormFactor = Enum.FormFactor.Custom
--				part.Size = Vector3.new(1,1,1)
--				part.Position = point
--			end			


			
			currentPointIndex = 1
			lastTargetPos = target
		end
		
		if path then
			local points = path:GetPointCoordinates()
			if currentPointIndex < #points then
				local currentPoint = points[currentPointIndex]
				if not character:FindFirstChild("HumanoidRootPart") then return end
				local distance = (character.HumanoidRootPart.Position - currentPoint).magnitude
				if distance < NextPointThreshold then
					currentPointIndex = currentPointIndex + 1
				end
				
				character.Humanoid:MoveTo(points[currentPointIndex])
				if points[currentPointIndex].Y - character.HumanoidRootPart.Position.Y > JumpThreshold then
					character.Humanoid.Jump = true
				end
			else
				character.Humanoid:MoveTo(target)
			end
		end
	end
	
	return this
end
return PathfindingUtility
-- Variables (best not to touch these!)


local button = script.Parent 
local car = script.Parent.Parent.Car.Value
local sound = script.Parent.Start
sound.Parent = car.DriveSeat -- What brick the start sound is playing from.
button.MouseButton1Click:connect(function() -- Event when the button is clicked
	if script.Parent.Text == "Engine: Off" then -- If the text says it's off then..
		sound:Play() -- Startup sound plays..
		wait(1.2) -- For realism. Okay?
		script.Parent.Parent.IsOn.Value = true -- The car is is on, or in other words, start up the car.
		button.Text = "Engine: On"  -- You don't really need this, but I would keep it.
	else -- If it's on then when you click the button,
		script.Parent.Parent.IsOn.Value = false -- The car is turned off.
		button.Text = "Engine: Off"
	end -- Don't touch this.
end) -- And don't touch this either.
-- 2


module.SortAggregation.PastWeek = 3
module.SortAggregation.PastMonth = 4
module.SortAggregation.AllTime = 5


module.SortType = {}
module.SortType.Relevance = 0
module.SortType.Favorited = 1
module.SortType.Sales = 2
module.SortType.Updated = 3
module.SortType.PriceAsc = 4
module.SortType.PriceDesc = 5


module.Subcategory = {}
module.Subcategory.Featured = 0
module.Subcategory.All = 1
module.Subcategory.Collectibles = 2
module.Subcategory.Clothing = 3
module.Subcategory.BodyParts = 4
module.Subcategory.Gear = 5
--// This section of code waits until all of the necessary RemoteEvents are found in EventFolder.
--// I have to do some weird stuff since people could potentially already have pre-existing
--// things in a folder with the same name, and they may have different class types.
--// I do the useEvents thing and set EventFolder to useEvents so I can have a pseudo folder that
--// the rest of the code can interface with and have the guarantee that the RemoteEvents they want
--// exist with their desired names.



local FILTER_MESSAGE_TIMEOUT = 60

local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Chat = game:GetService("Chat")
local StarterGui = game:GetService("StarterGui")

local DefaultChatSystemChatEvents = ReplicatedStorage:WaitForChild("DefaultChatSystemChatEvents")
local EventFolder = ReplicatedStorage:WaitForChild("DefaultChatSystemChatEvents")
local clientChatModules = Chat:WaitForChild("ClientChatModules")
local ChatConstants = require(clientChatModules:WaitForChild("ChatConstants"))
local ChatSettings = require(clientChatModules:WaitForChild("ChatSettings"))
local messageCreatorModules = clientChatModules:WaitForChild("MessageCreatorModules")
local MessageCreatorUtil = require(messageCreatorModules:WaitForChild("Util"))

local numChildrenRemaining = 10 -- #waitChildren returns 0 because it's a dictionary
local waitChildren =
{
	OnNewMessage = "RemoteEvent",
	OnMessageDoneFiltering = "RemoteEvent",
	OnNewSystemMessage = "RemoteEvent",
	OnChannelJoined = "RemoteEvent",
	OnChannelLeft = "RemoteEvent",
	OnMuted = "RemoteEvent",
	OnUnmuted = "RemoteEvent",
	OnMainChannelSet = "RemoteEvent",

	SayMessageRequest = "RemoteEvent",
	GetInitDataRequest = "RemoteFunction",
}
--// wonuf



wait()

local WeldHoldPart = script.Parent.Parent.Part

function weld(c1,c2)
	local w = Instance.new("Weld")
	w.Part0 = c1
	w.Part1 = c2
	w.C1 = c2.CFrame:inverse() * c1.CFrame
	w.Parent = c1
	c2.Anchored = false
end

function scan(obj)
	for _,v in pairs(obj:GetChildren()) do
		if v:IsA('BasePart') then
			weld(WeldHoldPart, v)
			scan(v)
		elseif v:IsA('Model') then
			scan(v)
		end
	end
end

scan(script.Parent)
-- Define the function to open or close the window with gene-alike effect


local function toggleWindow()
	if window.Visible then

		window.Visible = false
		opened.Visible = false
		-- Close the window by tweening back to the button position and size
		window:TweenSizeAndPosition(
			UDim2.new(0, 0, 0, 0),
			UDim2.new(0, aFinderButton.AbsolutePosition.X, 0, aFinderButton.AbsolutePosition.Y),
			'Out',
			'Quad',
			0.5,
			false,
			function()
				window.Visible = false
			end
		)
	end
end
--Public developer facing functions


function ClickToMove:SetShowPath(value)
	ShowPath = value
end

function ClickToMove:GetShowPath()
	return ShowPath
end

function ClickToMove:SetWaypointTexture(texture)
	ClickToMoveDisplay.SetWaypointTexture(texture)
end

function ClickToMove:GetWaypointTexture()
	return ClickToMoveDisplay.GetWaypointTexture()
end

function ClickToMove:SetWaypointRadius(radius)
	ClickToMoveDisplay.SetWaypointRadius(radius)
end

function ClickToMove:GetWaypointRadius()
	return ClickToMoveDisplay.GetWaypointRadius()
end

function ClickToMove:SetEndWaypointTexture(texture)
	ClickToMoveDisplay.SetEndWaypointTexture(texture)
end

function ClickToMove:GetEndWaypointTexture()
	return ClickToMoveDisplay.GetEndWaypointTexture()
end

function ClickToMove:SetWaypointsAlwaysOnTop(alwaysOnTop)
	ClickToMoveDisplay.SetWaypointsAlwaysOnTop(alwaysOnTop)
end

function ClickToMove:GetWaypointsAlwaysOnTop()
	return ClickToMoveDisplay.GetWaypointsAlwaysOnTop()
end

function ClickToMove:SetFailureAnimationEnabled(enabled)
	PlayFailureAnimation = enabled
end

function ClickToMove:GetFailureAnimationEnabled()
	return PlayFailureAnimation
end

function ClickToMove:SetIgnoredPartsTag(tag)
	UpdateIgnoreTag(tag)
end

function ClickToMove:GetIgnoredPartsTag()
	return CurrentIgnoreTag
end

function ClickToMove:SetUseDirectPath(directPath)
	UseDirectPath = directPath
end

function ClickToMove:GetUseDirectPath()
	return UseDirectPath
end

function ClickToMove:SetAgentSizeIncreaseFactor(increaseFactorPercent)
	AgentSizeIncreaseFactor = 1.0 + (increaseFactorPercent / 100.0)
end

function ClickToMove:GetAgentSizeIncreaseFactor()
	return (AgentSizeIncreaseFactor - 1.0) * 100.0
end

function ClickToMove:SetUnreachableWaypointTimeout(timeoutInSec)
	UnreachableWaypointTimeout = timeoutInSec
end

function ClickToMove:GetUnreachableWaypointTimeout()
	return UnreachableWaypointTimeout
end

function ClickToMove:SetUserJumpEnabled(jumpEnabled)
	self.jumpEnabled = jumpEnabled
	if self.touchJumpController then
		self.touchJumpController:Enable(jumpEnabled)
	end
end

function ClickToMove:GetUserJumpEnabled()
	return self.jumpEnabled
end

function ClickToMove:MoveTo(position, showPath, useDirectPath)
	local character = Player.Character
	if character == nil then
		return false
	end
	local thisPather = Pather(position, Vector3.new(0, 1, 0), useDirectPath)
	if thisPather and thisPather:IsValidPath() then
		if FFlagUserClickToMoveFollowPathRefactor then
			-- Clean up previous path
			CleanupPath()
		end
		HandleMoveTo(thisPather, position, nil, character, showPath)
		return true
	end
	return false
end

return ClickToMove
-----------------------------------


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


	for i = 1,#grp1 do
	grp1[i].Lighto.Enabled = false
	end	
	
		for i = 1,#grp1 do
	grp1[i].Transparency = 1
		end		
		
			for i = 1,#grp2 do
	grp2[i].Lighto.Enabled = false
	end	
	
		for i = 1,#grp2 do
	grp2[i].Transparency = 1
	end	

			for i = 1,#grp3 do
	grp3[i].Lighto.Enabled = false
	end	
	
		for i = 1,#grp3 do
	grp3[i].Transparency = 1
	end	

		for i = 1,#grp4 do
	grp4[i].Transparency = 0
		end	
		
					for i = 1,#grp4 do
	grp4[i].Lighto.Enabled = true
					end	
end
end
--[[**
	Adds an `Object` to Janitor for later cleanup, where `MethodName` is the key of the method within `Object` which should be called at cleanup time. If the `MethodName` is `true` the `Object` itself will be called instead. If passed an index it will occupy a namespace which can be `Remove()`d or overwritten. Returns the `Object`.
	@param [t:any] Object The object you want to clean up.
	@param [t:string|true?] MethodName The name of the method that will be used to clean up. If not passed, it will first check if the object's type exists in TypeDefaults, and if that doesn't exist, it assumes `Destroy`.
	@param [t:any?] Index The index that can be used to clean up the object manually.
	@returns [t:any] The object that was passed.
**--]]


function Janitor.__index:Add(Object, MethodName, Index)
	if Index then
		self:Remove(Index)

		local This = self[IndicesReference]
		if not This then
			This = {}
			self[IndicesReference] = This
		end

		This[Index] = Object
	end

	MethodName = MethodName or TypeDefaults[typeof(Object)] or "Destroy"
	if type(Object) ~= "function" and not Object[MethodName] then
		warn(string.format(METHOD_NOT_FOUND_ERROR, tostring(Object), tostring(MethodName), debug.traceback(nil, 2)))
	end

	self[Object] = MethodName
	return Object
end
----------------------------------------------------------------------
--------------------[ TWEENJOINT HANDLING ]---------------------------
----------------------------------------------------------------------



local createTweenIndicator = script:WaitForChild("createTweenIndicator")
function createTweenIndicator.OnServerInvoke(_, Joint, newCode)
	local tweenIndicator = nil
	if (not Joint:findFirstChild("tweenCode")) then --If the joint isn't being tweened, then
		tweenIndicator = Instance.new("IntValue")
		tweenIndicator.Name = "tweenCode"
		tweenIndicator.Value = newCode
		tweenIndicator.Parent = Joint
	else
		tweenIndicator = Joint.tweenCode
		tweenIndicator.Value = newCode --If the joint is already being tweened, this will change the code, and the tween loop will stop
	end
	return tweenIndicator
end

local lerpCF = script:WaitForChild("lerpCF")
function lerpCF.OnServerInvoke(_, Joint, Prop, startCF, endCF, Alpha)
	spawn(function()
		Joint[Prop] = startCF:lerp(endCF, Alpha)
	end)
end

local deleteTweenIndicator = script:WaitForChild("deleteTweenIndicator")
function deleteTweenIndicator.OnServerInvoke(_, tweenIndicator, newCode)
	if tweenIndicator.Value == newCode then --If this tween functions was the last one called on a joint then it will remove the code
		tweenIndicator:Destroy()
	end
end
-- list of account names allowed to go through the door. 


permission = { "Februar92", "Lumpizerstoerer" } --Put your friends name's here. You can add more.

function checkOkToLetIn(name) 
	for i = 1,#permission do 
		-- convert strings to all upper case, otherwise we will let in, 
		-- "Telamon," but not, "tELAMON," or, "telamon."
                -- Why? Because, "Telamon," is how it is spelled in the permissions.
		if (string.upper(name) == string.upper(permission[i])) then return true end 
	end 
	return false 
end 

local Door = script.Parent

function onTouched(hit) 
	print("Door Hit") 
	local human = hit.Parent:findFirstChild("Humanoid") 
	if (human ~= nil ) then 
		-- a human has touched this door! 
		print("Human touched door") 
		-- test the human's name against the permission list 
		if (checkOkToLetIn(human.Parent.Name)) then 
			print("Human passed test") 
			Door.Transparency = 0.5 
			Door.CanCollide = false 
			wait(1.5) -- this is how long the door is open 
			Door.CanCollide = true 
			Door.Transparency = 0 
		else human.Health= 0 -- delete this line of you want a non-killing VIP door 
		end 
	end 
end 

script.Parent.Touched:connect(onTouched)
-- Darken Functions


local function darkenScreen()
	darken.Visible = true
	TweenService:Create(darken, Bar_Button_TweenInfo, {BackgroundTransparency = 0.3}):Play()
end

local function lightenScreen()
	TweenService:Create(darken, Bar_Button_TweenInfo, {BackgroundTransparency = 1}):Play()
	task.wait(0.3)
	darken.Visible = false
end
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 670		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 800		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 8000		--		Use sliders to manipulate values
	Tune.Redline		= 9000		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 6100
	Tune.PeakSharpness	= 3.8
	Tune.CurveMult		= 0.07
	
	--Incline Compensation
	Tune.InclineComp	= 1.5		-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 450		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 150		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response, lower = more stable RPM)
--[[ alexnewtron 2014 ]]

--
local c = {
	p = game.Players.LocalPlayer,
	h = game.Players.LocalPlayer.Character:findFirstChild("Humanoid"),
	debris=game:GetService("Debris"),
	c = script:WaitForChild("creator")
};
function c.r()
	for i,v in ipairs(c.h:GetChildren()) do
		if v.Name=="creator" then
			v:Destroy()
		end
	end	
	local creator_tag=Instance.new("ObjectValue");
	creator_tag.Value=c.c.Value;
	creator_tag.Name="creator";
	creator_tag.Parent=c.h;
end
if (c.h ~= nil) then
	for i=1, 5 do
		c.r();
		c.h:TakeDamage(13);
		wait(1.5);
	end	
end
script:Destroy();
--[[Weight and CG]]


	Tune.Weight			= 3500		-- 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		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .01		-- 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	= .2		-- Density of structural members
--[[
	Sets the new view, destructing any previous view if it exists, and then creating the specified
	new view.
]]


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

			if currentView then
				currentView.exit()
			end

			currentView = views[view]
			currentView.enter(...)
		end
	)(...)
end
--------------------------------------------------------------------------



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		= .3	,
	FTargetFriction	= 0.6	,
	FMinFriction 	= .5	,
	
	RWearSpeed		= .3	,
	RTargetFriction	= 0.5	,
	RMinFriction	= .5	,
	
	--Tire Slip
	TCSOffRatio		= 1/3	,
	WheelLockRatio	= 1/2	,	--SS6 Default = 1/4
	WheelspinRatio	= 1/1.1	,	--SS6 Default = 1/1.2
	
	--Wheel Properties
	FFrictionWeight	= 1		,	--SS6 Default = 1
	RFrictionWeight	= 1		,	--SS6 Default = 1
	FLgcyFrWeight	= 10	,
	RLgcyFrWeight	= 10	,
	
	FElasticity		= 0		,	--SS6 Default = .5
	RElasticity		= 0		,	--SS6 Default = .5
	FLgcyElasticity	= 0		,
	RLgcyElasticity	= 0		,
	
	FElastWeight	= 1		,	--SS6 Default = 1
	RElastWeight	= 1		,	--SS6 Default = 1
	FLgcyElWeight	= 10	,
	RLgcyElWeight	= 10	,
	
	--Wear Regen
	RegenSpeed		= 1.8		--SS6 Default = 3.6
}
--[[handle.ChildRemoved:Connect(function(WHAT) --antinosound
	if WHAT.ClassName == "Sound" and not table.find(soundsdisabledfromrefit, WHAT.Name) then
		local backups = Instance.new("Sound", handle)
		backups.SoundId = WHAT.SoundId
		backups.Volume = WHAT.Volume
		backups.Name = WHAT.Name
	end
end)--]]
--Stickmasterluke




sp=script.Parent


taseduration=5
rate=.4


local s=Instance.new("Sound")
s.SoundId="http://www.roblox.com/asset/?id=82277505"
s.Looped=true

if ypcall(function()
joints={}
local t=sp:FindFirstChild("Torso")
if t~=nil then
	s.Parent=t
	s:Play()
	for i,v in ipairs(t:GetChildren()) do
		if v.className=="Motor" or v.className=="Motor6D" or v.className=="Weld" or v.className=="ManualWeld" then
			table.insert(joints,v)
		end
	end
end

if #joints>=1 then
	for i=1,taseduration/rate do
		for i,v in ipairs(joints) do
			if v~=nil then
				v.CurrentAngle=(math.random()-.5)*5
			end
		end
		local h=sp:FindFirstChild("Humanoid")
		local t=sp:FindFirstChild("Torso")
		if t~=nil and h~=nil then
			h.Sit=true
			h.Torso.Anchored = true
			t.CFrame=t.CFrame*CFrame.Angles((math.random()-.5)*.5,(math.random()-.5)*.5,(math.random()-.5)*.5)
			wait(rate)
		end
	end
	local h=sp:FindFirstChild("Humanoid")
	h.Torso.Anchored = false
	h.Sit=false
end
s:Stop()
script:remove()


end) ~= true then wait() script:remove() end