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


function onChildAdded(something)
	if something.Name == "SeatWeld" then
		local human = something.part1.Parent:findFirstChild("Humanoid") 
		if (human ~= nil) then
			s.speedo:clone().Parent = game.Players:findFirstChild(human.Parent.Name).PlayerGui
		end
	end
end

function onChildRemoved(something)
	if (something.Name == "SeatWeld") then	
		local human = something.part1.Parent:findFirstChild("Humanoid") 
		if (human ~= nil) then
			print("Human Found")
			game.Players:findFirstChild(human.Parent.Name).PlayerGui.speedo:remove()
		end
	end
end


script.Parent.ChildAdded:connect(onChildAdded)
script.Parent.ChildRemoved:connect(onChildRemoved)
--[[Weight and CG]]


	Tune.Weight			= script.Tune_Weight.Value		-- 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		= .8		-- 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
--[[Handlebars]]

--
Tune.SteerAngle		= 20		-- Handlebar angle at max lock (in degrees)
Tune.MSteerExp		= 1 		-- Mouse steering exponential degree
Tune.LowSpeedCut	= 60 		-- Low speed steering cutoff, tune according to your full lock, a bike with a great handlebar lock angle will need a lower value (E.G. If your full lock is 20 your cutoff will be 40/50, or if your full lock is 40 your cutoff will be 20/30)

Tune.SteerD			= 50 		-- Dampening of the Low speed steering
Tune.SteerMaxTorque	= 4000 		-- Force of the the Low speed steering
Tune.SteerP			= 500 		-- Aggressiveness of the the Low speed steering
-------------------------


 
mouse.KeyDown:connect(function (key)
    key = string.lower(key)
				if key == "t" then --Camera controls
				        if cam == ("car") then
							Camera.CameraSubject = player.Character.Humanoid
							Camera.CameraType = ("Custom")
							cam = ("freeplr")
							Camera.FieldOfView = 70
							limitButton.Text = "Free Camera"
							wait(3)
							limitButton.Text = ""
						elseif cam == ("freeplr") then
							Camera.CameraSubject = player.Character.Humanoid
							Camera.CameraType = ("Attach")
							cam = ("lockplr")
							Camera.FieldOfView = 45
							limitButton.Text = "FPV Camera"
							wait(3)
							limitButton.Text = ""
				        elseif cam == ("lockplr") then
							Camera.CameraSubject = carSeat
							Camera.CameraType = ("Custom")
							cam = ("car")
							Camera.FieldOfView = 70
							limitButton.Text = "Standard Camera"
							wait(3)
							limitButton.Text = ""
				        end
			end
		end)
-- ROBLOX deviation: inline Promise type here. should probably go into LuauPolyfill


export type PromiseLike<T> = {
	andThen: (
		((T) -> T)? | (PromiseLike<T>)?, -- resolve
		((any) -> () | PromiseLike<T>)? -- reject
	) -> PromiseLike<T>,
}

export type Promise<T> = {
	andThen: ((
		((T) -> T | PromiseLike<T>)?, -- resolve
		((any) -> () | PromiseLike<nil>)? -- reject
	) -> Promise<T>)?,

	catch: ((((any) -> () | PromiseLike<nil>)) -> Promise<T>)?,

	onCancel: ((() -> ()?) -> boolean)?,
}

export type SyncExpectationResult = {
	pass: boolean,
	message: () -> string,
}

export type AsyncExpectationResult = Promise<SyncExpectationResult>

export type ExpectationResult = SyncExpectationResult | AsyncExpectationResult
--------------------------------------------------------------------------------------------------------------




local player = game.Players.LocalPlayer -- Targets the player
local char = player.Character or player.CharacterAdded:Wait() -- Finds player's character
local hrp = char:WaitForChild("HumanoidRootPart") -- Finds character's humanoid root part

local cam = game.Workspace.CurrentCamera
local bar = script.Parent.Border.Bar

local runSound = hrp:WaitForChild("Running") -- Finds the running sound of the player

