Roblox/luau_corpus huggingface dataset:
--[[
	CameraModule - This ModuleScript implements a singleton class to manage the
	selection, activation, and deactivation of the current camera controller,
	character occlusion controller, and transparency controller. This script binds to
	RenderStepped at Camera priority and calls the Update() methods on the active
	controller instances.

	The camera controller ModuleScripts implement classes which are instantiated and
	activated as-needed, they are no longer all instantiated up front as they were in
	the previous generation of PlayerScripts.

	2018 PlayerScripts Update - AllYourBlox
--]]

local CameraModule = {}
CameraModule.__index = CameraModule

local FFlagUserCameraToggle do
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserCameraToggle")
	end)
	FFlagUserCameraToggle = success and result
end

local FFlagUserRemoveTheCameraApi do
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserRemoveTheCameraApi")
	end)
	FFlagUserRemoveTheCameraApi = success and result
end
-- Connection class
local Connection = {}
Connection.__index = Connection

function Connection.new(signal, fn)
	return setmetatable({
		_connected = true,
		_signal = signal,
		_fn = fn,
		_next = false,
	}, Connection)
end

function Connection:Disconnect()
	assert(self._connected, "Can't disconnect a connection twice.")
	self._connected = false

	-- Unhook the node, but DON'T clear it. That way any fire calls that are
	-- currently sitting on this node will be able to iterate forwards off of
	-- it, but any subsequent fire calls will not hit it, and it will be GCed
	-- when no more fire calls are sitting on it.
	if self._signal._handlerListHead == self then
		self._signal._handlerListHead = self._next
	else
		local prev = self._signal._handlerListHead
		while prev and prev._next ~= self do
			prev = prev._next
		end
		if prev then
			prev._next = self._next
		end
	end
end
-- Player's tank GUI
GUI = script.Parent.Parent.Parent.PlayerGui.TankGUI;
GUI.HP.Hitpoints.Text = parts.Parent:findFirstChild("Damage").Value

local Hull = parts.Parent:findFirstChild("Damage")

if Hull.Value<0 then
	GUI.HP.Hitpoints.Text = "DISABLED"
end

	
local MGDamage = math.random(45,45)


braking = false;
firingMg = false;
reloading = false;
currRound = tankStats.Round; -- Current loaded ammo (AP/HE)


myMouse = nil;

function updateAmmo()
	GUI.Ammo.Text = "Cannon Ammo = " .. tankStats[tankStats.Round.Value .. "Ammo"].Value;
	GUI.MG_Ammo.Text = tankStats.MGAmmo.Value;
	GUI.HP.Hitpoints.Text = parts.Parent:findFirstChild("Damage").Value
end


function Brakes()
	for i = 1, 5 do
	parts.Engine.BodyVelocity.Velocity = Vector3.new(0,0,0)
	print("Brakes activated")
	end
end
-- Decompiled with the Synapse X Luau decompiler.

