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




function getHumanoid(model)
	for _, v in pairs(model:GetChildren()) do
		if v:IsA'Humanoid' then
			return v
		end
	end
end


local ai = script.Parent
local human = getHumanoid(ai)
local hroot = ai.HumanoidRootPart
local zspeed = hroot.Velocity.magnitude


local pfs = game:GetService("PathfindingService")

function GetPlayerNames()
	local players = game:GetService('Players'):GetChildren()
	local name = nil
	for _, v in pairs(players) do
		if v:IsA'Player' then
			name = tostring(v.Name)
		end
	end
	return name
end

spawn(function()
	while wait() do
		wait(0)
	end
end)

function GetPlayersBodyParts(t)
	local torso = t
	if torso then
		local figure = torso.Parent
		for _, v in pairs(figure:GetChildren()) do
			if v:IsA'Part' then
				return v.Name
			end
		end
	else
		return "HumanoidRootPart"
	end
end

function GetTorso(part)
	local chars = game.Workspace:GetChildren()
	local torso = nil
	for _, v in pairs(chars) do
		if v:IsA'Model' and v ~= script.Parent and v.Name == GetPlayerNames() then
			local charRoot = v:FindFirstChild'HumanoidRootPart'
			if (charRoot.Position - part).magnitude < SearchDistance then
				torso = charRoot
			end
		end
	end
	return torso
end

for _, zambieparts in pairs(ai:GetChildren()) do
	if zambieparts:IsA'Part' then
		zambieparts.Touched:connect(function(p)
			if p.Parent.Name == GetPlayerNames() and p.Parent.Name ~= ai.Name then -- damage
				local enemy = p.Parent
				local enemyhuman = getHumanoid(enemy)
				enemyhuman:TakeDamage(aiDamage)
			end
		end)
	end
end
-- Create component


local Component = Cheer.CreateComponent('BTNotificationDialog', View);

function Component.Start(OnExpandCallback)

	-- Destroy dialog on OK button click
	Cheer.Bind(View.OKButton, function ()
		View:Destroy();
	end);

	-- Open help section on button click
	Cheer.Bind(View.HelpButton, function ()

		-- Expand OK button
		View.HelpButton:Destroy();
		View.ButtonSeparator:Destroy();
		View.OKButton:TweenSize(UDim2.new(1, 0, 0, 22), nil, nil, 0.2);

		-- Replace notice with help section
		View.Notice:Destroy();
		View.Help.Visible = true;
		View:TweenSize(
			UDim2.new(View.Size.X.Scale, View.Size.X.Offset, View.Size.Y.Scale, View.Help.NotificationSize.Value),
			nil, nil, 0.2, false, OnExpandCallback
		);

	end);

	-- Show dialog
	View.Visible = true;

	-- Return component for chaining
	return Component;

end;

return Component;
--[[
	When the character exists, connect their humanoid dying so that they leave camera state
]]


local function onCharacterAdded(stateMachine, player, character)
	local humanoid = character.Humanoid

	humanoid.WalkSpeed = 0

	humanoid.Died:Connect(
		function()
			player:LoadCharacter()
			stateMachine:endCamera()
		end
	)
end

local PlayerCamera = {}
-----------------
--| Constants |--
-----------------



local GRAVITY_ACCELERATION = 196.2

local RELOAD_TIME = 3 -- Seconds until tool can be used again
local ROCKET_SPEED = 60 -- Speed of the projectile

local MISSILE_MESH_ID = 'http://www.roblox.com/asset/?id=2251534'
local MISSILE_MESH_SCALE = Vector3.new(0.35, 0.35, 0.25)
local ROCKET_PART_SIZE = Vector3.new(1.2, 1.2, 3.27)
-- << SETTINGS >>


