Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- @Description Resize a specific %Model to a larger %Scale multiplier
-- @Arg1 Model
-- @Arg2 Scale


function Basic.ScaleModelWithJoints(model, scale)
	local origin = model.PrimaryPart.Position

	for _, obj in ipairs(model:GetDescendants()) do
		if obj:IsA("BasePart") then
			obj.Size = obj.Size*scale
			
			local distance = (obj.Position - model:GetPrimaryPartCFrame().p)
			local rotation = (obj.CFrame - obj.Position)
			obj.CFrame = (CFrame.new(model:GetPrimaryPartCFrame().p + distance*scale) * rotation)
		elseif obj:IsA("SpecialMesh") and obj.MeshType == Enum.MeshType.FileMesh then
			obj.Scale = obj.Scale*scale
		elseif obj:IsA("JointInstance") then
			local c0NewPos = obj.C0.p*scale
			local c0RotX, c0RotY, c0RotZ = obj.C0:ToEulerAnglesXYZ()

			local c1NewPos = obj.C1.p*scale
			local c1RotX, c1RotY, c1RotZ = obj.C1:ToEulerAnglesXYZ()

			obj.C0 = CFrame.new(c0NewPos)*CFrame.Angles(c0RotX, c0RotY, c0RotZ)
			obj.C1 = CFrame.new(c1NewPos)*CFrame.Angles(c1RotX, c1RotY, c1RotZ)
		end
	end
	
	return model
end

function Basic.Destroy(obj)
	if not obj then return end
	obj:Destroy()
end

return Basic
--[[

	Loads all ModuleScripts within the given parent.

	Loader.LoadChildren(parent: Instance): module[]
	Loader.LoadDescendants(parent: Instance): module[]

--]]




local Loader = {}

type Module = {}
type Modules = {Module}


function Loader.LoadChildren(parent: Instance): Modules
	local modules: Modules = {}
	for _,child in ipairs(parent:GetChildren()) do
		if (child:IsA("ModuleScript")) then
			local m = require(child)
			table.insert(modules, m)
		end
	end
	return modules
end


function Loader.LoadDescendants(parent: Instance): Modules
	local modules: Modules = {}
	for _,descendant in ipairs(parent:GetDescendants()) do
		if (descendant:IsA("ModuleScript")) then
			local m = require(descendant)
			table.insert(modules, m)
		end
	end
	return modules
end


return Loader
--sensor.Disabled = false --SENSOR


