Roblox/luau_corpus huggingface dataset:
-- Core connections
Connections = {};

function ClearConnections()
	-- Clears and disconnects temporary connections
	for Index, Connection in pairs(Connections) do
		Connection:Disconnect();
		Connections[Index] = nil;
	end;
end;

function InitializeUI()
	-- Sets up the UI

	-- Ensure UI has not yet been initialized
	if UI then
		return;
	end;

	-- Create the root UI
	UI = Instance.new('ScreenGui')
	UI.Name = 'Building Tools by F3X (UI)'

	-- Set up dock
	Dock = Cheer(Tool.Interfaces.Dock, UI).Start(getfenv(0));

	-- Clean up UI on tool teardown
	UIMaid = Maid.new()
	Tool.AncestryChanged:Connect(function (Item, Parent)
		if Parent == nil then
			UIMaid:Destroy()
		end
	end)

	-- Register explorer button on dock
	ExplorerDockButton = Dock.AddSelectionButton(Assets.ExplorerDockIcon, 'EXPLORER\n(Shift + H)')
	ExplorerDockButton.Activated:Connect(ToggleExplorer)
	ExplorerDockButton.ImageTransparency = 0.66

end;

local UIElements = Tool:WaitForChild 'UI'
local ExplorerTemplate = require(UIElements:WaitForChild 'Explorer')

function ToggleExplorer()
	if not ExplorerVisible then
		OpenExplorer()
	else
		CloseExplorer()
	end
end

function OpenExplorer()

	-- Ensure explorer not already open
	if ExplorerHandle then
		return
	end

	-- Initialize explorer
	Explorer = Roact.createElement(ExplorerTemplate, {
		Core = getfenv(0),
		Close = CloseExplorer,
		Scope = Targeting.Scope
	})

	-- Mount explorer
	ExplorerHandle = Roact.mount(Explorer, UI, 'Explorer')
	ExplorerVisible = true

	-- Unmount explorer on tool cleanup
	UIMaid.Explorer = Support.Call(Roact.unmount, ExplorerHandle)
	UIMaid.ExplorerScope = Targeting.ScopeChanged:Connect(function (Scope)
		local UpdatedProps = Support.Merge({}, Explorer.props, { Scope = Scope })
		local UpdatedExplorer = Roact.createElement(ExplorerTemplate, UpdatedProps)
		ExplorerHandle = Roact.update(ExplorerHandle, UpdatedExplorer)
	end)

	-- Update dock
	ExplorerDockButton.ImageTransparency = 0

end

function CloseExplorer()

	-- Clean up explorer
	UIMaid.Explorer = nil
	UIMaid.ExplorerScope = nil
	ExplorerHandle = nil
	ExplorerVisible = nil

	-- Update dock
	ExplorerDockButton.ImageTransparency = 0.66

end
--- VARIABLES/CONSTANTS ---

CAMERA_DEADZONE = 0.03

player = game.Players.LocalPlayer
mouse = player:GetMouse()
camera = workspace.Camera

vps = camera.ViewportSize

local screen_mouse_pos
local mouse_pos
local root_pos
local x_dist
-- ROBLOX deviation: Currently we have translated a limited subset of the jest-mock
-- functionality just to bootstrap the development of the spyMatchers. As we have
-- a need for more functionality, we will revisit this file and continue the translation
-- efforts.

local CurrentModule = script
local Packages = CurrentModule.Parent

local LuauPolyfill = require(Packages.LuauPolyfill)
local Array = LuauPolyfill.Array
local Set = LuauPolyfill.Set
local Symbol = LuauPolyfill.Symbol

type Array<T> = LuauPolyfill.Array<T>
type Object = LuauPolyfill.Object

local exports = {}

local ModuleMockerClass = {}
--[[**
	ensures value is a number where min <= value

	@param min The minimum to use

	@returns A function that will return true iff the condition is passed
**--]]
function t.numberMin(min)
	return function(value)
		local success, errMsg = t.number(value)
		if not success then
			return false, errMsg or ""
		end

		if value >= min then
			return true
		else
			return false, string.format("number >= %s expected, got %s", min, value)
		end
	end
end
--[[Instructions:
   Put this script IN A BRICK! Then in the same brick insert a ClickDetector, Follow the instructions below]]