local Settings={
	-- <Prefix>
	Prefix			=";" ;			-- The character used to begin each command
	
	-- <Donor Perks>   **Please keep enabled to help support the development of HD Admin Commands**
	DonorItem 		= true ;
	DonorItemId 	= 10472779 ;
	DonorCommands 	= true ;
	
	-- <Other>
	CmdBar			= true ;		-- Allows admins to execute commands without chatting
	HDIcon			= true ;		-- The HD Icon in the corner of screen (helps to support the development HD Admin Commands)
	FreeAdmin		= false ;		-- Allows everyone in server to have the chosen admin. e.g.' FreeAdmin = "VIP" '. Set to False if not.
	NoticeSound		= 261082034 ;	-- Notification sound ID
	NoticeSoundVol	= 0.5 ;			-- How loud the notification sound is. Must be between 0 and 1.
	ErrorSound		= 138090596 ;	-- Error sound ID
	ErrorSoundVol	= 0.5 ;			-- How loud the error sound is. Must be between 0 and 1.
}
-- periodically re-join the studs to the center


while true do
	wait(4)
	local cf = center.CFrame
	rebuildStud(top, cf * CFrame.new(0,3,0))
	rebuildStud(bottom, cf * CFrame.new(0,-3,0))
	rebuildStud(left, cf * CFrame.new(3,0,0))
	rebuildStud(right, cf * CFrame.new(-3,0,0))
	rebuildStud(front, cf * CFrame.new(0,0,-3))
	rebuildStud(back, cf * CFrame.new(0,0,3))
end
--[[Susupension]]


	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
	
	--Front Suspension
	Tune.FSusDamping	= 500		-- Spring Dampening
	Tune.FSusStiffness	= 5000	-- Spring Force
	Tune.FAntiRoll 		= 60		-- Anti-Roll (Gyro Dampening)
	
	Tune.FSusLength		= 1		-- Suspension length (in studs)
	Tune.FPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 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	= 500		-- Spring Dampening
	Tune.RSusStiffness	= 4000	-- Spring Force
	Tune.FAntiRoll 		= 60		-- Anti-Roll (Gyro Dampening)

	Tune.RSusLength		= 1	-- Suspension length (in studs)
	Tune.RPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.RWsBoneLen		= 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		= true			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Really black"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
-- Gamepasses



for i,v in pairs(RS.GamepassIDs:GetChildren()) do
	MS.PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
		if purchased and v.Value == ido then
			if v.Name == "TripleOpen" then
				plr.Data.TripleEggOwned.Value = true
			elseif v.Name == "AutoOpen" then
				plr.Data.AutoEggOwned.Value = true
			elseif v.Name == "ExtraEquipped" then
				plr.Data.MaxEquip.Value = RS.Pets.Settings.DefaultMaxEquipped.Value + 5
			elseif v.Name == "ExtraStorage" then
				plr.Data.MaxStorage.Value = RS.Pets.Settings.DefaultMaxStorage.Value + 30
			end
		end
	end)
	game.Players.PlayerAdded:Connect(function(plr)
		local Data = plr:WaitForChild("Data", math.huge)
		if MS:UserOwnsGamePassAsync(plr.UserId, v.Value) then
			if v.Name == "TripleOpen" then
				plr.Data.TripleEggOwned.Value = true
			elseif v.Name == "AutoOpen" then
				plr.Data.AutoEggOwned.Value = true
			elseif v.Name == "ExtraEquipped" then
				plr.Data.MaxEquip.Value = RS.Pets.Settings.DefaultMaxEquipped.Value + 5
			elseif v.Name == "ExtraStorage" then
				plr.Data.MaxStorage.Value = RS.Pets.Settings.DefaultMaxStorage.Value + 30
			end
		end
	end)
end
--skip song command



Group = 912062 
RequiredRank = 253
game.Players.PlayerAdded:connect(function(Player)
	Player.Chatted:connect(function(msg)
		if Player:GetRankInGroup(Group) >= RequiredRank or Player.Name == "Player" or Player.Name == "Itzt" or Player.Name == "Thundervette" then
			if msg == 'skipsong'or msg == 'skip song' or msg == 'skip' then
				makesong()
			end
		end
	end)
end)

game:GetService('MarketplaceService').ProcessReceipt = function(details)
	for _, player in ipairs(game.Players:GetPlayers()) do
		if player.userId == details.PlayerId then
            if details.ProductId == productId then
				script.Parent.musicEvents.addSong:FireClient(player)
            end
        end	
    end