Car.BodyVelocity.velocity = Vector3.new(0, -40, 0)
wait(0.3)
Car.BodyVelocity.velocity = Vector3.new(0, -30, 0)
wait(0.2)
Car.BodyVelocity.velocity = Vector3.new(0, -30, 0)
wait(0.2)
Car.BodyVelocity.velocity = Vector3.new(0, -10, 0)
wait(0.1)
Car.BodyVelocity.velocity = Vector3.new(0, -5, 0)
wait(2.3)
Car.BodyVelocity.velocity = Vector3.new(0, 0, 0) --Hacia Arriba 3
wait(0.1)
Car.BodyVelocity.velocity = Vector3.new(0, 25, 0)
wait(0.4)
Car.BodyVelocity.velocity = Vector3.new(0, 35, 0)
wait(0.3)
Car.BodyVelocity.velocity = Vector3.new(0, 38, 0)
wait(0.3)
Car.BodyVelocity.velocity = Vector3.new(0, 35, 0)
wait(1)
Car.BodyVelocity.velocity = Vector3.new(0, 30, 0)
wait(0.3)
Car.BodyVelocity.velocity = Vector3.new(0, 25, 0)
wait(0.3)
Car.BodyVelocity.velocity = Vector3.new(0, 15, 0)
wait(0.4)
Car.BodyVelocity.velocity = Vector3.new(0, 0, 0)
wait(0.1)
Car.BodyVelocity.velocity = Vector3.new(0, -10, 0) --Hacia Abajo 4
wait(0.5)
Car.BodyVelocity.velocity = Vector3.new(0, -20, 0)
wait(0.5)
Car.BodyVelocity.velocity = Vector3.new(0, -30, 0)
wait(0.5)
Car.BodyVelocity.velocity = Vector3.new(0, -35, 0)
wait(0.5)
Car.BodyVelocity.velocity = Vector3.new(0, -38, 0)
wait(0.5)
Car.BodyVelocity.velocity = Vector3.new(0, -30, 0)
wait(0.5)
Car.BodyVelocity.velocity = Vector3.new(0, -20, 0)
wait(0.5)
Car.BodyVelocity.velocity = Vector3.new(0, -8, 0)
wait(0.5)
Car.BodyVelocity.velocity = Vector3.new(0, 0, 0) --Hacia Arriba 3
wait(0.1)
Car.BodyVelocity.velocity = Vector3.new(0, 5, 0)
wait(0.4)
Car.BodyVelocity.velocity = Vector3.new(0, 8, 0)
wait(0.3)
Car.BodyVelocity.velocity = Vector3.new(0, 10, 0)
wait(0.3)
Car.BodyVelocity.velocity = Vector3.new(0, 12, 0)
wait(1)
Car.BodyVelocity.velocity = Vector3.new(0, 15, 0)
wait(0.3)
Car.BodyVelocity.velocity = Vector3.new(0, 10, 0)
wait(0.3)
Car.BodyVelocity.velocity = Vector3.new(0, 5, 0)
wait(0.2)
Car.BodyVelocity.velocity = Vector3.new(0, 0, 0)
wait(0.1) --Hacia Arriba 3 y Abajo Fin
Car.BodyVelocity.velocity = Vector3.new(0, -10, 0) --Hacia Abajo 4
wait(0.5)
Car.BodyVelocity.velocity = Vector3.new(0, -40, 0)
wait(0.5)
Car.BodyVelocity.velocity = Vector3.new(0, -60, 0)
wait(0.5)
Car.BodyVelocity.velocity = Vector3.new(0, -80, 0)
wait(0.5)
Car.BodyVelocity.velocity = Vector3.new(0, -60, 0)
wait(0.5)
Car.BodyVelocity.velocity = Vector3.new(0, -40, 0)
wait(0.5)
Car.BodyVelocity.velocity = Vector3.new(0, -20, 0)
wait(0.5)
Car.BodyVelocity.velocity = Vector3.new(0, -8, 0)
Car.Sound.Playing = false
wait(1)
Car.BodyVelocity.velocity = Vector3.new(0, 0, 0)
script.Parent.ClickDetector.MaxActivationDistance = "32"
wait(5)
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
-- adds a BezierPoint to the Bezier
-- a BezierPoint can either be a Vector3 or a BasePart
-- a Vector3 BezierPoint is static, while a BasePart BezierPoint changes if the BasePart's position changes


function Bezier:AddBezierPoint(p: Vector3 | BasePart, index: number?)
	
	-- check if given value is a Vector3 or BasePart
	if p and (typeof(p) == "Instance" and p:IsA("BasePart")) or typeof(p) == "Vector3" then
		local newPoint: BezierPoint = {
			Type = typeof(p) == "Vector3" and "StaicPoint" or "BasePartPoint";
			Point = p;
		}
		
		-- if point is a BasePartPoint, then watch for removal and changes
		if newPoint.Type == "BasePartPoint" then
			local connection, connection2
			
			-- changed connection
			connection = (p:: BasePart).Changed:Connect(function(prop)
				if prop == "Position" then
					self:UpdateLength()
				end
			end)
			
			-- deleted connection
			connection2 = (p:: BasePart).AncestryChanged:Connect(function(_, parent)
				if parent == nil then
					local index = table.find(self.Points, newPoint)
					if index then
						table.remove(self.Points, index)
					end
					connection:Disconnect()
					connection:Disconnect()
				end
			end)
			
			-- check if there is a connection table for the basepart
			if not self._connections[p] then
				self._connections[p] = {}
			end
			
			-- add connections to connection table
			table.insert(self._connections[p], connection)
			table.insert(self._connections[p], connection2)
		end
		
		-- add to list of points
		if index and type(index) == "number" then
			
			-- found index, add at index
			table.insert(self.Points, index, newPoint)
		elseif not index then
			
			-- did not find index, add to end of table
			table.insert(self.Points, newPoint)
		elseif type(index) ~= "number" then
			
			-- incorrect type
			error("Bezier:AddBezierPoint() only accepts an integer as the second argument!")
		end
		
		-- update bezier
		self:UpdateLength()
	else
		error("Bezier:AddBezierPoint() only accepts a Vector3 or BasePart as the first argument!")
	end
end
--------RIGHT DOOR --------


game.Workspace.doorright.l11.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l12.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l13.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l41.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l42.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l43.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l71.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l72.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l73.BrickColor = BrickColor.new(21)