function onClicked()
script.Parent.Woosh:Play()
script.Parent.BodyGyro.maxTorque = Vector3.new(4e+009, 0, 4e+009)
wait(3)
script.Parent.BodyGyro.maxTorque = Vector3.new(0, 0, 0)

end 
  script.Parent.ClickDetector.MouseClick:connect(onClicked)
--// # key, Wail
mouse.KeyDown:connect(function(key)
	if key=="f" then 
		if veh.Lightbar.middle.Wail.IsPlaying == true then
		veh.Lightbar.middle.Beep:Play()
		veh.Lightbar.middle.Wail:Stop()
		script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		else
	    veh.Lightbar.middle.Beep:Play() 
		veh.Lightbar.middle.Wail:Play()
		script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(215, 135, 110)
		script.Parent.Parent.Sirens.Yelp.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		script.Parent.Parent.Sirens.Priority.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		end
	end
end)
------------------------------------------------------------------------------------------------------------------------------
--// Module

local module = {};

for _, class in next, {"TextLabel", "TextBox", "TextButton", "TextReplace"} do
	module[string.sub(class, 5)] = function(fontName, child)
		return customFont.new(fontName, class == "TextReplace" and child or class, class == "TextButton" or (class == "TextReplace" and child:IsA("TextButton")));
	end;
end;

wait(); -- top bar can mess with stuff if fonts called instantly

return module;
-------(note: if it is pistol or knife then 1 is on right leg, 2 is on left leg, 3 is in the back of your pants and 4 is in the front of your pants)
model = nil--gun model, that is
distance = 0.75--this is the distance between the part(torso/leg) and the gun. DON'T MAKE negitive
rotation = 225--this is the turning in degrees.
--// SS3 controls for AC6 by Itzt, originally for 2014 Infiniti QX80. i don't know how to tune ac lol
 
wait(0.1)
local player = game.Players.LocalPlayer
local HUB = script.Parent.HUB
local HUB2 = script.Parent.HUB2
local limitButton = HUB.Name
local FE = game.Workspace.FilteringEnabled
local lightOn = false
local Camera = game.Workspace.CurrentCamera
local cam = script.Parent.nxtcam.Value
local carSeat = script.Parent.CarSeat.Value
local mouse = game.Players.LocalPlayer:GetMouse()
local windows = false
local handler = carSeat:WaitForChild('Filter')
local winfob = HUB.Parent.Music
local pal = false
local palpal = HUB.Parent.Palette
local red = 0
local green = 0
local blue = 1
local debounce = false

script.Parent.Infotainment.Main.User.Text = "Hello, "..(player.Name)

local scr = false
--[=[
	@param parent Instance
	@return RBXScriptConnection

	Scans all descendants of `parent` and loads any ModuleScripts found, then
	calls `Component.new` on those loaded modules.

	Each component module class must have a `Tag` string property to map it
	to the proper tag.
]=]
function Component.Auto(parent)
	local function Setup(moduleScript)
		local m = require(moduleScript)
		assert(type(m) == "table", "Expected table for component")
		assert(type(m.Tag) == "string", "Expected .Tag property")
		Component.new(m.Tag, m, m.RenderPriority, m.RequiredComponents)
	end
	for _,v in ipairs(parent:GetDescendants()) do
		if v:IsA("ModuleScript") then
			Setup(v)
		end
	end
	return parent.DescendantAdded:Connect(function(v)
		if v:IsA("ModuleScript") then
			Setup(v)
		end
	end)
end
-- ROBLOX FIXME: make proper platform check
-- local isWindows = process.platform == "win32"
local isWindows = false -- UserInputService:GetPlatform() == 0
local ARROW = " \u{203A} "
exports.ARROW = ARROW
local ICONS = {
	failed = if isWindows then "\u{00D7}" else "\u{2715}",
	pending = "\u{25CB}",
	success = if isWindows then "\u{221A}" else "\u{2713}",
	todo = "\u{270E}",
}
exports.ICONS = ICONS
local CLEAR = if isWindows then "\x1B[2J\x1B[0f" else "\x1B[2J\x1B[3J\x1B[H"
exports.CLEAR = CLEAR
return exports
-- Définir la caméra personnalisée
local camera = workspace.CurrentCamera
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
-- services