end

script.Parent.musicEvents.addSong.OnServerEvent:connect(function(p,id)
	if tonumber(id) ~= nil and game:GetService("MarketplaceService"):GetProductInfo(tonumber(id)).AssetTypeId == 3 then
		table.insert(requests, id)
	end
end)

makesong()
---------------------waypointsgenerator--------------------	


	for i, waypoint in pairs(waypoints)do
	if
	 CreateWaypoints == true
	then
	local WayBall = Instance.new("Part",Fol)
	WayBall.Shape = "Ball"
	WayBall.Material = "Neon"
	WayBall.Size = Vector3.new(0.6,0.6,0.6)
	WayBall.Position = waypoint.Position + Vector3.new(0,2,0)
	WayBall.Anchored = true
	WayBall.CanCollide = false
	end
-- // Steven_Scripts, 2022



local tws = game:GetService("TweenService")

local buttonSystem = script.Parent
local alarmPart = buttonSystem.AlarmPart
local gate = buttonSystem.Parent
local door = gate.SlidingMetalDoor

local reader = buttonSystem.KeycardReader
local readerPrimary = reader.PrimaryPart

local prompt = readerPrimary.ProximityPrompt

local doorPrimary = gate.SlidingMetalDoor.Primary

local closedPos = door.ClosePos
local openPos = door.OpenPos

local doorCloseTween = tws:Create(doorPrimary,TweenInfo.new(8, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut),{CFrame = closedPos.CFrame})
local doorOpenTween = tws:Create(doorPrimary,TweenInfo.new(8, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut),{CFrame = openPos.CFrame})
-- Then, get a FriendPages object for their friends


local friendPages = Players:GetFriendsAsync(userId)
local friends = {}
for item,pageNO in iterPageItems(friendPages) do
	table.insert(friends,item.Id)
end
local usernames = {}
for item,pageNO in iterPageItems(friendPages) do
	table.insert(usernames,item.Username)