game.Workspace.doorright.l21.BrickColor = BrickColor.new(133)
game.Workspace.doorright.l22.BrickColor = BrickColor.new(133)
game.Workspace.doorright.l23.BrickColor = BrickColor.new(133)
game.Workspace.doorright.l51.BrickColor = BrickColor.new(133)
game.Workspace.doorright.l52.BrickColor = BrickColor.new(133)
game.Workspace.doorright.l53.BrickColor = BrickColor.new(133)

game.Workspace.doorright.l31.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l32.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l33.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l61.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l62.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l63.BrickColor = BrickColor.new(106)

game.Workspace.doorright.pillar.BrickColor = BrickColor.new(106)
--MOT is up and down while MOT2 is side to side



wt = 0.07


while wait(0.01) do
	
if values.Gear.Value == -1 then
	MOT2.DesiredAngle = -0.4
	wait(wt)
	MOT.DesiredAngle = -0.2
end

if values.Gear.Value == 0 then
	MOT.DesiredAngle = 0
	wait(wt)
	MOT2.DesiredAngle = 0
end



if values.Gear.Value == 1 then
	MOT2.DesiredAngle = 0.2
	wait(wt)
	MOT.DesiredAngle = -0.2
	end
if values.Gear.Value == 2 then
	MOT.DesiredAngle = 0.2
	wait(wt)
	MOT2.DesiredAngle = 0.2
	end





if values.Gear.Value == 3 then
	MOT.DesiredAngle = -0.2
	wait(wt)
	MOT2.DesiredAngle = 0
	end
if values.Gear.Value == 4 then
	MOT.DesiredAngle = 0.2
	wait(wt)
	MOT2.DesiredAngle = 0
end


if values.Gear.Value == 5 then
	MOT.DesiredAngle = -0.2
	wait(wt)
	MOT2.DesiredAngle = -0.2
	end
if values.Gear.Value == 6 then
	MOT.DesiredAngle = 0.2
	wait(wt)
	MOT2.DesiredAngle = -0.2
end



end
-- Style Options



Flat=true;						-- Enables Flat theme / Disables Aero theme
ForcedColor=true;				-- Forces everyone to have set color & transparency
Color=Color3.new(34,21,10);		-- Changes the Color of the user interface
ColorTransparency=.75;			-- Changes the Transparency of the user interface
Chat=true;						-- Enables the custom chat
BubbleChat=false;				-- Enables the custom bubble chat
--[=[
	Wraps TeleportService:PromiseTeleport(placeId, players, teleportOptions)
	@param placeId number
	@param players { Player }
	@param teleportOptions TeleportOptions
	@return Promise<string> -- Code
]=]


function TeleportServiceUtils.promiseTeleport(placeId, players, teleportOptions)
	assert(type(placeId) == "number", "Bad placeId")
	assert(type(players) == "table", "Bad players")
	assert(typeof(teleportOptions) == "Instance" and teleportOptions:IsA("TeleportOptions") or teleportOptions == nil, "Bad options")

	return Promise.spawn(function(resolve, reject)
		local teleportAsyncResult
		local ok, err = pcall(function()
			teleportAsyncResult = TeleportService:TeleportAsync(placeId, players, teleportOptions)
		end)
		if not ok then
			return reject(err)
		end

		return resolve(teleportAsyncResult)
	end)
end

return TeleportServiceUtils
-----<< CONNECTIONS >>-----