local ReplicatedStorage		= game:GetService("ReplicatedStorage")
local ServerScriptService	= game:GetService("ServerScriptService")
local RunService			= game:GetService("RunService")
local Players				= game:GetService("Players")
-- ROBLOX deviation: Symbol is always available in polyfills
local testSymbol = Symbol.for_("react.test.json")

local function getPropKeys(object: ReactTestObject)
	local props = object.props

	return if props ~= nil
		then Array.sort(Array.filter(Object.keys(props), function(key)
			return props[key] ~= nil
		end))
		else {}
end
---------------
--// Events
---------------
Players.PlayerAdded:Connect(function()
	task.wait(.1)
	updateGUI()
end)

Players.PlayerRemoving:Connect(function()
	task.wait(.1)
	updateGUI()
end)
--Public functions

local module = {}

function module.MouseEnterLeaveEvent(UIObj)
	if CurrentItems[UIObj] then
		return CurrentItems[UIObj].EnteredEvent.Event,CurrentItems[UIObj].LeaveEvent.Event
	end     

	local newObj = {}

	newObj.UIObj = UIObj

	local EnterEvent = Instance.new("BindableEvent")
	local LeaveEvent = Instance.new("BindableEvent")

	newObj.EnteredEvent = EnterEvent
	newObj.LeaveEvent = LeaveEvent
	newObj.MouseWasIn = false
	CurrentItems[UIObj] = newObj

	UIObj.AncestryChanged:Connect(function()
		if not UIObj.Parent then
			--Assuming the object has been destroyed as we still dont have a .Destroyed event
			--If for some reason you parent your UI elements to nil after calling this, then parent it back again, mouse over will still have been disconnected.
			EnterEvent:Destroy()    
			LeaveEvent:Destroy()    
			CurrentItems[UIObj] = nil
		end
	end)

	return EnterEvent.Event,LeaveEvent.Event
end

return module
-- A simple function to extend reverse paths from (d - 1) to d changes
-- when reverse and forward paths cannot yet overlap.
local function extendPathsR(
	d: number,
	aStart: number,
	bStart: number,
	bR: number,
	isCommon: IsCommon,
	aIndexesR: Indexes,
	iMaxR: number
): number
	-- Unroll the first iteration.
	local iR = 0
	local kR = d -- kR = d - 2 * iR
	-- ROBLOX FIXME? should the values inserted into aIndexesR be 1-based so we don't have to adjust in several places here?
	local aFirst = aIndexesR[iR + 1] -- in first iteration always insert
	local aIndexPrev1 = aFirst -- prev value of [iR - 1] in next iteration
	aIndexesR[iR + 1] -= countCommonItemsR(aStart, aFirst - 1, bStart, bR + aFirst - kR - 1, isCommon)

	-- Optimization: skip diagonals in which paths cannot ever overlap.
	local nR = d < iMaxR and d or iMaxR

	-- The diagonals kR are odd when d is odd and even when d is even.
	iR += 1
	kR -= 2
	while iR <= nR do
		-- To get first point of path segment, move one change in reverse direction
		-- from last point of previous path segment in an adjacent diagonal.
		-- In last possible iteration when iR === d and kR === -d always delete.
		if iR ~= d and aIndexesR[iR + 1] < aIndexPrev1 then
			aFirst = aIndexesR[iR + 1] -- vertical to insert from b
		else
			aFirst = aIndexPrev1 - 1 -- horizontal to delete from a

			if aFirst < aStart then
				-- Optimization: delete moved past left of graph.
				return iR - 1
			end
		end

		-- To get last point of path segment, move along diagonal of common items.
		aIndexPrev1 = aIndexesR[iR + 1]
		aIndexesR[iR + 1] = aFirst - countCommonItemsR(aStart, aFirst - 1, bStart, bR + aFirst - kR - 1, isCommon)
		iR += 1
		kR -= 2
	end

	return iMaxR