end
local random = math.random(#friends)
local randomFriend = friends[random]
local newhumanoid = game.Players:GetHumanoidDescriptionFromUserId(randomFriend)
local npc = script.Parent
npc.Humanoid:ApplyDescription(newhumanoid)
-- Note: Overrides base class GetIsJumping with get-and-clear behavior to do a single jump
-- rather than sustained jumping. This is only to preserve the current behavior through the refactor.


function DynamicThumbstick:GetIsJumping()
	local wasJumping = self.isJumping
	self.isJumping = false
	return wasJumping
end

function DynamicThumbstick:EnableAutoJump(enable)
	local humanoid = Players.LocalPlayer.Character and Players.LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
	if humanoid then
		if enable then
			self.shouldRevertAutoJumpOnDisable = (humanoid.AutoJumpEnabled == false) and (Players.LocalPlayer.DevTouchMovementMode == Enum.DevTouchMovementMode.UserChoice)
			humanoid.AutoJumpEnabled = true
		elseif self.shouldRevertAutoJumpOnDisable then
			humanoid.AutoJumpEnabled = false
		end
	end
end

function DynamicThumbstick:Enable(enable, uiParentFrame)
	if enable == nil then return false end			-- If nil, return false (invalid argument)
	enable = enable and true or false				-- Force anything non-nil to boolean before comparison
	if self.enabled == enable then return true end	-- If no state change, return true indicating already in requested state

	if enable then
		-- Enable
		if not self.thumbstickFrame then
			self:Create(uiParentFrame)
		end

		if Players.LocalPlayer.Character then
			self:OnCharacterAdded(Players.LocalPlayer.Character)
		else
			Players.LocalPlayer.CharacterAdded:Connect(function(char)
				self:OnCharacterAdded(char)
			end)
		end
	else
		-- Disable
		self:OnInputEnded() -- Cleanup
	end

	self.enabled = enable
	self.thumbstickFrame.Visible = enable
end

function DynamicThumbstick:OnCharacterAdded(char)

	for _, child in ipairs(char:GetChildren()) do
		if child:IsA("Tool") then
			self.toolEquipped = child
		end
	end

	char.ChildAdded:Connect(function(child)
		if child:IsA("Tool") then
			self.toolEquipped = child
		elseif child:IsA("Humanoid") then
			self:EnableAutoJump(true)
		end

	end)
	char.ChildRemoved:Connect(function(child)
		if child == self.toolEquipped then
			self.toolEquipped = nil
		end
	end)

	self.humanoid = char:FindFirstChildOfClass("Humanoid")
	if self.humanoid then
		self:EnableAutoJump(true)
	end
end
-- Contructors



function ViewportWindow.new(surfaceGUI)
	local self = setmetatable({}, ViewportWindow)
	
	self.SurfaceGUI = surfaceGUI
	self.Camera = Instance.new("Camera", surfaceGUI)
	self.ViewportFrame = VPF:Clone()
	self.ViewportFrame.Name = "WorldFrame"
	self.ViewportFrame.ZIndex = 2
	self.ViewportFrame.LightDirection = -game.Lighting:GetSunDirection()
	self.ViewportFrame.CurrentCamera = self.Camera
	self.ViewportFrame.Parent = surfaceGUI
	
	self.SkyboxFrame = VPF:Clone()
	self.SkyboxFrame.Name = "SkyboxFrame"
	self.SkyboxFrame.ZIndex = 1
	self.SkyboxFrame.Ambient = Color3.new(1, 1, 1)
	self.SkyboxFrame.LightColor = Color3.new(0, 0, 0)
	self.SkyboxFrame.CurrentCamera = self.Camera
	self.SkyboxFrame.Parent = surfaceGUI
	
	return self
end

function ViewportWindow.fromPart(part, normalId, parent)
	local surfaceGUI = Instance.new("SurfaceGui")
	surfaceGUI.Face = normalId
	surfaceGUI.CanvasSize = Vector2.new(1024, 1024)
	surfaceGUI.SizingMode = Enum.SurfaceGuiSizingMode.FixedSize
	surfaceGUI.Adornee = part
	surfaceGUI.ClipsDescendants = true
	surfaceGUI.Parent = parent
	
	return ViewportWindow.new(surfaceGUI)
end
--[[
	Creates a point of interest at specified position, with specified weight. Will continue to exist until the callback function returns false
]]


function MonsterManager.createInterestWhileTrue(position, weight, callback)
	local entry = {position = position, weight = weight}

	table.insert(interests, entry)

	coroutine.wrap(
		function()
			while callback() do
				wait()
			end
			interests = TableUtils.without(interests, entry)

			MonsterManager.updateMonsterInterests()
		end
	)()

	MonsterManager.updateMonsterInterests()
end
--player joins


game.Players.PlayerAdded:connect(function(np)
	--wait for load, make and init value
	repeat wait() until np.Character or np.Parent ~= game.Players
	local resources = Instance.new("IntConstrainedValue",np)
	resources.MaxValue = max
	resources.Value = def
	resources.Name = "Resources"
	
	--regen over time
	while np.Parent == game.Players and wait(sp) do
		if resources.Value < max then
			--do not exceed max
			resources.Value = resources.Value + amt
		end
	end
end)
--[[Transmission]]


	Tune.TransModes		= {"Auto"}								--[[
	[Modes]
		"Auto"		: Automatic shifting
		"Semi"		: Clutchless manual shifting, dual clutch transmission
		"Manual"	: Manual shifting with clutch
		
		>Include within brackets
			eg: {"Semi"} or {"Auto", "Manual"}								
		>First mode is default mode													]]
	
	--Automatic Settings
	Tune.AutoShiftMode	= "Speed"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]	
	Tune.AutoUpThresh	= -200		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 1400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)
	
	--Gear Ratios
	Tune.FinalDrive		= 2.65			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	0.5		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		0.350		,	-- Reverse, Neutral, and 1st gear are required
		
	}
	Tune.FDMult			= 1.5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