local l__LocalPlayer__1 = game:GetService("Players").LocalPlayer;
local l__Character__2 = game:GetService("Players").LocalPlayer.Character;
hrp = l__Character__2:WaitForChild("HumanoidRootPart");
hp2 = Instance.new("Part");
hp2.Name = "Door";
hp2.Size = Vector3.new(1.5, 5.26, 1.21);
hp2.CanCollide = false;
hp2.Transparency = 1;
hp2.Parent = l__Character__2;
local v3 = Instance.new("Weld");
v3.Parent = hp2;
v3.Part0 = hp2;
v3.Part1 = l__Character__2.HumanoidRootPart;
v3.C0 = CFrame.new(0, 0.5, 0);
ts = game:GetService("TweenService");
ti2 = TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0);
hp2.Touched:connect(function(p1)
	if p1.Name == "Trigger" and p1:FindFirstChild("Open") == nil and l__Character__2.Humanoid.Health >= 0 then
		local v4 = Instance.new("BoolValue", p1);
		local v5 = script.DoorO:Clone();
		v5.Parent = p1;
		v5:Play();
		game.Debris:AddItem(v5, 3);
		v4.Name = "Open";
		local l__d1__6 = p1.Parent.d1;
		local l__d2__7 = p1.Parent.d2;
		l__d1__6.CanCollide = false;
		l__d2__7.CanCollide = false;
		local v8 = ts:Create(l__d1__6, ti2, {
			CFrame = l__d1__6.CFrame + Vector3.new(0, 15, 0)
		});
		ts:Create(l__d2__7, ti2, {
			CFrame = l__d2__7.CFrame + Vector3.new(0, 15, 0)
		}):Play();
		v8:Play();
		wait(3);
		local v9 = script.DoorC:Clone();
		v9.Parent = p1;
		v9:Play();
		game.Debris:AddItem(v9, 3);
		local v10 = ts:Create(l__d2__7, ti2, {
			CFrame = p1.Parent.d2.CFrame
		});
		ts:Create(l__d1__6, ti2, {
			CFrame = p1.Parent.d1.CFrame
		}):Play();
		v10:Play();
		wait(1.5);
		l__d1__6.CanCollide = true;
		l__d2__7.CanCollide = true;
		game.Debris:AddItem(v4, 0);
	end;
end);
-- References
SyncAPI = script.Parent;
Tool = SyncAPI.Parent;
Player = nil;
--[[
	Takes two tables A, B and a key, returns if two tables have the same value at key
]]

return function(A, B, key)
	if A and B and key and key ~= "" and A[key] and B[key] and A[key] == B[key] then
		return true
	end
	return false
end
--	elseif input.UserInputType == self.activeGamepad and input.KeyCode == Enum.KeyCode.ButtonL3 then
--		if (state == Enum.UserInputState.Begin) then
--			self.L3ButtonDown = true
--		elseif (state == Enum.UserInputState.End) then
--			self.L3ButtonDown = false
--			self.currentZoomSpeed = 1.00
--		end
--	end
end

function BaseCamera:DoKeyboardZoom(name, state, input)
	if not self.hasGameLoaded and VRService.VREnabled then
		return Enum.ContextActionResult.Pass
	end

	if state ~= Enum.UserInputState.Begin then
		return Enum.ContextActionResult.Pass
	end

	if self.distanceChangeEnabled and player.CameraMode ~= Enum.CameraMode.LockFirstPerson then
		if input.KeyCode == Enum.KeyCode.I then
			self:SetCameraToSubjectDistance( self.currentSubjectDistance - 5 )
		elseif input.KeyCode == Enum.KeyCode.O then
			self:SetCameraToSubjectDistance( self.currentSubjectDistance + 5 )
		end
		return Enum.ContextActionResult.Sink
	end
	return Enum.ContextActionResult.Pass
end

function BaseCamera:BindAction(actionName, actionFunc, createTouchButton, ...)
	table.insert(self.boundContextActions, actionName)
	ContextActionService:BindActionAtPriority(actionName, actionFunc, createTouchButton,
		CAMERA_ACTION_PRIORITY, ...)
end

function BaseCamera:BindGamepadInputActions()
	self:BindAction("BaseCameraGamepadPan", function(name, state, input) return self:GetGamepadPan(name, state, input) end,
		false, Enum.KeyCode.Thumbstick2)
	self:BindAction("BaseCameraGamepadZoom", function(name, state, input) return self:DoGamepadZoom(name, state, input) end,
		false, Enum.KeyCode.DPadLeft, Enum.KeyCode.DPadRight, Enum.KeyCode.ButtonR3)
end

function BaseCamera:BindKeyboardInputActions()
	self:BindAction("BaseCameraKeyboardPanArrowKeys", function(name, state, input) return self:DoKeyboardPanTurn(name, state, input) end,
		false, Enum.KeyCode.Left, Enum.KeyCode.Right)
	self:BindAction("BaseCameraKeyboardZoom", function(name, state, input) return self:DoKeyboardZoom(name, state, input) end,
		false, Enum.KeyCode.I, Enum.KeyCode.O)
end