end
--  fun = what they have to type (make sure it is lowercased)
--        The first value in the table is what shows in the cmds
--                        Make sure to set this "2" to the rank you want players to have to use this
--                            This function is what runs the command when it is called
	fun = {"Fun [Player]";{2};{"Player"};function(plr, cmds)
		for i,v in pairs(cmds[1]) do -- This would basically get all the players it could find. Example: ;fun me would return only you in the table.
			print(v.Name)
		end
	end;};
}
--// Unused (Don't delete)
	RestMode = false;
	AttachmentsEnabled = true;
	UIScope = true;
	CanSlideLock = true;
-- Espera 2 segundos antes de reproducir el sonido
wait(4)
--easter egg
mouse.KeyDown:connect(function(key)
	if key=="o" then
		Heat = BlowupTemp-11
	end
end)

if not FE then
	
radiator.Oil.Enabled = false
radiator.Antifreeze.Enabled = false
radiator.Liquid.Volume = 0
radiator.Fan:Play()
radiator.Fan.Pitch = 1+FanSpeed
radiator.Steam:Play()
radiator.Liquid:Play()
script.Blown.Value = false

while wait(.2) do
	if Heat > FanTemp and Fan == true then
		FanCool = -FanSpeed
		radiator.Fan.Volume = FanVolume
	else
		FanCool = 0
		radiator.Fan.Volume = 0
	end
	
	Load = ((script.Parent.Parent.Parent.Parent.Values.Throttle.Value*script.Parent.Parent.Parent.Parent.Values.RPM.Value*10*OverheatSpeed)/math.ceil((car.DriveSeat.Velocity.magnitude+.0000001)/100)/75000)-CoolingEfficiency
	Heat = math.max(RunningTemp,(Heat+Load)+FanCool)
	
	if Heat >= BlowupTemp then
		Heat = BlowupTemp
		radiator.Break:Play()
		radiator.Liquid.Volume = .5
		radiator.Oil.Enabled = true
		radiator.Antifreeze.Enabled = true
		script.Parent.Parent.Parent.Parent.IsOn.Value = false
		script.Blown.Value = true
	elseif Heat >= BlowupTemp-10 then
		radiator.Smoke.Transparency = NumberSequence.new((BlowupTemp-Heat)/10,1)
		radiator.Smoke.Enabled = true
		radiator.Steam.Volume = math.abs(((BlowupTemp-Heat)-10)/10)
	else
		radiator.Smoke.Enabled = false
		radiator.Steam.Volume = 0
	end
	
	script.Celsius.Value = Heat
	script.Parent.Temp.Text = math.floor(Heat).."°c"
end

else

	handler:FireServer("Initialize",FanSpeed)
while wait(.2) do
	
	if Heat > FanTemp and Fan == true then
		FanCool = -FanSpeed
		handler:FireServer("FanVolume",FanVolume)
	else
		FanCool = 0
		handler:FireServer("FanVolume",0)
	end
	
	Load = ((script.Parent.Parent.Parent.Parent.Values.Throttle.Value*script.Parent.Parent.Parent.Parent.Values.RPM.Value*10*OverheatSpeed)/math.ceil((car.DriveSeat.Velocity.magnitude+.0000001)/100)/75000)-CoolingEfficiency
	Heat = math.max(RunningTemp,(Heat+Load)+FanCool)
	
	if Heat >= BlowupTemp then
		Heat = BlowupTemp
		handler:FireServer("Blown")
		script.Parent.Parent.Parent.Parent.IsOn.Value = false
		script.Blown.Value = true
	elseif Heat >= BlowupTemp-10 then
		handler:FireServer("Smoke",true,BlowupTemp,Heat)
	else
		handler:FireServer("Smoke",false,BlowupTemp,Heat)
	end
	
	script.Celsius.Value = Heat
	script.Parent.Temp.Text = math.floor(Heat).."°c"
end
end
--[[local url = ''

local http = game:GetService("HttpService")

local HookData = {
	['username'] = player.Name,
	
	['content'] = msg
	
	
}

HookData = http:JSONEncode(HookData)
http:PostAsync(url, HookData)--]]




end)

game.ReplicatedStorage.Messages.Faction.OnServerEvent:Connect(function(player, sender, msg)
		local filter = game:GetService("Chat"):FilterStringForBroadcast(msg, player)
	game.ReplicatedStorage.Messages.Faction:FireAllClients(filter, sender)

end)
-- All characters have a Humanoid object
-- If the model has one, it is a character
 local h = part.Parent:findFirstChild("Humanoid") -- Find Humanoids in whatever touched this
 if (h ~=nil) then -- If there is a Humanoid then
       h.Health = h.MaxHealth -- Set the health to maximum (full healing)
 end
 end

