Roblox/luau_corpus huggingface dataset:
-- Put this script in a Part or a ServerScriptService

local scriptToDestroy = game.Workspace.End[" Badge"].Nodead
game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local humanoid = character:WaitForChild("Humanoid")

		humanoid.Died:Connect(function()
        scriptToDestroy:Destroy()
		end)
	end)
end)
-- Topbar Configuration
local topbar = mainUI.Bar

local infoButton = topbar.Information -- The Blue Button
local closeButton = topbar.Close -- The Red button
local darken =mainWindow.Dark -- The object that fades the previous window

local Bar_Button_TweenInfo = TweenInfo.new(
	0.2,
	Enum.EasingStyle.Circular,
	Enum.EasingDirection.InOut
)

local button_not_focused = {} --                     Button not interacted
button_not_focused.Size = UDim2.new(0, 25, 0, 25) -- or hovered

local button_focused = {} -- Button hovered
button_focused.Size = UDim2.new(0, 20, 0, 20)

local button_pressed = {} -- Button interacted
button_pressed.Size = UDim2.new(0, 19, 0, 19)

local button_released = {} -- Button released
button_released.Size = UDim2.new(0, 28, 0, 28)
-- ReplicaController functions:

function ReplicaController.RequestData() -- Call after all client controllers are loaded and before CoreReadySignal is fired
	if DataRequestStarted == true then
		return
	end
	DataRequestStarted = true
	task.spawn(function() -- In case the initial rev_ReplicaRequestData signal was lost (Highly unlikely)
		while game:IsLoaded() == false do
			task.wait()
		end
		rev_ReplicaRequestData:FireServer()
		while task.wait(SETTINGS.RequestDataRepeat) do
			if ReplicaController.InitialDataReceived == true then
				break
			end
			rev_ReplicaRequestData:FireServer()
		end
	end)
end

function ReplicaController.ReplicaOfClassCreated(replica_class, listener) --> [ScriptConnection] listener(replica)
	if type(replica_class) ~= "string" then
		error("[ReplicaController]: replica_class must be a string")
	end
	if type(listener) ~= "function" then
		error("[ReplicaController]: Only a function can be set as listener in ReplicaController.ReplicaOfClassCreated()")
	end
	-- Getting listener table for replica class:
	local signal = ClassListeners[replica_class]
	if signal == nil then
		signal = Madwork.NewScriptSignal()
		ClassListeners[replica_class] = signal
	end
	return signal:Connect(listener, function()
		-- Cleanup script signals that are no longer used:
		if signal:GetListenerCount() == 0 and ClassListeners[replica_class] == signal then
			ClassListeners[replica_class] = nil
		end
	end)
end

function ReplicaController.GetReplicaById(replica_id)
	return Replicas[replica_id]
end
--Delete a title from a player's inventory
function functions.RemoveTitleFromInventory(plr: Player, titleName: string)

	local plrStats = plr.leaderstats
	local plrTitles = plrStats.Titles

	if plrTitles:FindFirstChild(titleName) then

		plrTitles[titleName]:Destroy()
	end
end
--[[
	Package link auto-generated by Rotriever
]]
local PackageIndex = script.Parent.Parent.Parent._Index

local Package = require(PackageIndex["LuauPolyfill-2fca3173-0.4.2"]["LuauPolyfill"])

export type Array<T> = Package.Array<T> 
export type AssertionError = Package.AssertionError
export type Error = Package.Error
export type Map<T, V> = Package.Map<T, V> 
export type Object = Package.Object
export type PromiseLike<T> = Package.PromiseLike<T> 
export type Promise<T> = Package.Promise<T> 
export type Set<T> = Package.Set<T> 
export type Symbol = Package.Symbol
export type Timeout = Package.Timeout
export type Interval = Package.Interval
export type WeakMap<T, V> = Package.WeakMap<T, V> 