local function isInDynamicThumbstickArea(input)
	local playerGui = player:FindFirstChildOfClass("PlayerGui")
	local touchGui = playerGui and playerGui:FindFirstChild("TouchGui")
	local touchFrame = touchGui and touchGui:FindFirstChild("TouchControlFrame")
	local thumbstickFrame = touchFrame and touchFrame:FindFirstChild("DynamicThumbstickFrame")

	if not thumbstickFrame then
		return false
	end

	local frameCornerTopLeft = thumbstickFrame.AbsolutePosition
	local frameCornerBottomRight = frameCornerTopLeft + thumbstickFrame.AbsoluteSize
	if input.Position.X >= frameCornerTopLeft.X and input.Position.Y >= frameCornerTopLeft.Y then
		if input.Position.X <= frameCornerBottomRight.X and input.Position.Y <= frameCornerBottomRight.Y then
			return true
		end
	end

	return false
end
-- Constructor.
function FastCast.new()
	return setmetatable({
		LengthChanged = Signal:CreateNewSignal(),
		RayHit = Signal:CreateNewSignal(),
		RayExited = Signal:CreateNewSignal()
	}, FastCast)
end
--[=[
	Executes on the next event connection.
	@param event RBXScriptSignal
	@param _function function
	@return RBXScriptConnection
]=]
function SignalUtils.onNext(event, _function)
	assert(typeof(event) == "RBXScriptSignal", "Bad event")
	assert(type(_function) == "function", "Bad _function")

	local conn
	conn = event:Connect(function(...)
		if conn.Connected then
			return -- Multiple events got queued
		end

		conn:Disconnect()
		_function(...)
	end)

	return conn
end

return SignalUtils
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 300		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 100		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 15000		--		Use sliders to manipulate values
	Tune.Redline		= 15000		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 500		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 0		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
--------LEFT DOOR --------
game.Workspace.doorleft.l11.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l23.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l32.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l41.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l53.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l62.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l71.BrickColor = BrickColor.new(1023)

game.Workspace.doorleft.l12.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l21.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l33.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l42.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l51.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l63.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l72.BrickColor = BrickColor.new(106)

game.Workspace.doorleft.l13.BrickColor = BrickColor.new(1013)
game.Workspace.doorleft.l22.BrickColor = BrickColor.new(1013)
game.Workspace.doorleft.l31.BrickColor = BrickColor.new(1013)
game.Workspace.doorleft.l43.BrickColor = BrickColor.new(1013)
game.Workspace.doorleft.l52.BrickColor = BrickColor.new(1013)
game.Workspace.doorleft.l61.BrickColor = BrickColor.new(1013)
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(1013)

game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.Lighting.flashcurrent.Value = "13"
-- GuiControls variables
local PressedColor = Color3.new(79/255,185/255,255/255)
local LiftedColor = Color3.new(255/255,255/255,255/255)
local GuiControls = script.Parent:WaitForChild("GuiControls")
local Accelerate = GuiControls:WaitForChild("Accelerate")
local Steer = GuiControls:WaitForChild("Steer")
local UpButton = Accelerate:WaitForChild("Up")
local DownButton = Accelerate:WaitForChild("Down")
local RightButton = Steer:WaitForChild("Right")
local LeftButton = Steer:WaitForChild("Left")
local OffButton = GuiControls:WaitForChild("OffButton")
-- regeneration
function regenHealth()
	if regening then return end
	regening = false
	
	while Humanoid.Health < Humanoid.MaxHealth do
		local s = task.wait(1)
		local health = Humanoid.Health
		if health > 0 and health < Humanoid.MaxHealth then
			local newHealthDelta = 0.01 * s * Humanoid.MaxHealth
			health = health + newHealthDelta
			Humanoid.Health = math.min(health,Humanoid.MaxHealth)
		end
	end
	
	if Humanoid.Health > Humanoid.MaxHealth then
		Humanoid.Health = Humanoid.MaxHealth
	end
	
	regening = false
end

Humanoid.HealthChanged:connect(regenHealth)
-- Decompiled with the Synapse X Luau decompiler.