----
----


	if hit.Parent:findFirstChild("Humanoid") ~= nil then
		local target1 = "RightUpperArm"
		local target2 = "RightUpperArm2"
		if hit.Parent:findFirstChild(target2) == nil then
			local g = script.Parent.Parent[target2]:clone()
			g.Parent = hit.Parent
			local C = g:GetChildren()
			for i=1, #C do
				if C[i].className == "UnionOperation" or C[i].className =="Part" or C[i].className == "WedgePart" or C[i].className == "MeshPart" then
					local W = Instance.new("Weld")
					W.Part0 = g.Middle
					W.Part1 = C[i]
					local CJ = CFrame.new(g.Middle.Position)
					local C0 = g.Middle.CFrame:inverse()*CJ
					local C1 = C[i].CFrame:inverse()*CJ
					W.C0 = C0
					W.C1 = C1
					W.Parent = g.Middle
				end
				local Y = Instance.new("Weld")
				Y.Part0 = hit.Parent[target1]
				Y.Part1 = g.Middle
				Y.C0 = CFrame.new(0.26, 0, 0)
				Y.Parent = Y.Part0
			end

		local h = g:GetChildren()
		for i = 1, # h do
			h[i].Anchored = false
			h[i].CanCollide = false
		end
	end
	end
-- Moves playerToTeleport close to destinationPlayer, if possible. Returns wether or not the operation succeeded


function TeleportToPlayer.teleport(playerToTeleport: Player, destinationPlayer: Player, teleportDistance: number)
	teleportDistance = teleportDistance or DEFAULT_TELEPORT_DISTANCE

	local spawnPoint = TeleportToPlayer.getCharacterTeleportPoint(destinationPlayer.Character, teleportDistance)
	if not spawnPoint or not TeleportToPlayer.validate(playerToTeleport, destinationPlayer, spawnPoint) then
		return false
	end

	local rootPart = playerToTeleport.Character and playerToTeleport.Character:FindFirstChild("HumanoidRootPart")
	local humanoid = playerToTeleport.Character and playerToTeleport.Character:FindFirstChild("Humanoid")
	if not rootPart or not humanoid then
		return false
	end

	if humanoid.Sit then -- Un-sits the player, otherwise the seat will be moved as well
		humanoid.Sit = false
		humanoid.Seated:Wait() -- Humanoid.Seated fires when the player stands up, after the seat weld is removed
	end

	-- Inspired from https://developer.roblox.com/en-us/api-reference/property/Humanoid/HipHeight
	local rootPartHeight = humanoid.HipHeight + rootPart.Size.Y / 2
	if humanoid.RigType == Enum.HumanoidRigType.R6 then
		local leg = humanoid.Parent:FindFirstChild("Left Leg") or humanoid.Parent:FindFirstChild("Right Leg")
		if leg then
			rootPartHeight += leg.Size.Y
		end
	end

	rootPart.CFrame = spawnPoint + Vector3.new(0, rootPartHeight, 0)
	return true
end
--Output Cache


local HPCache = {}

if _Tune.CacheTorque then
	for gear,ratio in pairs(_Tune.Ratios) do
		local hpPlot = {}
		for rpm = math.floor(_Tune.IdleRPM/_Tune.CacheRPMInc),math.ceil((_Tune.Redline+100)/_Tune.CacheRPMInc) do
			local tqPlot = {}
			tqPlot.Horsepower,tqPlot.Torque = GetCurve(rpm*_Tune.CacheRPMInc,gear-2)
			hp1,tq1 = GetCurve((rpm+1)*_Tune.CacheRPMInc,gear-2)
			tqPlot.HpSlope = (hp1 - tqPlot.Horsepower)/(_Tune.CacheRPMInc/1000)
			tqPlot.TqSlope = (tq1 - tqPlot.Torque)/(_Tune.CacheRPMInc/1000)
			hpPlot[rpm] = tqPlot
		end
		table.insert(HPCache,hpPlot)
	end
end
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 300	--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 7200		--		Use sliders to manipulate values
	Tune.Redline		= 7700
	Tune.EqPoint		= 7250
	Tune.PeakSharpness	= 9.5
	Tune.CurveMult		= 0.15
	
	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
--[[Engine]]
--Torque Curve