script.Parent.Touched:connect(onTouched) -- Make it call onTouched when touched
-- CONNECTIONS
local iconCreationCount = 0
IconController.iconAdded:Connect(function(icon)
	topbarIcons[icon] = true
	if IconController.gameTheme then
		icon:setTheme(IconController.gameTheme)
	end
	icon.updated:Connect(function()
		IconController.updateTopbar()
	end)
	-- When this icon is selected, deselect other icons if necessary
	icon.selected:Connect(function()
		local allIcons = IconController.getIcons()
		for _, otherIcon in pairs(allIcons) do
			if icon.deselectWhenOtherIconSelected and otherIcon ~= icon and otherIcon.deselectWhenOtherIconSelected and otherIcon:getToggleState() == "selected" then
				otherIcon:deselect(icon)
			end
		end
	end)
	-- Order by creation if no order specified
	iconCreationCount = iconCreationCount + 1
	icon:setOrder(iconCreationCount)
	-- Apply controller view if enabled
	if IconController.controllerModeEnabled then
		IconController._enableControllerModeForIcon(icon, true)
	end
	IconController:_updateSelectionGroup()
	IconController.updateTopbar()
end)

IconController.iconRemoved:Connect(function(icon)
	topbarIcons[icon] = nil
	icon:setEnabled(false)
	icon:deselect()
	icon.updated:Fire()
	IconController:_updateSelectionGroup()
end)
--gun parts
local gunparts = {}

for i,v in pairs(gunmodel:GetDescendants()) do
	if v:IsA("BasePart") then
		table.insert(gunparts, v)
	end
end

function guntransparency(tr)
	for i,v in pairs(gunparts) do --looping through an already made table alone is faster than getdescendants and then looping
		v.LocalTransparencyModifier = tr
	end
end

function modeltransparency(m, tr) -- this is for stuff like fps mags
	for i,v in pairs(m:GetDescendants()) do
		if v:IsA("BasePart") then
			v.LocalTransparencyModifier = tr
		end
	end
end
--// Bullet Physics
	BulletPhysics = Vector3.new(0,55,0); -- Drop fixation: Lower number = more drop
	BulletSpeed = 2700; -- Bullet Speed
	BulletSpread = 1; -- How much spread the bullet has
	
	ExploPhysics = Vector3.new(0,20,0); -- Drop for explosive rounds
	ExploSpeed = 600; -- Speed for explosive rounds
	
	BulletDecay = 10000; -- How far the bullet travels before slowing down and being deleted (BUGGY)
--// Extras
	WalkAnimEnabled = true; -- Set to false to disable walking animation, true to enable
	SwayEnabled = true;	 -- Set to false to disable sway, true to enable
	TacticalModeEnabled = true; -- SET THIS TO TRUE TO TURN ON TACTICAL MODEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
-- AdornmentData type
type AdornmentData = VisualizerCache.AdornmentData
--	====================
--	CHARGED SHOT
--	Make a gun charging before firing. Useful for a gun like "Railgun" or "Laser Cannon"
--	====================
		
		ChargedShotEnabled = false;
		ChargingTime = 1;
--Main function
local function AttachAuraControl(source_part, eff_cont) --(source_part, effect_container)
	
	local AnimObj
	
	local function Start()
		AnimObj = {}
		AnimObj["MainPart"] = EFFECT_LIB.NewInvisiblePart()
		
		AnimObj["Emitter"] = script.ConspiracyEff:clone()
		AnimObj["Emitter"].Parent = AnimObj["MainPart"]
		
		AnimObj["MainPart"].Parent = eff_cont
	end
	
	local function Update()
		local loop = EFFECT_LIB.Loop(1)
		AnimObj["MainPart"].CFrame = source_part:GetRenderCFrame() * CFrame.Angles(0, math.rad(loop * 360), 0) * CFrame.new(0, 0, -3)
	end
	
	local function Stop()
		eff_cont:ClearAllChildren()
		AnimObj = nil
	end
	
	return {Start = Start, Update = Update, Stop = Stop}