local v1 = {};
local v2 = require(game.ReplicatedStorage.Modules.Lightning);
local v3 = require(game.ReplicatedStorage.Modules.Xeno);
local v4 = require(game.ReplicatedStorage.Modules.CameraShaker);
local l__TweenService__5 = game.TweenService;
local l__Debris__6 = game.Debris;
local l__ReplicatedStorage__1 = game.ReplicatedStorage;
function v1.RunStompFx(p1, p2, p3, p4)
	local v7 = l__ReplicatedStorage__1.KillFX[p1].Stomp:Clone();
	v7.Parent = p2.Parent.UpperTorso and p2;
	v7:Play();
	game.Debris:AddItem(v7, 4);
	local v8 = l__ReplicatedStorage__1.KillFX[p1].Effect:Clone();
	v8.Parent = p2.Parent.UpperTorso and p2;
	v8.Effect.Enabled = true;
	v8.Position = p2.Parent.UpperTorso.Position or p2.Position;
	game.Debris:AddItem(v8, 4);
	local v9 = Instance.new("WeldConstraint", v8);
	v9.Part0 = v8;
	v9.Part1 = p2.Parent.UpperTorso and p2;
	return nil;
end;
return v1;
--Both
local Loudness = .75 --volume of the boost supplier (not exact volume so you kinda have to experiment with it also)

script:WaitForChild("Whistle")
script:WaitForChild("Whine")
script:WaitForChild("BOV")

for i,v in pairs(car.DriveSeat:GetChildren()) do
	for _,a in pairs(script:GetChildren()) do
		if v.Name==a.Name then v:Stop() wait() v:Destroy() end
	end
end

car.DriveSeat.ChildRemoved:connect(function(child)
	if child.Name=="SeatWeld" then
		for i,v in pairs(car.DriveSeat:GetChildren()) do
			for _,a in pairs(script:GetChildren()) do
				if v.Name==a.Name then v:Stop() wait() v:Destroy() end
			end
		end
	end
end)

handler:FireServer("newSound","Whistle",car.DriveSeat,script.Whistle.SoundId,0,script.Whistle.Volume,true)
handler:FireServer("newSound","Whine",car.DriveSeat,script.Whine.SoundId,0,script.Whine.Volume,true)
handler:FireServer("newSound","BOV",car.DriveSeat,script.BOV.SoundId,0,script.BOV.Volume,true)
handler:FireServer("playSound","Whistle")
handler:FireServer("playSound","Whine")
car.DriveSeat:WaitForChild("Whistle")
car.DriveSeat:WaitForChild("Whine")
car.DriveSeat:WaitForChild("BOV")
local ticc = tick()
local _TCount = 0
if _Tune.Aspiration == "Single" or _Tune.Aspiration == "Super" then _TCount = 1 elseif _Tune.Aspiration == "Double" then _TCount = 2 end

while wait() do
	local psi = (((script.Parent.Values.Boost.Value)/(_Tune.Boost*_TCount))*2)
	local WP,WV,BP,BV,HP,HV = 0
	
	BOVact = math.floor(psi*20)
	if _Tune.Aspiration == "Single" or _Tune.Aspiration == "Double" then
		WP = (psi)
		WV = (psi/4)*Loudness
		
		BP = (1-(-psi/20))*BOV_Pitch
		BV = (((-0.5+((psi/2)*BOV_Loudness)))*(1 - script.Parent.Values.Throttle.Value))
	
		if BOVact < BOVact2 then if car.DriveSeat.BOV.IsPaused then if FE then handler:FireServer("playSound","BOV") else car.DriveSeat.BOV:Play() end end end
		if BOVact >= BOVact2 then if FE then handler:FireServer("stopSound","BOV") else car.DriveSeat.BOV:Stop() end end
	elseif _Tune.Aspiration == "Super" then
		psi = psi/2
		HP = psi*Whine_Pitch
		HV = (psi/4)*Loudness
	end
		
	if FE then
		handler:FireServer("updateSound","Whistle",script.Whistle.SoundId,WP,WV)
		handler:FireServer("updateSound","Whine",script.Whine.SoundId,HP,HV)
		handler:FireServer("updateSound","BOV",script.BOV.SoundId,BP,BV)
	else
		car.DriveSeat.Whistle.Pitch = WP
		car.DriveSeat.Whistle.Volume = WV
		car.DriveSeat.Whine.Pitch = HP
		car.DriveSeat.Whine.Volume = HV
		car.DriveSeat.BOV.Pitch = BP
		car.DriveSeat.BOV.Volume = BV
	end
	if (tick()-ticc) >= 0.1 then
		BOVact2 = math.floor(psi*20)
		ticc = tick()
	end