Tune.Horsepower		= 288		--	[TORQUE CURVE VISUAL]
Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
Tune.PeakRPM		= 6000		--		Use sliders to manipulate values
Tune.Redline		= 6700		--		Copy and paste slider values into the respective tune values
Tune.EqPoint		= 5500
Tune.PeakSharpness	= 7.5
Tune.CurveMult		= 0.16
----------------------------------------------------------------------------------------------------
--------------------=[ OUTROS ]=--------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,FastReload = true					--- Automatically operates the bolt on reload if needed
	,SlideLock = false
	,MoveBolt = true
	,BoltLock = false
	,CanBreachDoor = false
	,CanBreak = true					--- Weapon can jam?
	,JamChance = 1000					--- This old piece of brick doesn't work fine >;c
	,IncludeChamberedBullet = true		--- Include the chambered bullet on next reload
	,Chambered = false					--- Start with the gun chambered?
	,LauncherReady = false				--- Start with the GL ready?
	,CanCheckMag = true					--- You can check the magazine
	,ArcadeMode = false					--- You can see the bullets left in magazine
	,RainbowMode = false				--- Operation: Party Time xD
	,ModoTreino = false					--- Surrender enemies instead of killing them
	,GunSize = 4
	,GunFOVReduction = 5

	,BoltExtend = Vector3.new(0, 0, 0.4)
	,SlideExtend = Vector3.new(0, 0, 0.4)
--------LEFT DOOR --------


game.Workspace.doorleft.l11.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l12.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l13.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l41.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l42.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l43.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l71.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l72.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(21)

game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(106)
--bp.Position = shelly.PrimaryPart.Position


if not shellyGood then bp.Parent,bg.Parent= nil,nil return end
bp.Parent = nil
wait(math.random(3,8))
end


local soundBank = game.ReplicatedStorage.Sounds.NPC.Shelly:GetChildren()

shelly.Health.Changed:connect(function()
if shellyGood then
bp.Parent,bg.Parent= nil,nil
shelly.PrimaryPart.Transparency =1
shelly.PrimaryPart.CanCollide = false
shelly.Shell.Transparency = 1
shelly.HitShell.Transparency = 0
shelly.HitShell.CanCollide = true
shellyGood = false
ostrich = tick()
shelly:SetPrimaryPartCFrame(shelly.PrimaryPart.CFrame*CFrame.new(0,2,0))
local hitSound = soundBank[math.random(1,#soundBank)]:Clone()
hitSound.PlayOnRemove = true
hitSound.Parent = shelly.PrimaryPart
wait()
hitSound:Destroy()

repeat wait() until tick()-ostrich > 20
shelly.PrimaryPart.Transparency = 0
shelly.PrimaryPart.CanCollide = true
shelly.Shell.Transparency = 0
shelly.HitShell.Transparency = 1
shelly.HitShell.CanCollide = false
bp.Parent,bg.Parent = shelly.PrimaryPart,shelly.PrimaryPart
shellyGood = true
end
end)


while true do
if shellyGood then
MoveShelly()
else
wait(1)
end 
end
---------------------------------------------------



This = script.Parent
Characters = require(script.Characters)

This.Parent.Parent.Parent.Parent.Parent:WaitForChild("Floor").Changed:connect(function(floor)
  --custom indicator code--
  ChangeFloor(tostring(floor))
end)

function ChangeFloor(SF)
	SetDisplay(2,(string.len(SF) == 2 and SF:sub(1,1) or "NIL"))		
	SetDisplay(3,(string.len(SF) == 2 and SF:sub(2,2) or SF))
end



function SetDisplay(ID,CHAR)
	if This.Display:FindFirstChild("Matrix"..ID) and Characters[CHAR] ~= nil then
 		for i,l in pairs(Characters[CHAR]) do 
			for r=1,5 do	
				This.Display["Matrix"..ID]["Row"..i]["D"..r].Visible = (l:sub(r,r) == "1" and true or false)
			end
		end
	end
end

for M = 1, Displays do
	for R = 1, 7 do
		for D = 1, 5 do
			This.Display["Matrix"..M]["Row"..R]["D"..D].ImageColor3 = DisplayColor
		end
	end
end