return Package
---
	script.Parent.Values.Gear.Changed:connect(function()
		if script.Parent.Values.Gear.Value == -1 then
			for index, child in pairs(car.Body.Lights.Rev:GetChildren()) do
			child.Material = Enum.Material.Neon
			car.DriveSeat.Reverse:Play()
			end
		else
			for index, child in pairs(car.Body.Lights.Rev:GetChildren()) do
			child.Material = Enum.Material.SmoothPlastic
			car.DriveSeat.Reverse:Stop()
			end
		end
	end)
------Settings------
local AccurateRepresentation = true -- will include floor color,material and transparency
local FlyingDebrisCollision = true
-- spawn a random ore
	local oreName = oreBank[math.random(1,#oreBank)]
		
	GU.SpawnItem(oreName,1,root.CFrame*CFrame.new(0,1,0))
		
end
end)
AttitudeCoroutine()


while true do
if mode == "charLock" then
targetLocation = (charRoot.CFrame*CFrame.new(3,-2.6,1)).p
targetLook = charRoot.CFrame*CFrame.new(charRoot.CFrame.lookVector*1000)
end
bg.CFrame = targetLook
bp.Position = targetLocation
wait()
end
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take

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

ZoneModelName = "Knife and bone hell" -- name the zone model

MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
--[=[
	@function HeartbeatUpdate
	@param dt number
	@within Component

	If this method is present on a component, then it will be
	automatically connected to `RunService.Heartbeat`.

	:::note Method
	This is a method, not a function. This is a limitation
	of the documentation tool which should be fixed soon.
	:::
	
	```lua
	local MyComponent = Component.new({Tag = "MyComponent"})
	
	function MyComponent:HeartbeatUpdate(dt)
	end
	```
]=]
--[=[
	@function SteppedUpdate
	@param dt number
	@within Component

	If this method is present on a component, then it will be
	automatically connected to `RunService.Stepped`.

	:::note Method
	This is a method, not a function. This is a limitation
	of the documentation tool which should be fixed soon.
	:::
	
	```lua
	local MyComponent = Component.new({Tag = "MyComponent"})
	
	function MyComponent:SteppedUpdate(dt)
	end
	```
]=]
--[=[
	@function RenderSteppedUpdate
	@param dt number
	@within Component
	@client

	If this method is present on a component, then it will be
	automatically connected to `RunService.RenderStepped`. If
	the `[Component].RenderPriority` field is found, then the
	component will instead use `RunService:BindToRenderStep()`
	to bind the function.

	:::note Method
	This is a method, not a function. This is a limitation
	of the documentation tool which should be fixed soon.
	:::
	
	```lua
	-- Example that uses `RunService.RenderStepped` automatically:

	local MyComponent = Component.new({Tag = "MyComponent"})
	
	function MyComponent:RenderSteppedUpdate(dt)
	end
	```
	```lua
	-- Example that uses `RunService:BindToRenderStep` automatically:
	
	local MyComponent = Component.new({Tag = "MyComponent"})

	-- Defining a RenderPriority will force the component to use BindToRenderStep instead
	MyComponent.RenderPriority = Enum.RenderPriority.Camera.Value
	
	function MyComponent:RenderSteppedUpdate(dt)
	end
	```
]=]


function Component:Destroy()
	self._trove:Destroy()
end


return Component
--[[
	Implementation
]]

local localPlayer = Players.LocalPlayer

local ActionPrompts = {
	targetChanged = Signal.new(),
	actionActivated = Signal.new(),
	targetInstance = nil,
	isRunning = false,
}

local function contextActivate(actionName, userInputState, inputObject)
	if not ActionPrompts.targetInstance then
		return Enum.ContextActionResult.Pass
	end

	if userInputState == Enum.UserInputState.Begin then
		ActionPrompts.actionActivated:fire(ActionPrompts.targetInstance)
	end
end

local function getTarget()
	local humanoidRootPart = localPlayer.Character and localPlayer.Character:FindFirstChild("HumanoidRootPart")

	if not humanoidRootPart then
		return
	end

	local closestAction = getNearestTagged(humanoidRootPart.Position, "Action", MAX_CUTTOFF_DISTANCE)

	if closestAction then
		if closestAction ~= ActionPrompts.targetInstance then
			ActionPrompts.targetChanged:fire({
				enabled = true,
				newTargetInstance = closestAction,
				oldTargetInstance = ActionPrompts.targetInstance,
				sizeOffset = ACTION_BUTTON_OFFSET,
			})
		end
	else
		ActionPrompts.targetChanged:fire({
			enabled = false,
			newTargetInstance = closestAction,
			oldTargetInstance = ActionPrompts.targetInstance,
		})
	end

	ActionPrompts.targetInstance = closestAction
end

function ActionPrompts.start()
	RunService:BindToRenderStep("GetActionTarget", Enum.RenderPriority.Camera.Value - 1, function()
		getTarget()
	end)

	ContextActionService:BindActionAtPriority(
		"ActionActivate",
		contextActivate,
		false,
		ACTION_PRIORITY,
		ACTIVATE_KEYBOARD,
		ACTIVATE_CONSOLE
	)

	ActionPrompts.isRunning = true
end

function ActionPrompts.stop()
	RunService:UnbindFromRenderStep("GetActionTarget")

	ActionPrompts.isRunning = false
end

function ActionPrompts.activate()
	if not ActionPrompts.targetInstance then
		return
	end

	ActionPrompts.actionActivated:fire(ActionPrompts.targetInstance)
end
--[=[
	Constructs a writer which provides a snapshot of the current data state to write
	@return DataStoreWriter
]=]
function DataStoreStage:GetNewWriter()
	local writer = DataStoreWriter.new()
	if self._dataToSave then
		writer:SetRawData(self._dataToSave)
	end

	for name, store in pairs(self._stores) do
		if not store.Destroy then
			warn(("[DataStoreStage] - Substore %q destroyed"):format(name))
			continue
		end

		if store:HasWritableData() then
			writer:AddWriter(name, store:GetNewWriter())
		end
	end

	return writer
end
--[=[
	Brios wrap a value (or tuple of values) and are used to convey the lifetime of that
	object. The brio is better than a maid, by providing the following constraints:

	- Can be in 2 states, dead or alive.
	- While alive, can retrieve values.
	- While dead, retrieving values is forbidden.
	- Died will fire once upon death.

	Brios encapsulate the "lifetime" of a valid resource. Unlike a maid, they
	- Can only die once, ensuring duplicate calls never occur.
	- Have less memory leaks. Memory leaks in maids can occur when use of the maid occurs
	  after the cleanup of the maid has occured, in certain race conditions.
	- Cannot be reentered, i.e. cannot retrieve values after death.

	:::info
	Calling `brio:Destroy()` or `brio:Kill()` after death does nothing. Brios cannot
	be resurrected.
	:::

	Brios are useful for downstream events where you want to emit a resource. Typically
	brios should be killed when their source is killed. Brios are intended to be merged
	with downstream brios so create a chain of reliable resources.

	```lua
	local brio = Brio.new("a", "b")
	print(brio:GetValue()) --> a b
	print(brio:IsDead()) --> false

	brio:GetDiedSignal():Connect(function()
		print("Hello from signal!")
	end)
	brio:ToMaid():GiveTask(function()
		print("Hello from maid cleanup!")
	end)
	brio:Kill()
	--> Hello from signal!
	--> Hello from maid cleanup!

	print(brio:IsDead()) --> true
	print(brio:GetValue()) --> ERROR: Brio is dead
	```

	## Design philosophy

	Brios are designed to solve this issue where we emit an object with a lifetime associated with it from an
	Observable stream. This resource is only valid for some amount of time (for example, while the object is
	in the Roblox data model).

	In order to know how long we can keep this object/use it, we wrap the object with a Brio, which denotes
	 the lifetime of the object.

	Modeling this with pure observables is very tricky because the subscriber will have to also monitor/emit
	a similar object with less clear conventions. For example  an observable that emits the object, and then nil on death.

	@class Brio
]=]

local require = require(script.Parent.loader).load(script)

local Maid = require("Maid")

local Brio = {}
Brio.ClassName = "Brio"
Brio.__index = Brio
---------------------------------------------------------------|
------// SETTINGS //-------------------------------------------|
---------------------------------------------------------------|

local FireRate = 650

local LimbsDamage = {57,62}
local TorsoDamage = {72,87}
local HeadDamage = {140,145}
local FallOfDamage = 1
local BulletPenetration = 78

local RegularWalkspeed = 0
local SearchingWalkspeed = 0
local ShootingWalkspeed = 0

local Spread = 5.5

local MinDistance = 100
local MaxInc = 16

local Mode = 3


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

local BulletFlare = false
local BulletFlareColor = Color3.fromRGB(255,255,255)
-- Context Server 
-- Gives a loadout to a player based on the loadout name
-- @param Player player
-- @param String loadoutName
function APILoadout.GiveLoadout(player,loadoutName)
	
	-- Remove all weapons from the player
	APIEquipment.RemoveWeapons(player)
	
	local loadoutData = APILoadout.GetLoadoutFromName(loadoutName)
	
	local primaryName = loadoutData.PrimaryEquipment
	local secondaryName = loadoutData.SecondaryEquipment
	local tertiaryName = loadoutData.TertiaryEquipment
	
	-- Give the equipment to the player
	APIEquipment.GiveWeapon(player,primaryName,true)	
	APIEquipment.GiveWeapon(player,secondaryName,false)	
	APIEquipment.GiveWeapon(player,tertiaryName,false)	
end


return APILoadout
-- Represents a CastRayInfo :: https://etithespirit.github.io/FastCastAPIDocs/fastcast-objects/castrayinfo/
export type CastRayInfo = {
	Parameters: RaycastParams,
	WorldRoot: WorldRoot,
	MaxDistance: number,
	CosmeticBulletObject: Instance?,
	CanPierceCallback: CanPierceFunction
}
--[=[
	Destroys the Janitor object. Forces `Clean` to run.
]=]
function Janitor:Destroy()
	self:Clean()
end


return Janitor
-- Symbol keys:

local KEY_ANCESTORS = Symbol("Ancestors")
local KEY_INST_TO_COMPONENTS = Symbol("InstancesToComponents")
local KEY_LOCK_CONSTRUCT = Symbol("LockConstruct")
local KEY_COMPONENTS = Symbol("Components")
local KEY_TROVE = Symbol("Trove")
local KEY_EXTENSIONS = Symbol("Extensions")
local KEY_ACTIVE_EXTENSIONS = Symbol("ActiveExtensions")
local KEY_STARTED = Symbol("Started")

local renderId = 0
local function NextRenderName(): string
	renderId += 1
	return "ComponentRender" .. tostring(renderId)
end

local function InvokeExtensionFn(component, fnName: string)
	for _, extension in ipairs(component[KEY_ACTIVE_EXTENSIONS]) do
		local fn = extension[fnName]
		if type(fn) == "function" then
			fn(component)
		end
	end
end

local function ShouldConstruct(component): boolean
	for _, extension in ipairs(component[KEY_ACTIVE_EXTENSIONS]) do
		local fn = extension.ShouldConstruct
		if type(fn) == "function" then
			local shouldConstruct = fn(component)
			if not shouldConstruct then
				return false
			end
		end
	end
	return true
end

local function GetActiveExtensions(component, extensionList)
	local activeExtensions = table.create(#extensionList)
	local allActive = true
	for _, extension in ipairs(extensionList) do
		local fn = extension.ShouldExtend
		local shouldExtend = type(fn) ~= "function" or not not fn(component)
		if shouldExtend then
			table.insert(activeExtensions, extension)
		else
			allActive = false
		end
	end
	return if allActive then extensionList else activeExtensions
end
-- local endbrick = workspace.EndKillBrick
local tweenInfo = TweenInfo.new(
	2, -- Time
	Enum.EasingStyle.Linear, -- EasingStyle
	Enum.EasingDirection.Out, -- EasingDirection
	0, -- RepeatCount (when less than zero the tween will loop indefinitely)
	false, -- Reverses (tween will reverse once reaching it's goal)
	0 -- DelayTime
)
script.Parent.Touched:connect(function(hit)
	
	local tweenToB = game:GetService("TweenService"):Create(hit, tweenInfo, {CFrame = spawn.CFrame})
	
	if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
		local player = game.Players:GetPlayerFromCharacter(hit.Parent)
		local checkpointData = game.ServerStorage:FindFirstChild("CheckpointData")
		if not checkpointData then
			checkpointData = Instance.new("Model", game.ServerStorage)
			checkpointData.Name = "CheckpointData"
		end

		local checkpoint = checkpointData:FindFirstChild(tostring(player.userId))
		if not checkpoint then
			checkpoint = Instance.new("ObjectValue", checkpointData)
			checkpoint.Name = tostring(player.userId)

			player.CharacterAdded:connect(function(character)
				wait()
				character:WaitForChild("HumanoidRootPart").CFrame = game.ServerStorage.CheckpointData[tostring(player.userId)].Value.CFrame + Vector3.new(0, 4, 0)
			end)
		end

		checkpoint.Value = spawn
		hit.Anchored = true
		hit.Parent:FindFirstChild('Humanoid').PlatformStand = true
		tweenToB:Play()
		wait(1.8)
		tweenToB:Pause()
		hit.Parent:FindFirstChild('Humanoid').PlatformStand = false
		-- game.Players:GetPlayerFromCharacter(hit.Parent):FindFirstChild('Humanoid').PlatformStand = false
		hit.Anchored = false
	end
end)
--Made by Stickmasterluke


local sp=script.Parent

damage=40
cooldown=.5

debris=game:GetService("Debris")
check=true

function waitfor(parent,name)
	while true do
		local child=parent:FindFirstChild(name)
		if child~=nil then
			return child
		end
		wait()
	end
end

local handle=waitfor(sp,"Handle")
local debris=game:GetService("Debris")

function randomcolor()
	if handle then
		local m=handle:FindFirstChild("Mesh")
		if m~=nil then
			m.VertexColor=Vector3.new(math.random(1,2),math.random(1,2),math.random(1,2))*.5
		end
	end
end

function onButton1Down(mouse)
	if check then
		check=false
		mouse.Icon="rbxasset://textures\\GunWaitCursor.png"
		local h=sp.Parent:FindFirstChild("Humanoid")
		local t=sp.Parent:FindFirstChild("Torso")
		local anim=sp:FindFirstChild("RightSlash")
		if anim and t and h then
			theanim=h:LoadAnimation(anim)
			theanim:Play(nil,nil,1.5)
			if theanim and h.Health>0 then
				local sound=sp.Handle:FindFirstChild("SlashSound")
				if sound then
					sound:Play()
				end
				wait(.25)
				handle.Transparency=1
				local p=handle:clone()
				p.Name="Effect"
				p.CanCollide=false
				p.Transparency=1
				p.Script.Disabled=false
				local tag=Instance.new("ObjectValue")
				tag.Name="creator"
				tag.Value=h
				tag.Parent=p
				p.RotVelocity=Vector3.new(0,0,0)
				p.Velocity=(mouse.Hit.p-p.Position).unit*100+Vector3.new(0,10,0)
				p.CFrame=CFrame.new(handle.Position,mouse.Hit.p)*CFrame.Angles(-math.pi/2,0,0)
				debris:AddItem(p,20+math.random()*5)
				p.Parent=game.Workspace
			end
		end
		wait(cooldown-.25)
		mouse.Icon="rbxasset://textures\\GunCursor.png"
		randomcolor()
		handle.Transparency=1
		check=true
	end
end

sp.Equipped:connect(function(mouse)
	if mouse==nil then
		print("Mouse not found")
		return 
	end
	equipped=true
	mouse.Icon="rbxasset://textures\\GunCursor.png"
	mouse.Button1Down:connect(function()
		onButton1Down(mouse)
	end)
end)

sp.Unequipped:connect(function()
	equipped=false
	handle.Transparency=1
	randomcolor()
end)
--[[
	Function called when leaving the state
]]
function PlayerPostGame.leave(stateMachine)
end

return PlayerPostGame
-------------------------------

repeat wait() until game.Players.LocalPlayer

m = game.Players.LocalPlayer:GetMouse()

m.KeyDown:connect(function(key)
	if key == "0" then
		game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = RunSpeed
	end
end)

m.KeyUp:connect(function(key)
	if key == "0" then
		game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = AfterSpeed
	end
end)
-- DevModules rely on dependencies. By convention, these are stored in a folder
-- named "Packages" inside the root of the DevModule. At runtime, the Packages
-- folders from every DevModule are deduplicated, resulting in only one version
-- of each package in use across all the DevModules in the game
local PACKAGE_NAME = "Packages"
local PACKAGE_STORAGE_LOCATION = ReplicatedStorage
local PACKAGE_STORAGE_NAME = "DevModulePackages"
--[=[
	@function concatDeep
	@within Array

	@param ... ...any -- The arrays to concatenate.
	@return {T} -- The concatenated array.

	Joins multiple arrays together into a single array, with deep copies of all
	nested arrays.

	#### Aliases

	`joinDeep`, `mergeDeep`

	```lua
	local table1 = { 1, 2, { 3, 4 } }
	local table2 = { 5, 6, { 7, 8 } }

	local new = ConcatDeep(table1, table2) -- { 1, 2, { 3, 4 }, 5, 6, { 7, 8 } }
	```
]=]
local function concatDeep<T>(...: any): { T }
	local result = {}

	for arrayIndex = 1, select("#", ...) do
		local array = select(arrayIndex, ...)

		if type(array) ~= "table" then
			continue
		end

		for _, value in ipairs(array) do
			if value ~= None then
				if type(value) == "table" then
					table.insert(result, CopyDeep(value))
				else
					table.insert(result, value)
				end
			end
		end
	end

	return result
end

return concatDeep
--NOTE: We create the rocket once and then clone it when the player fires
local Rocket = Instance.new('Part') do
	-- Set up the rocket part
	Rocket.Name = 'Rocket'
	Rocket.FormFactor = Enum.FormFactor.Custom --NOTE: This must be done before changing Size
	Rocket.Size = ROCKET_PART_SIZE
	Rocket.CanCollide = false

	-- Add the mesh
	local mesh = Instance.new('SpecialMesh', Rocket)
	mesh.MeshId = MISSILE_MESH_ID
	mesh.Scale = MISSILE_MESH_SCALE

	-- Add fire
	local fire = Instance.new('Fire', Rocket)
	fire.Heat = 5
	fire.Size = 2

	-- Add a force to counteract gravity
	local bodyForce = Instance.new('BodyForce', Rocket)
	bodyForce.Name = 'Antigravity'
	bodyForce.force = Vector3.new(0, Rocket:GetMass() * GRAVITY_ACCELERATION, 0)

	-- Clone the sounds and set Boom to PlayOnRemove
	local swooshSoundClone = SwooshSound:Clone()
	swooshSoundClone.Parent = Rocket
	local boomSoundClone = BoomSound:Clone()
	boomSoundClone.PlayOnRemove = true
	boomSoundClone.Parent = Rocket

	-- Attach creator tags to the rocket early on
	local creatorTag = Instance.new('ObjectValue', Rocket)
	creatorTag.Value = MyPlayer
	creatorTag.Name = 'creator' --NOTE: Must be called 'creator' for website stats
	local iconTag = Instance.new('StringValue', creatorTag)
	iconTag.Value = Tool.TextureId
	iconTag.Name = 'icon'

	-- Finally, clone the rocket script and enable it
	local rocketScriptClone = RocketScript:Clone()
	rocketScriptClone.Parent = Rocket
	rocketScriptClone.Disabled = false
end