end
-- Fill this with any specific player you want to be able to seek
local playerIDs = {}
--tone hz
elseif sv.Value==4 then
while s.Pitch<0.9 do
s.Pitch=s.Pitch+0.010
s:Play()
if s.Pitch>0.9 then
	s.Pitch=0.9
end
wait(-9)
end

while true do
for x = 1, 500 do
s:play()
wait(-9)
end
wait()
end
-- script

RunService.RenderStepped:Connect(function()
	local currentTime = tick()
	if humanoid.MoveDirection.Magnitude > 0 then -- we are walking
		local bobbleX = math.cos(currentTime * 7) * .10
		local bobbleY = math.abs(math.sin(currentTime * 7)) * .20

		local bobble = Vector3.new(bobbleX, bobbleY, 0)

		humanoid.CameraOffset = humanoid.CameraOffset:lerp(bobble, .25)
	else -- we are not walking
		local t = tick()
		local x = math.cos(t * speed) * intensity
		local y = math.sin(t * speed) * intensity

		local cf = CFrame.new(Vector3.new(x, y, 0), Vector3.new(x*0.95, y*0.95, -10)) + camera.CFrame.Position

		camera.CFrame = camera.CFrame:Lerp(cf * camera.CFrame.Rotation, smoothness)	
	end
end)
-- Children:
function Replica:ListenToChildAdded(listener) --> [ScriptConnection] listener(replica)
	if type(listener) ~= "function" then
		error("[ReplicaController]: Only a function can be set as listener")
	end
	if Replicas[self.Id] == nil then
		return -- Replica is destroyed - listener will not be connected
	end
	-- Getting listener table for replica class:
	local listeners = ChildListeners[self.Id]
	if listeners == nil then
		listeners = {}
		ChildListeners[self.Id] = listeners
	end
	table.insert(listeners, listener)
	-- ScriptConnection which allows the disconnection of the listener:
	return Madwork.NewArrayScriptConnection(listeners, listener)
end

function Replica:FindFirstChildOfClass(replica_class) --> [Replica] or nil
	for _, child in ipairs(self.Children) do
		if child.Class == replica_class then
			return child
		end
	end
	return nil
end
--[=[
	Extracts the locale from the folder, or a locale and table.

	@param tableName string -- Used for source
	@param first Instance | string
	@param second table?
	@return LocalizationTable
]=]
function JsonToLocalizationTable.toLocalizationTable(tableName, first, second)
	assert(type(tableName) == "string", "Bad tableName")

	if typeof(first) == "Instance" then
		local result = JsonToLocalizationTable.loadFolder(tableName, first)
		-- result.Name = ("JSONTable_%s"):format(first.Name)
		return result
	elseif type(first) == "string" and type(second) == "table" then
		local result = JsonToLocalizationTable.loadTable(tableName, first, second)
		return result
	else
		error("Bad args")
	end
end
--Right lean Divider
ZR15RightLegRightLeanD = 1
XR15RightLegRightLeanD = 1
YR15RightLegRightLeanD = 1
R15RightKneeRightLeanD = 1

ZR15RightArmRightLeanD = 1
XR15RightArmRightLeanD = 1
YR15RightArmRightLeanD = 1
R15RightElbowRightLeanD = 1

ZR15LeftLegRightLeanD = 1
XR15LeftLegRightLeanD = 1
YR15LeftLegRightLeanD = 1
R15LeftKneeRightLeanD = 1

ZR15LeftArmRightLeanD = 1
XR15LeftArmRightLeanD = 1
YR15LeftArmRightLeanD = 1
R15LeftElbowRightLeanD = 1