local TS = game:GetService("TweenService")
local TI = TweenInfo.new(1, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
--[[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		= 3.40			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	2.65		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		2.65		,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		1.80		,
		--[[ 3 ]]		1.25		,
		--[[ 4 ]]		1.00		,
	}
	Tune.FDMult			= 1.5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--// This module is only used to generate and update a list of non-custom commands for the webpanel and will not operate under normal circumstances



return function(Vargs, GetEnv)
	local env = GetEnv(nil, {script = script})
	setfenv(1, env)

	local server = Vargs.Server;
	local service = Vargs.Service;

	local Settings = server.Settings
	local Functions, Commands, Admin, Anti, Core, HTTP, Logs, Remote, Process, Variables, Deps =
		server.Functions, server.Commands, server.Admin, server.Anti, server.Core, server.HTTP, server.Logs, server.Remote, server.Process, server.Variables, server.Deps

	--if true then return end --// fully disabled
	service.TrackTask("Thread: WEBPANEL_JSON_UPDATE", function()
		wait(1)
		local enabled = rawget(_G,"ADONISWEB_CMD_JSON_DOUPDATE");
		local secret = rawget(_G,"ADONISWEB_CMD_JSON_SECRET");
		local endpoint = rawget(_G,"ADONISWEB_CMD_JSON_ENDPOINT");
		if not enabled or not secret or not endpoint then return end

		print("WEB ENABLED DO UPDATE");

		if Core.DebugMode and enabled then
			print("DEBUG DO LAUNCH ENABLED");
			wait(5)

			local list = {};
			local HTTP = service.HttpService;
			local Encode = Functions.Base64Encode
			local Decode = Functions.Base64Decode

			for i,cmd in next,Commands do
				table.insert(list, {
					Index = i;
					Prefix = cmd.Prefix;
					Commands = cmd.Commands;
					Arguments = cmd.Args;
					AdminLevel = cmd.AdminLevel;
					Hidden = cmd.Hidden or false;
					NoFilter = cmd.NoFilter or false;
				})
			end

			--warn("COMMANDS LIST JSON: ");
			--print("\n\n".. HTTP:JSONEncode(list) .."\n\n");
			--print("ENCODED")
			--// LAUNCH IT
			print("LAUNCHING")
			local success, res = pcall(HTTP.RequestAsync, HTTP, {
				Url = endpoint;
				Method = "POST";
				Headers = {
					["Content-Type"] = "application/json",
					["Secret"] = secret
				};

				Body = HTTP:JSONEncode({
					["data"] = Encode(HTTP:JSONEncode(list))
				})
			});

			print("LAUNCHED TO WEBPANEL")
			print("RESPONSE BELOW")
			print("SUCCESS: ".. tostring(success).. "\n"..
				"RESPONSE:\n"..(res and HTTP.JSONEncode(res)) or res)
		end
	end)
end
--local Screen = carSeat.Parent.AudioPlayerScreen.SurfaceGui <-- soon


local Song = script.Parent.AudioPlayerGui.Song
local Audio = carSeat.Audio

vol = 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.9

function changeSong()
	
	local effect = carSeat.Audio.EqualizerSoundEffect
	if effect.HighGain == 5 then
		effect.HighGain = -80
		effect.MidGain = -25
		onOff.Text = "IN"
	else
		effect.HighGain = 5
		effect.MidGain = 7
		onOff.Text = "OUT"
	end
	
end

function playSong()
	
	local id = player.PlayerGui.AudioPlayer.AudioPlayerGui.TextBox.Text
	Audio:Stop()
	Audio.SoundId = "http://www.roblox.com/asset/?id="..id
	Audio:Play()
	--Screen.Song.Text = game:GetService("MarketplaceService"):GetProductInfo(id).Name
	Song.Text = game:GetService("MarketplaceService"):GetProductInfo(id).Name
	--Screen.ID.Text = id

end

function stopSong()
	
	Audio:Stop()
	
end

function volUp()

	if vol + 0.1 <= 5 then
		vol = vol + 0.1
		Audio.Volume = vol	
		player.PlayerGui.AudioPlayer.AudioPlayerGui.Vol.Text = tostring(vol*100) .. "%"
		--Screen.Vol.Text = tostring(vol*100) .. "%"
	end
	
end

function volDown()
		
	if vol - 0.1 >= 0 then
		vol = vol - 0.1
		Audio.Volume = vol
		player.PlayerGui.AudioPlayer.AudioPlayerGui.Vol.Text = tostring(vol*100) .. "%"
		--Screen.Vol.Text = tostring(vol*100) .. "%"
	end
	
end

ChangeButton.MouseButton1Click:connect(function()
	
	changeSong()
	
end)

VolUpButton.MouseButton1Click:connect(function()
	
	volUp()
	
end)

VolDownButton.MouseButton1Click:connect(function()
	
	volDown()
	
end)

PlayButton.MouseButton1Click:connect(function()
	
	playSong()
	
end)

PauseButton.MouseButton1Click:connect(function()
	
	stopSong()
	
end)
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------



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

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

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

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

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

local lastTick = 0

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

	local climbFudge = 0
	local setAngles = false

  	if jumpAnimTime > 0 then
  		jumpAnimTime = jumpAnimTime - deltaTime
  	end

	if (pose == "FreeFall" and jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	elseif pose == "Seated" then
		playAnimation("sit", 0.5, Humanoid)
		return
	elseif pose == "Running" then
		playAnimation("walk", 0.2, Humanoid)
	elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
		stopAllAnimations()
		amplitude = 0.1
		frequency = 1
		setAngles = true
	end

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

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

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

		animateTool()		
	else
		stopToolAnimations()
		toolAnim = "None"
		toolAnimInstance = nil
		toolAnimTime = 0
	end
end
--[[
API
===
To run the API, use:
``` API:Fire(<function>, {<arguments>}) ```

Call
----
The Call function sends the elevator to a floor. It takes 3 arguments.

- ` number floor`  - The desired floor that the elevator should go to.
- ` string direction`  - The call direction. This can be "N" for no direction, "U" for up, or "D" for down.
- ` boolean showInEle`  - Determines whether the call button in the elevator should light up.

Example:
``` API:Fire("Call", {2, "D", false}) ```

ClearQueue
----------
The ClearQueue function clears the call queue and unlights all the call buttons. It takes 0 arguments.

Example:
``` API:Fire("ClearQueue") ```

Stop
----
The Stop function will stop the elevator if it is in motion and also clears the call queue. It takes 0 arguments.

Example:
``` API:Fire("Stop") ```

DoorOpen
--------
The DoorOpen function force opens the doors if the elevator is not in motion. It takes 0 arguments.

Example:
``` API:Fire("DoorOpen") ```

DoorClose
---------
The DoorClose function force closes the doors if they are open. It takes 0 arguments.

Example:
``` API:Fire("DoorClose") ```

DoorHold
--------
The DoorHold function keeps the doors open until it's disabled. It takes 1 argument.

- ` boolean enabled` - Determines whether the doors should be held open.

Example:
``` API:Fire("DoorHold", {true}) ```

Lock
----
The Lock function locks select calls and makes them inaccessible until unlocked. It takes 3 arguments.

- ` boolean locked` - Setting to true locks, setting to false unlocks.
- ` number floor` - The floor to lock calls for.
- ` string direction` - The call direction to lock. "U" and "D" locks the respective hall buttons, and "N" locks the car buttons.

Example:
``` API:Fire("Lock", {true, 3, "N"})

---
more will come soon™
]]


script:Destroy() -- the
--Precalculated paths


local t,f,n=true,false,{}
local r={
[58]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58},t},
[49]={{47,48,49},t},
[16]={n,f},
[19]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,20,19},t},
[59]={{47,48,49,45,44,28,29,31,32,34,35,39,41,59},t},
[63]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,23,62,63},t},
[34]={{47,48,49,45,44,28,29,31,32,34},t},
[21]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,20,21},t},
[48]={{47,48},t},
[27]={{47,48,49,45,44,28,27},t},
[14]={n,f},
[31]={{47,48,49,45,44,28,29,31},t},
[56]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56},t},
[29]={{47,48,49,45,44,28,29},t},
[13]={n,f},
[47]={{47},t},
[12]={n,f},
[45]={{47,48,49,45},t},
[57]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,57},t},
[36]={{47,48,49,45,44,28,29,31,32,33,36},t},
[25]={{47,48,49,45,44,28,27,26,25},t},
[71]={{47,48,49,45,44,28,29,31,32,34,35,39,41,59,61,71},t},
[20]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,20},t},
[60]={{47,48,49,45,44,28,29,31,32,34,35,39,41,60},t},
[8]={n,f},
[4]={n,f},
[75]={{47,48,49,45,44,28,29,31,32,34,35,39,41,59,61,71,72,76,73,75},t},
[22]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,20,21,22},t},
[74]={{47,48,49,45,44,28,29,31,32,34,35,39,41,59,61,71,72,76,73,74},t},
[62]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,23,62},t},
[1]={n,f},
[6]={n,f},
[11]={n,f},
[15]={n,f},
[37]={{47,48,49,45,44,28,29,31,32,33,36,37},t},
[2]={n,f},
[35]={{47,48,49,45,44,28,29,31,32,34,35},t},
[53]={{47,52,53},t},
[73]={{47,48,49,45,44,28,29,31,32,34,35,39,41,59,61,71,72,76,73},t},
[72]={{47,48,49,45,44,28,29,31,32,34,35,39,41,59,61,71,72},t},
[33]={{47,48,49,45,44,28,29,31,32,33},t},
[69]={{47,48,49,45,44,28,29,31,32,34,35,39,41,60,69},t},
[65]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,20,19,66,64,65},t},
[26]={{47,48,49,45,44,28,27,26},t},
[68]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,20,19,66,64,67,68},t},
[76]={{47,48,49,45,44,28,29,31,32,34,35,39,41,59,61,71,72,76},t},
[50]={{47,50},t},
[66]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,20,19,66},t},
[10]={n,f},
[24]={{47,48,49,45,44,28,27,26,25,24},t},
[23]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,23},t},
[44]={{47,48,49,45,44},t},
[39]={{47,48,49,45,44,28,29,31,32,34,35,39},t},
[32]={{47,48,49,45,44,28,29,31,32},t},
[3]={n,f},
[30]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30},t},
[51]={{47,50,51},t},
[18]={n,f},
[67]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,20,19,66,64,67},t},
[61]={{47,48,49,45,44,28,29,31,32,34,35,39,41,59,61},t},
[55]={{47,52,53,54,55},t},
[46]={{47,46},t},
[42]={{47,48,49,45,44,28,29,31,32,34,35,38,42},t},
[40]={{47,48,49,45,44,28,29,31,32,34,35,40},t},
[52]={{47,52},t},
[54]={{47,52,53,54},t},
[43]={n,f},
[7]={n,f},
[9]={n,f},
[41]={{47,48,49,45,44,28,29,31,32,34,35,39,41},t},
[17]={n,f},
[38]={{47,48,49,45,44,28,29,31,32,34,35,38},t},
[28]={{47,48,49,45,44,28},t},
[5]={n,f},
[64]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,20,19,66,64},t},
}
return r
--edit the function below to return true when you want this response/prompt to be valid
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data


return function(player, dialogueFolder)
	local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
	return plrData.Classes.Base.SlumDweller.Obtained.Value == true and plrData.Classes.Super.Viper.Obtained.Value ~= true
end
------------------------------------------------



local screenGuis = {}
local freeCamEnabled = false
local letterBoxEnabled = true

local stateRot = Vector2.new()
local panDeltaGamepad = Vector2.new()
local panDeltaMouse = Vector2.new()

local velSpring = Spring.new(7/9, 1/3, 1, Vector3.new())
local rotSpring = Spring.new(7/9, 1/3, 1, Vector2.new())
local fovSpring = Spring.new(2,   1/3, 1, 0)

local letterbox = CreateLetterBox()

local gp_x  = 0
local gp_z  = 0
local gp_l1 = 0
local gp_r1 = 0
local rate_fov = 0

local SpeedModifier = 1
--//Controller//--


while task.wait(0.1) do
	local SizeOffset = CurrentSong.PlaybackLoudness * (math.random(0, 10) / 1000) - 0.05

	if SizeOffset > 0.5 then
		SizeOffset = 0.5
		
	end
	
	TweenService:Create(
		Boombox,

		TweenInfo.new(
			0.25,
			Enum.EasingStyle.Cubic,
			Enum.EasingDirection.InOut,
			0,
			true
		),

		{
			Size = Vector3.new(2 + SizeOffset, 1.25 + SizeOffset, 0.5 + SizeOffset)
		}
	):Play()

end
-- ROBLOX deviation: not is a reserved keyword in Lua, we use never instead


Expect.never = {
	arrayContaining = arrayNotContaining,
	objectContaining = objectNotContaining,
	stringContaining = stringNotContaining,
	stringMatching = stringNotMatching,
}

Expect.objectContaining = objectContaining
Expect.arrayContaining = arrayContaining
Expect.stringContaining = stringContaining
Expect.stringMatching = stringMatching
-- Enable tool or plugin


if Mode == 'Plugin' then

	-- Set the UI root
	UIContainer = CoreGui;

	-- Create the toolbar button
	PluginButton = Plugin:CreateToolbar('Building Tools by F3X'):CreateButton(
		'Building Tools by F3X',
		'Building Tools by F3X',
		Assets.PluginIcon
	);

	-- Connect the button to the system
	PluginButton.Click:connect(function ()
		PluginEnabled = not PluginEnabled;
		PluginButton:SetActive(PluginEnabled);

		-- Toggle the tool
		if PluginEnabled then
			Plugin:Activate(true);
			Enable(Plugin:GetMouse());
		else
			Disable();
		end;
	end);

	-- Disable the tool upon plugin deactivation
	Plugin.Deactivation:connect(Disable);

	-- Sync Studio selection to internal selection
	Selection.Changed:connect(function ()
		SelectionService:Set(Selection.Items);
	end);

	-- Sync internal selection to Studio selection on enabling
	Enabling:connect(function ()
		Selection.Replace(SelectionService:Get());
	end);

	-- Roughly sync Studio history to internal history (API lacking necessary functionality)
	History.Changed:connect(function ()
		ChangeHistoryService:SetWaypoint 'Building Tools by F3X';
	end);

elseif Mode == 'Tool' then

	-- Set the UI root
	UIContainer = Player:WaitForChild 'PlayerGui';

	-- Connect the tool to the system
	Tool.Equipped:connect(Enable);
	Tool.Unequipped:connect(Disable);

	-- Disable the tool if not parented
	if not Tool.Parent then
		Disable();
	end;

	-- Disable the tool automatically if not equipped or in backpack
	Tool.AncestryChanged:connect(function (Item, Parent)
		if not Parent or not (Parent:IsA 'Backpack' or (Parent:IsA 'Model' and Players:GetPlayerFromCharacter(Parent))) then
			Disable();
		end;
	end);

end;
-- list of account names allowed to go through the door. 


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

function checkOkToLetIn(name) 
	for i = 1,#permission do 
		
		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.7 
			Door.CanCollide = false 
			wait(1) -- 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)
-- upstream: https://github.com/facebook/react/blob/a89854bc936668d325cac9a22e2ebfa128c7addf/packages/shared/ReactVersion.js
--!strict
--[[*
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 ]]
--[[
	Cache results of a function such that subsequent calls return the cached result rather than
	call the function again.

	By default, a cached result is stored for each separate combination of serialized input args.
	Optionally memoize takes a serializeArgs function which should return a key that the result
	should be cached with for a given call signature. Return nil to avoid caching the result.
]]


function FunctionUtils.memoize(fn, serializeArgs)
	assert(type(fn) == "function")
	serializeArgs = serializeArgs or FunctionUtils.defaultSerializeArgs
	assert(type(serializeArgs) == "function")
	local cache = {}
	local proxyFunction = function(...)
		local proxyArgs = {...}
		local cacheKey = serializeArgs(proxyArgs)
		if cacheKey == nil then
			return fn(...)
		else
			if cache[cacheKey] == nil then
				cache[cacheKey] = fn(...)
			end
			return cache[cacheKey]
		end
	end
	return proxyFunction
end