end

return AttachAuraControl
-- ROBLOX deviation: no optional capturing group in Lua string patterns so we try matching against both
local ANONYMOUS_PROMISE_IGNORE = "^%s+at Promise %(<anonymous>%).*$"
local ANONYMOUS_NEW_PROMISE_IGNORE = "^%s+at new Promise %(<anonymous>%).*$"
local ANONYMOUS_GENERATOR_IGNORE = "^%s+at Generator.next %(<anonymous>%).*$"
local NATIVE_NEXT_IGNORE = "^%s+at next %(native%).*$"
--[[Weight and CG]]
	Tune.Weight			= 3450		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		.8		,
	 --[[Height]]		1/3		,
	 --[[Length]]		1.2		}
	Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .7		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible
	
	--Unsprung Weight
	Tune.FWheelDensity	= .4		-- Front Wheel Density
	Tune.RWheelDensity	= .4		-- 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
--[[
	Pops a node off of the navigation stack.
]]
function TestSession:popNode()
	assert(#self.nodeStack > 0, "Tried to pop from an empty node stack!")
	return table.remove(self.nodeStack, #self.nodeStack)
end
--Set up input began and ended for controller.
table.insert(EventsToDisconnect,UserInputService.InputBegan:Connect(function(Input,Processed)
	if Processed then return end
	local Character = Player.Character
	if not Character then return end
	local Humanoid = Character:FindFirstChildOfClass("Humanoid")
	if not Humanoid or Humanoid.Health <= 0 then return end
	
	--Disconnect the event if the tool is unparented.
	DisconnectEvents()
	
	--Register event if it was a mouse left click.
	if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
		local Position = Get3DPosition(Input.Position.X,Input.Position.Y)
		LongInputBeganEvent:Fire(Position)
		
		if Input.UserInputType == Enum.UserInputType.MouseButton1 then
			InputBeganEvent:Fire(Position)
		end
	end
end))

table.insert(EventsToDisconnect,UserInputService.TouchTap:Connect(function(Positions,Processed)
	if Processed then return end
	local Character = Player.Character
	if not Character then return end
	local Humanoid = Character:FindFirstChildOfClass("Humanoid")
	if not Humanoid or Humanoid.Health <= 0 then return end
	
	--Disconnect the event if the tool is unparented.
	DisconnectEvents()
	
	local Position = Positions[1]
	if Position then
		InputBeganEvent:Fire(Get3DPosition(Position.X,Position.Y))
	end
end))

table.insert(EventsToDisconnect,UserInputService.InputEnded:Connect(function(Input)
	--Disconnect the event if the tool is unparented.
	DisconnectEvents()
	
	--Register event if it was a mouse left click or a touch.
	if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
		InputEndedEvent:Fire(Get3DPosition(Input.Position.X,Input.Position.Y))
	end
end))

return InputHandler
-- << SETUP SEARCH BAR >>
local searchDe = true
frame.SearchBar.Frame.TextBox.FocusLost:connect(function(property)
	if searchDe then
		searchDe = false
		local page
		for i,v in pairs(pages) do
			if v.Position.X.Scale == 0 then
				page = v
			end
		end
	    if page then
			local functionName = "Create".. page.Name
			module[functionName]()
	    end
		wait(0.5)
		searchDe = true
	end
end)
--- Nasty Door Script by General_Punctuation ---

function onTouch(hit)
	local plr = hit.Parent:FindFirstChild("Humanoid")
	if plr ~= nil then
		script.Disabled = true
		script.Parent.DoorParts.Union.Transparency = 1
		script.Parent.DoorParts.MainPart.Transparency = 1
		script.Parent.DoorParts.Union.CanCollide = false
		script.Parent.DoorParts.MainPart.CanCollide = false
		wait(1)
		script.Disabled = false
		script.Parent.DoorParts.Union.Transparency = 0
		script.Parent.DoorParts.MainPart.Transparency = 1
		script.Parent.DoorParts.Union.CanCollide = true
		script.Parent.DoorParts.MainPart.CanCollide = true
	end
	end
script.Parent.DoorParts.MainPart.Touched:connect(onTouch)