ZR15LowerTorsoRightLeanD = 1
XR15LowerTorsoRightLeanD = 1
YR15LowerTorsoRightLeanD = 1
ZR15UpperTorsoRightLeanD = 1
--IT WONT GO AWAY!!!!!

if string.sub(msg,1,5) == "trip/" then
local player = findplayer(string.sub(msg,6),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local torso = player[i].Character:FindFirstChild("Torso")
if torso ~= nil then
torso.CFrame = CFrame.new(torso.Position.x,torso.Position.y,torso.Position.z,0, 0, 1, 0, -1, 0, 1, 0, 0)--math.random(),math.random(),math.random(),math.random(),math.random(),math.random(),math.random(),math.random(),math.random()) -- i like the people being upside down better.
end end end end end
--[=[
	@param name string
	@param fn (player: Player, ...: any) -> ...: any
	@param inboundMiddleware ServerMiddleware?
	@param outboundMiddleware ServerMiddleware?
	@return RemoteFunction
	Creates a RemoteFunction and binds the given function to it. Inbound
	and outbound middleware can be applied if desired.

	```lua
	local function GetSomething(player: Player)
		return "Something"
	end

	serverComm:BindFunction("GetSomething", GetSomething)
	```
]=]
function ServerComm:BindFunction(name: string, fn: Types.FnBind, inboundMiddleware: Types.ServerMiddleware?, outboundMiddleware: Types.ServerMiddleware?): RemoteFunction
	return Comm.BindFunction(self._instancesFolder, name, fn, inboundMiddleware, outboundMiddleware)
end
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------


script.Parent.Treat.Frame.Bandage.MouseButton1Down:connect(function()
	script.Parent.Treat.Frame.BandFrame.Visible  = true
	script.Parent.Treat.Frame.MedFrame.Visible 	 = false
	script.Parent.Treat.Frame.NeedFrame.Visible  = false
	script.Parent.Treat.Frame.OtherFrame.Visible = false
end)

script.Parent.Treat.Frame.Medicine.MouseButton1Down:connect(function()
	script.Parent.Treat.Frame.BandFrame.Visible  = false
	script.Parent.Treat.Frame.MedFrame.Visible 	 = true
	script.Parent.Treat.Frame.NeedFrame.Visible  = false
	script.Parent.Treat.Frame.OtherFrame.Visible = false
end)

script.Parent.Treat.Frame.Needle.MouseButton1Down:connect(function()
	script.Parent.Treat.Frame.BandFrame.Visible  = false
	script.Parent.Treat.Frame.MedFrame.Visible 	 = false
	script.Parent.Treat.Frame.NeedFrame.Visible  = true
	script.Parent.Treat.Frame.OtherFrame.Visible = false
end)

script.Parent.Treat.Frame.Other.MouseButton1Down:connect(function()
	script.Parent.Treat.Frame.BandFrame.Visible  = false
	script.Parent.Treat.Frame.MedFrame.Visible 	 = false
	script.Parent.Treat.Frame.NeedFrame.Visible  = false
	script.Parent.Treat.Frame.OtherFrame.Visible = true
end)
--Don't worry about the rest of the code, except for line 25.
game.Players.PlayerAdded:connect(function(player)
local leader = Instance.new("Folder",player)
leader.Name = "Skins"
local Cash = Instance.new("StringValue",leader)
Cash.Name = stat
Cash.Value = ds:GetAsync(player.UserId) or startamount
ds:SetAsync(player.UserId, Cash.Value)
Cash.Changed:connect(function()
ds:SetAsync(player.UserId, Cash.Value)
end)
end)

game.Players.PlayerRemoving:connect(function(player)
	wait(.1)
	ds:SetAsync(player.UserId, player.Skins.Equipped.Value) --Change "Points" to the name of your leaderstat.
end)
--------RIGHT DOOR --------
game.Workspace.doorright.l11.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l22.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l33.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l41.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l52.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l63.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l71.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)

game.Workspace.doorright.l43.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l61.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l53.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l72.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l62.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l51.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l21.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l31.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l12.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l13.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l32.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l23.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l42.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l73.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)

game.Workspace.doorright.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.Lighting.flashcurrent.Value = "12"