reloadEvent.OnServerEvent:Connect(reload)
fireEvent.OnServerEvent:Connect(function(player, target)
	if tool.Parent == player.Character then
		-- If tool has enough shots then fires. Otherwise reloads.
		if currentAmmo <= 0 then
			return reload(player)
		end
		if canFire then
			canFire = false
			currentAmmo = currentAmmo - 1
			shotEvent:FireClient(player, currentAmmo, ammoLeft)
			fireSound:Play()
			muzzle.EffectAttachment.MuzzleFlash:Emit(1)
			spawn(function() createBullet(target) end)
			wait()
			tool.GripUp = Vector3.new(0, 0.2, 1)
			wait()
			tool.GripUp = Vector3.new(0, 0, 1)
			delay(attackCooldown, function()
				canFire = true
			end)
		end
	end
end)
player.Character.Humanoid.Touched:Connect(function(obj)
	if obj.Name == "AmmoCrate" and equipped and ammoLeft < extraAmmo then
		tool.Handle.ReplenishSound:Play()
		ammoLeft = extraAmmo
		shotEvent:FireClient(player, currentAmmo, ammoLeft)
	end
end)
--[[Transmission]]


	Tune.TransModes		= {"Auto"}								--[[
	[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	= "RPM"												--[[
	[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 = 400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)
	
	--Gear Ratios
	Tune.FinalDrive		= 4.06			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	3.80		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		3		,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		1.36		,
		--[[ 3 ]]		1		,
		--[[ 4 ]]		0.73		,
	}
	Tune.FDMult			= 1.5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--	local creator_tag = Instance.new("ObjectValue") -- Don't need this anymore, as the module only needs the player value
--	creator_tag.Value = plr
--	creator_tag.Name = "creator"
--	creator_tag.Parent = bomb2


	
	bomb2.CFrame=cf
	bomb2.Parent=workspace
	
	game.ServerScriptService.b:Fire(plr,"Bomb",bomb2.Position,bomb2)
	
	wait(6)
	
	Tool.Enabled=true
end

Tool.Fire.OnServerEvent:Connect(FireWep)
--[[
	The sound dispatcher will fire sound events to properly loaded characters. This script manages a list of
	characters currently loaded in the game. When a character fires a sound event, this dispatcher will
	check to make sure the event only fires on characters who have loaded in.
--]]


local ReplicatedStorage = game:GetService("ReplicatedStorage")

local SOUND_EVENT_FOLDER_NAME = "DefaultSoundEvents"

if UserSettings():IsUserFeatureEnabled("UserUseSoundDispatcher") then
	local loadedCharacters = {}

	local EventFolder = ReplicatedStorage:FindFirstChild(SOUND_EVENT_FOLDER_NAME)
	if not EventFolder then
		EventFolder = Instance.new("Folder")
		EventFolder.Name = SOUND_EVENT_FOLDER_NAME
		EventFolder.Archivable = false
		EventFolder.Parent = ReplicatedStorage
	end

	local function createEvent(name, instanceType)
		local newEvent = EventFolder:FindFirstChild(name)
		if not newEvent then
			newEvent = Instance.new(instanceType)
			newEvent.Name = name
			newEvent.Parent = EventFolder
		end

		return newEvent
	end

	local DefaultServerSoundEvent = createEvent("DefaultServerSoundEvent", "RemoteEvent")
	local AddCharacterLoadedEvent = createEvent("AddCharacterLoadedEvent", "RemoteEvent")
	local RemoveCharacterEvent = createEvent("RemoveCharacterEvent", "RemoteEvent")

	-- Fire the sound event to all clients connected
	local function fireDefaultServerSoundEventToClient(player, sound, playing, resetPosition)
		if loadedCharacters[player] then
			DefaultServerSoundEvent:FireClient(player, sound, playing, resetPosition)
		end
	end

	-- Add a character to the list of clients ready to receive sounds
	local function addCharacterLoaded(player)
		loadedCharacters[player] = true
	end

	-- Remove a character from the table
	local function removeCharacter(player)
		loadedCharacters[player] = nil
	end

	local soundDispatcher = createEvent("SoundDispatcher", "BindableEvent")
	soundDispatcher.Event:Connect(fireDefaultServerSoundEventToClient)

	--no op function to prevent rogue client from filling RemoteEvent queue
	DefaultServerSoundEvent.OnServerEvent:Connect(function() end)
	AddCharacterLoadedEvent.OnServerEvent:Connect(addCharacterLoaded)
	RemoveCharacterEvent.OnServerEvent:Connect(removeCharacter)
end
--!nonstrict
--[[

	DEVELOPMENT HAS BEEN MOVED FROM DAVEY_BONES/SCELERATIS TO THE EPIX INCORPORATED GROUP

	CURRENT LOADER:
	https://www.roblox.com/library/7510622625/Adonis-Admin-Loader-Epix-Incorporated

	CURRENT MODULE:
	https://www.roblox.com/library/7510592873/Adonis-MainModule

	NIGHTLY MODULE:
	https://www.roblox.com/library/8612978896/Nightlies-Adonis-MainModule

--]]
--[[
Instructions: Place both tele1 and tele2 in the same directory
(e.g. both in workspace directly, or both directly in the same group or model)
Otherwise it wont work. Once youve done that, jump on the teleporter to teleport to the other.
If you want to edit this to a 2 way teleporter, only copy the Teleport Script of tele1 in tele2 and edit this part of the script 
------------------------------------
modelname="tele2"
------------------------------------ 
to 
------------------------------------
modelname="tele1"
------------------------------------
--]]
-- ANimation


local Sound = script:WaitForChild("Haoshoku Sound")

UIS.InputBegan:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.F and Debounce == 1 and Tool.Equip.Value == true and Tool.Active.Value == "None" and script.Parent.DargonOn.Value == true then
		Debounce = 2
		Track1 = plr.Character.Dragon.Dragonoid:LoadAnimation(script.A1)
		Track1:Play()
		Fly = plr.Character.Dragon.Torso.Dragonfly
		Fly.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
		for i = 1,math.huge do
			if Debounce == 2 then
				Fly.Velocity = CFrame.new(plr.Character.HumanoidRootPart.Position,Mouse.Hit.p).LookVector * 140
				plr.Character.HumanoidRootPart.CFrame = CFrame.new(plr.Character.HumanoidRootPart.Position, Vector3.new(Mouse.Hit.p.x,plr.Character.HumanoidRootPart.Position.y,Mouse.Hit.p.z))
			else
				
				break
				end
	     wait()
	  end
	end
end)

UIS.InputEnded:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.F and Debounce == 2 and Tool.Equip.Value == true and Tool.Active.Value == "None" and script.Parent.DargonOn.Value == true  then
		Debounce = 3
		Track1:Stop()
		Fly.Velocity = plr.Character.HumanoidRootPart.CFrame.LookVector * 0
		wait(0)
		Tool.Active.Value = "None"
		wait(0)
		Debounce = 1
	end
end)
--// Loccalllsssss


local _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, time, Faces, unpack, string, Color3, newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor, NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint, NumberSequenceKeypoint, PhysicalProperties, Region3int16, Vector3int16, require, table, type, wait, Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay, spawn, task, tick, assert =
	_G,
	game,
	script,
	getfenv,
	setfenv,
	workspace,
	getmetatable,
	setmetatable,
	loadstring,
	coroutine,
	rawequal,
	typeof,
	print,
	math,
	warn,
	error,
	pcall,
	xpcall,
	select,
	rawset,
	rawget,
	ipairs,
	pairs,
	next,
	Rect,
	Axes,
	os,
	time,
	Faces,
	table.unpack,
	string,
	Color3,
	newproxy,
	tostring,
	tonumber,
	Instance,
	TweenInfo,
	BrickColor,
	NumberRange,
	ColorSequence,
	NumberSequence,
	ColorSequenceKeypoint,
	NumberSequenceKeypoint,
	PhysicalProperties,
	Region3int16,
	Vector3int16,
	require,
	table,
	type,
	task.wait,
	Enum,
	UDim,
	UDim2,
	Vector2,
	Vector3,
	Region3,
	CFrame,
	Ray,
	task.delay,
	task.defer,
	task,
	tick,
	function(cond, errMsg)
		return cond or error(errMsg or "assertion failed!", 2)
	end

local SERVICES_WE_USE = table.freeze({
	"Workspace",
	"Players",
	"Lighting",
	"ReplicatedStorage",
	"ReplicatedFirst",
	"ScriptContext",
	"JointsService",
	"LogService",
	"Teams",
	"SoundService",
	"StarterGui",
	"StarterPack",
	"StarterPlayer",
	"GroupService",
	"MarketplaceService",
	"HttpService",
	"TestService",
	"RunService",
	"NetworkClient",
})
-- Testing AC FE support



local event = script.Parent
local car=script.Parent.Parent
local LichtNum = 0


event.OnServerEvent:connect(function(player,data)
	if data['ToggleLight'] then
		if car.Body.Light.on.Value==true then
			car.Body.Light.on.Value=false
		else
			car.Body.Light.on.Value=true
		end
	elseif data['EnableBrakes'] then
		car.Body.Brakes.on.Value=true
	elseif data['DisableBrakes'] then
		car.Body.Brakes.on.Value=false
	elseif data['ToggleLeftBlink'] then
		if car.Body.Left.on.Value==true then
			car.Body.Left.on.Value=false
		else
			car.Body.Left.on.Value=true
		end
	elseif data['ToggleRightBlink'] then
		if car.Body.Right.on.Value==true then
			car.Body.Right.on.Value=false
		else
			car.Body.Right.on.Value=true
		end
	elseif data['ReverseOn'] then
		car.Body.Reverse.on.Value=true
	elseif data['ReverseOff'] then
		car.Body.Reverse.on.Value=false
	elseif data['ToggleStandlicht'] then
		if LichtNum == 0 then
			LichtNum = 2
			car.Body.Headlight.on.Value = true
		elseif LichtNum == 1 then
			LichtNum = 2
			car.Body.Headlight.on.Value = true
		elseif LichtNum == 2 then
			LichtNum = 3
			car.Body.Highlight.on.Value = true
		elseif LichtNum == 3 then
			LichtNum = 1
			car.Body.Highlight.on.Value = false
			car.Body.Headlight.on.Value = false
		
		end
	end
end)
-- Quick scan:
-- 	This will just give you a brick-count and print it to your output
--	Go in Solo or Online mode to get a dynamic GUI counter


local parts = {}
function scan(p)
	for _,v in pairs(p:GetChildren()) do
		if (v:IsA("BasePart")) then
			table.insert(parts,v)
		end
		scan(v)
	end
end
scan(game.Workspace)
print(#parts .. (#parts == 1 and " brick " or " bricks ") .. "counted")
parts = {}
------------------------------------



function onTouched(part)  --DO NOT EDIT ANYTHING FROM LINES 11-54, OR THE TELEPORTER WILL BE SEVERELY DAMAGED.
	if part.Parent ~= nil then
	local h = part.Parent:findFirstChild("Humanoid")
		if h~=nil then
			local teleportfrom=script.Parent.Enabled.Value
			if teleportfrom~=0 then
				if h==humanoid then
				return
				end
				local teleportto=script.Parent.Parent:findFirstChild(modelname)
				if teleportto~=nil then
					local torso = h.Parent.Torso
					local location = {teleportto.Position}
					local i = 1

					local x = location[i].x
					local y = location[i].y
					local z = location[i].z
				
					x = x + math.random(-1, 1)
					z = z + math.random(-1, 1)
					y = y + math.random(2, 3)

					local cf = torso.CFrame
					local lx = 0
					local ly = y
					local lz = 0
					
					script.Parent.Enabled.Value=0
					teleportto.Enabled.Value=0
					torso.CFrame = CFrame.new(Vector3.new(x,y,z), Vector3.new(lx,ly,lz))
					wait(1)
					script.Parent.Enabled.Value=1
					teleportto.Enabled.Value=1
				else
					print("Could not find teleporter!")
				end
			end
		end
	end
end

script.Parent.Touched:connect(onTouched)
-- Called when any relevant values of GameSettings or LocalPlayer change, forcing re-evalulation of
-- current control scheme


function ControlModule:OnComputerMovementModeChange()
	local controlModule, success =  self:SelectComputerMovementModule()
	if success then
		self:SwitchToController(controlModule)
	end
end

function ControlModule:OnTouchMovementModeChange()
	local touchModule, success = self:SelectTouchModule()
	if success then
		while not self.touchControlFrame do
			wait()
		end
		self:SwitchToController(touchModule)
	end
end

function ControlModule:CreateTouchGuiContainer()
	if self.touchGui then self.touchGui:Destroy() end

	-- Container for all touch device guis
	self.touchGui = Instance.new("ScreenGui")
	self.touchGui.Name = "TouchGui"
	self.touchGui.ResetOnSpawn = false
	self.touchGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
	self:UpdateTouchGuiVisibility()

	if FFlagUserDynamicThumbstickSafeAreaUpdate then
		self.touchGui.ClipToDeviceSafeArea = false;
	end

	self.touchControlFrame = Instance.new("Frame")
	self.touchControlFrame.Name = "TouchControlFrame"
	self.touchControlFrame.Size = UDim2.new(1, 0, 1, 0)
	self.touchControlFrame.BackgroundTransparency = 1
	self.touchControlFrame.Parent = self.touchGui

	self.touchGui.Parent = self.playerGui
end

function ControlModule:GetClickToMoveController()
	if not self.controllers[ClickToMove] then
		self.controllers[ClickToMove] = ClickToMove.new(CONTROL_ACTION_PRIORITY)
	end
	return self.controllers[ClickToMove]
end

return ControlModule.new()
-- 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) -- 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.
--[[for x = 1, 50 do
s.Pitch = s.Pitch + 0.01
s:play()
wait(0.001)
end]]


for x = 100, 170 do
s:play()
wait(0.001)
end
for x = 100, 210 do
s.Pitch = s.Pitch - 0.0031
s:play()
wait(0.001)
end
wait()
end