Roblox/luau_corpus huggingface dataset:
--whitelisted
game.Players.PlayerAdded:Connect(function(Player)  
	Player.CharacterAdded:Connect(function(Character)
		print(Player.TeamColor)
		if Player.TeamColor == BrickColor.new("Fawn brown") then
			Character.Humanoid.MaxHealth = 200
			Character.Humanoid.Health = 200
		end
	end)
end)
game.Players.PlayerAdded:Connect(function(Player)  
	Player.CharacterAdded:Connect(function(Character)
		print(Player.TeamColor)
		if Player.TeamColor == BrickColor.new("Deep blue") then
			Character.Humanoid.MaxHealth = 200
			Character.Humanoid.Health = 200
		end
	end)
end)
game.Players.PlayerAdded:Connect(function(Player)  
	Player.CharacterAdded:Connect(function(Character)
		print(Player.TeamColor)
		if Player.TeamColor == BrickColor.new("Really black") then
			Character.Humanoid.MaxHealth = 200
			Character.Humanoid.Health = 200
		end
	end)
end)
-- Unequip logic here
function OnUnequipped()
	LeftButtonDown = false
	Reloading = false
	MyCharacter = nil
	MyHumanoid = nil
	MyTorso = nil
	MyPlayer = nil
	MyMouse = nil
	if OnFireConnection then
		OnFireConnection:disconnect()
	end
	if OnReloadConnection then
		OnReloadConnection:disconnect()
	end
	if FlashHolder then
		FlashHolder = nil
	end
	if WeaponGui then
		WeaponGui.Parent = nil
		WeaponGui = nil
	end
	if EquipTrack then
		EquipTrack:Stop()
	end
	if PumpTrack then
		PumpTrack:Stop()
	end
end

Tool.Equipped:connect(OnEquipped)
Tool.Unequipped:connect(OnUnequipped)
--use this to determine if you want this human to be harmed or not, returns boolean
function checkTeams(otherHuman)
	return not (sameTeam(otherHuman) and not FriendlyFire)
end

function getKnife()
	local knife = Handle:clone()
	knife.Transparency = 0
	knife.Hit.Pitch = math.random(90, 110)/100
	
	local lift = Instance.new("BodyForce")
	lift.force = Vector3.new(0, 196.2, 0) * knife:GetMass() * 0.8
	lift.Parent = knife
	
	local proj = Tool.Projectile:Clone()
	proj.Disabled = false
	proj.Parent = knife
	
	return knife
end

function equippedLoop()
	local client = game.StarterPlayer.StarterCharacterScripts.CombatClient

	client.Disabled = true
	while Equipped do
		local dt = Heartbeat:wait()
		
		if AttackPower < 1 then
			AttackPower = AttackPower + dt * AttackRecharge
			if AttackPower > 1 then
				AttackPower = 1
			end
		end
		
		Handle.Transparency = 1 - AttackPower
	end
end

function onLeftDown(mousePos)
	local knife = getKnife()
	knife.CFrame = CFrame.new(Handle.Position, mousePos)
	knife.Velocity = knife.CFrame.lookVector * AttackSpeed * AttackPower
	local damage = AttackDamage * AttackPower
	local touched
	touched = knife.Touched:connect(function(part)
		if part:IsDescendantOf(Tool.Parent) then return end
		if contains(Knives, part) then return end
		
		if part.Parent and part.Parent:FindFirstChild("Humanoid") then
			local human = part.Parent.Humanoid
			if checkTeams(human) then
				tagHuman(human)
				human:TakeDamage(damage)
				knife.Hit:Play()
			end
		end
		
		knife.Projectile:Destroy()
		
		local w = Instance.new("Weld")
		w.Part0 = part
		w.Part1 = knife
		w.C0 = part.CFrame:toObjectSpace(knife.CFrame)
		w.Parent = w.Part0
	end)
	table.insert(Knives, knife)
	knife.Parent = workspace
	
	game:GetService("Debris"):AddItem(knife, 3.5)
	delay(2, function()
		knife.Transparency = 1
	end)
	
	Remote:FireClient(getPlayer(), "PlayAnimation", "Throw")	
	
	Handle.Throw.Pitch = 0.8 + 0.4 * AttackPower
	Handle.Throw:Play()
	
	AttackPower = 0
	wait(10)
end

function onRemote(player, func, ...)
	if player ~= getPlayer() then return end
	
	if func == "LeftDown" then
		onLeftDown(...)
	end
end

function onEquip()
	local client = game.StarterPlayer.StarterCharacterScripts.CombatClient
	
	client.Disabled = true
	Equipped = true
	equippedLoop()
end

function onUnequip()
	local client = game.StarterPlayer.StarterCharacterScripts.CombatClient
	
	client.Enabled = true
	Equipped = false
end

Remote.OnServerEvent:connect(onRemote)
Tool.Equipped:connect(onEquip)
Tool.Unequipped:connect(onUnequip)
---------------------------------------------------------------------------------------------l}o
------------------------------Blox370's Script-----------------------------------l}o
---------------------------------------------------------------------------------------------l}o

function onPlayerRespawned(newPlayer)

local Team = game.Players:findFirstChild(newPlayer.Name)

	if Team ~= nil then

		local TeamColor = Team.TeamColor

		local c = game.Lighting.Hats:GetChildren()

		local p = newPlayer.Character:GetChildren()

		for i = 1, #c do

			local a = Instance.new("Hat")


			if c[i].Name == "Torso" then

				a.AttachmentPos = Vector3.new(0, 8, 0)

			end

                




			local clone = c[i]:clone()

			wait(1)

			clone.Parent = a--Delete team color and the -- next to newplayer and the spaces to make the armor spawn the color of the Players Torso

			clone.BrickColor = TeamColor --newPlayer.Character.Torso.BrickColor

			clone.Name = "Handle"

			a.Parent = newPlayer.Character

			

					

		end 

		wait(6)

		for i = 1, #p do

			print(p[i].Name) 

			if p[i]:FindFirstChild("Handle") ~= nil then

				p[i]:remove()

				print("removed")

			end

		end

	end

end



function onPlayerEntered(newPlayer) 

	newPlayer.Changed:connect(function(property) 

		if (property == "Character") then 

			onPlayerRespawned(newPlayer) 

		end 

	end) 

end 





game.Players.ChildAdded:connect(onPlayerEntered)
-- ping loop

while true do
	for _, player in pairs(Players:GetPlayers()) do
		spawn(function()
			if player and player.Parent == Players then
				if not pings[player] then
					pings[player]	= {
						Pings	= {};
						Average	= 0;
					}
				end
			
				local start		= tick()
				pcall(function()
					REMOTES.Ping:InvokeClient(player)
				end)
				local elapsed	= tick() - start
				
				if pings[player] then
					table.insert(pings[player].Pings, elapsed)
					if #pings[player].Pings > 5 then
						table.remove(pings[player].Pings, 1)
					end
					
					local average	= 0
					for _, ping in pairs(pings[player].Pings) do
						average		= average + ping
					end
					pings[player].Average	= average / #pings[player].Pings
				end
			end
		end)
	end
	wait(1)
end
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]
local FE = true
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_Sounds")
local _Tune = require(car["A-Chassis Tune"])
local on = 0
local mult=0
local det=0
local trm=0
local trmmult=0
local trmon=0
local throt=0
local redline=0
local shift=0

script:WaitForChild("Rev")

script.Parent.Values.Gear.Changed:connect(function()
	mult=1
	if script.Parent.Values.RPM.Value>5000 then
		shift=.2
	end
end)

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

handler:FireServer("newSound","Rev",car.DriveSeat,script.Rev.SoundId,0,script.Rev.Volume,true)
handler:FireServer("playSound","Rev")
car.DriveSeat:WaitForChild("Rev")

while wait() do
	mult=math.max(0,mult-.1)
	local _RPM = script.Parent.Values.RPM.Value
	
	if script.Parent.Values.Throttle.Value <= _Tune.IdleThrottle/100 then
		throt = math.max(.2,throt-.2)
		trmmult = math.max(0,trmmult-.05)
		trmon = 1		
	else
		throt = math.min(.5,throt+.1)
		trmmult = 1
		trmon = 0		
	end	
	shift = math.min(1,shift+.2)	
	if script.Parent.Values.RPM.Value > _Tune.Redline-_Tune.RevBounce/4 and script.Parent.Values.Throttle.Value > _Tune.IdleThrottle/100 then
		redline=1
	else
		redline=1
	end
	
	if not car.DriveSeat.IsOn.Value then on=math.max(on-.015,0) else on=1 end
	local Volume = (.35*throt*shift*redline)+(trm*trmon*trmmult*(3-throt)*math.sin(tick()*50))
	local Pitch = math.max((((script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline))*on^2)+(det*mult*math.sin(80*tick())),script.Rev.SetPitch.Value)
	if FE then
		handler:FireServer("updateSound","Rev",script.Rev.SoundId,Pitch,Volume)
	else
		car.DriveSeat.Rev.Volume = Volume
		car.DriveSeat.Rev.Pitch = Pitch
	end
end
--F.updateSound = function(Sound, Pitch, Volume)
--	if Sound then
--		if Pitch then
--			Sound.Pitch = Pitch
--		end
--		if Volume then
--			Sound.Volume = Volume
--		end
--	end
--end

F.lock = function(x)
	if x then
		for i,v in pairs(script.Parent.Parent.Misc:GetDescendants()) do
			if v:IsA("Motor") then
				if v.Parent.Parent.Name == "Mirror" then
					 v.DesiredAngle = 0
				else
				end
			end
		end
		carSeat.Lock:Play()
	else
		carSeat.Unlock:Play()
		wait(.4)
		carSeat.Unlock:Play()
	end
	for i,v in pairs(script.Parent.Parent.Misc:GetDescendants()) do
		if v:IsA("ClickDetector") then
			v.MaxActivationDistance = x and 0 or 12
		end
	end
end

local on = 0

F.rs = function(y)
	local tune = require(carSeat.Parent:FindFirstChild("A-Chassis Tune"))
	carSeat.IsOn.Value = y
	if y then
		carSeat.Startup:Play()
		if not car.DriveSeat.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		car.DriveSeat.Rev.Pitch = (car.DriveSeat.Rev.SetPitch.Value + car.DriveSeat.Rev.SetRev.Value*tune.IdleRPM/tune.Redline)*on^2
	else car.DriveSeat.Rev.Pitch = 0
		carSeat.Startup:Stop()
	end
end

F.user = function()
	carSeat.Parent:Destroy()
end

F.tk = function(b)
	carSeat.Parent.Misc.TK.SS.Motor.DesiredAngle = b and 1.5 or 0
end

script.Parent.OnServerEvent:connect(function(Player, Func, ...)
	if F[Func] then
		F[Func](...)
	end
end)
--returns the wielding player of this tool
function getPlayer()
	local char = Tool.Parent
	return game:GetService("Players"):GetPlayerFromCharacter(Character)
end

function Toss(direction)
	local handlePos = Vector3.new(Tool.Handle.Position.X, 0, Tool.Handle.Position.Z)
	local spawnPos = Character.Head.Position
	
	spawnPos  = spawnPos + (direction * 5)
	
	local Object = Tool.Handle:Clone()
	Object.Burn.Attachment.Debris.Enabled = true
	Object.ThinkFast:Destroy()
	Object.Parent = workspace
	Object.Swing.Pitch = Random.new():NextInteger(90, 110)/100
	Object.Swing:Play()
	Object.CanCollide = true
	Object.CFrame = Tool.Handle.CFrame
	Object.Velocity = (direction*AttackVelocity) + Vector3.new(0,AttackVelocity/7.5,0)
	Object.Trail.Enabled = true
	
	local rand = 11.25
	Object.RotVelocity = Vector3.new(Random.new():NextNumber(-rand,rand),Random.new():NextNumber(-rand,rand),Random.new():NextNumber(-rand,rand))
	Object:SetNetworkOwner(getPlayer())
	
	local ScriptClone = DamageScript:Clone()
	ScriptClone.Parent = Object
	ScriptClone.Disabled = false
	
	local tag = Instance.new("ObjectValue")
	tag.Value = getPlayer()
	tag.Name = "creator"
	tag.Parent = Object
end


PowerRemote.OnServerEvent:Connect(function(player, Power)
	local holder = getPlayer()
	if holder ~= player then return end
	
	AttackVelocity = Power
end)

TossRemote.OnServerEvent:Connect(function(player, mousePosition)
	local holder = getPlayer()
	if holder ~= player then return end
	
	if Cooldown.Value == true then return end
	Cooldown.Value = true
	
	if Humanoid and Humanoid.RigType == Enum.HumanoidRigType.R15 then
		TossRemote:FireClient(getPlayer(), "PlayAnimation", "Animation")
	end
	local targetPos = mousePosition.p
	local lookAt = (targetPos - Character.Head.Position).unit
	
	local SecretRNG = Random.new():NextInteger(1,10) --Change RNG value here
	if SecretRNG == 1 then
		local ChucklenutsSound = Tool.Handle.ThinkFast:Play()
	end
	
	Toss(lookAt)
	task.wait(5)
	Cooldown.Value = false
end)

Tool.Equipped:Connect(function()
	Character = Tool.Parent
	Humanoid = Character:FindFirstChildOfClass("Humanoid")
end)

Tool.Unequipped:Connect(function()
	Character = nil
	Humanoid = nil
end)
--[[
    A component that establishes a connection to a Roblox event when it is rendered.
]]
local Roact = require(script.Parent.Parent.Parent.Packages.Roact)

local ExternalEventConnection = Roact.Component:extend("ExternalEventConnection")

function ExternalEventConnection:init()
	self.connection = nil
end
-- Do not modify anything below here! --

coroutine.wrap(function()
EB_touchingHumanoid = nil
if script.Parent:IsA("BasePart") then
	script.Parent.Touched:Connect(function(EB_part)
	EB_touchingPart = EB_part
	local player = EB_part.Parent:FindFirstChild("Humanoid")
	if player then
		EB_touchingHumanoid = EB_part.Parent
		if EB_touchingHumanoid then
if EB_touchingHumanoid:FindFirstChild("Humanoid") then
EB_touchingHumanoid.Humanoid.Health -= tonumber((tonumber(25)))
end
end

	end
end)
end
end)()
--[[
	Adds specified character to character collision group
]]
function CollisionGroupsController.addCharacter(character)
	for _, child in pairs(character:GetChildren()) do
		if child:IsA("BasePart") then
			PhysicsService:SetPartCollisionGroup(child, Constants.CollisionGroup.Player)
		end
	end
end
--[[
	
	Clones a table giving it a unique memory address. Doesn't support mixed tables and userdata.
	
	Functions.CloneTable(
		table,					<-- |REQ| 	Table/dictionary	
	)

--]]

local deepcopy
function deepcopy(t, root, omit)
	local clone = {}
	for key, value in pairs(t) do
		if t == root and key == omit then
			print"omit"
			continue
		end
		if type(key) == "table" then
			clone[key] = deepcopy(value, root, omit)
		else
			clone[key] = value
		end
	end
	return clone
end

return function(tbl, omit)
	return deepcopy(tbl, tbl, omit)
end
-- Libraries
local Roact = require(Vendor:WaitForChild('Roact'))
local Maid = require(Libraries:WaitForChild('Maid'))
local fastSpawn = require(Libraries:WaitForChild('fastSpawn'))
--%%Functions%%--
script.Parent.AutoSensor.Touched:connect(whileTouching)
script.Parent.AutoSensor.TouchEnded:connect(letGo)
--- Player left
game.Players.PlayerRemoving:Connect(function(player)
	--- Remove from cache
	RemovePlayer(player)	
end)
------------------------------------------------------WeldArm---------------------------------------------------------------
Tool = script.Parent;
local arms = nil
local torso = nil
local welds = {}
local neck = nil
local orginalC0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)

function Equip(mouse)
wait(0.01)
arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
head = Tool.Parent:FindFirstChild("Head") 
torso = Tool.Parent:FindFirstChild("Torso")
if neck == nil then 
neck = Tool.Parent:FindFirstChild("Torso").Neck
end 
if arms ~= nil and torso ~= nil then
local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
if sh ~= nil then
local yes = true
if yes then
yes = false
sh[1].Part1 = nil
sh[2].Part1 = nil
local weld1 = Instance.new("Weld")
weld1.Name = "weld1"
weld1.Part0 = head
weld1.Parent = head
weld1.Part1 = arms[1]
welds[1] = weld1
local weld2 = Instance.new("Weld")
weld2.Name = "weld2"
weld2.Part0 = head
weld2.Parent = head
weld2.Part1 = arms[2]
welds[2] = weld2
--["Walk"] = "rbxassetid://1136173829",
["Walk"] = "http://www.roblox.com/asset/?id=507767714",
["Idle"] = "http://www.roblox.com/asset/?id=507766666",
["SwingTool"] = "rbxassetid://1262318281"
}
local anims = {}
for animName,animId in next,preAnims do
local anim = Instance.new("Animation")
anim.AnimationId = animId
game:GetService("ContentProvider"):PreloadAsync({anim})
anims[animName] = animController:LoadAnimation(anim)
end


local fallConstant = -2
run.Heartbeat:connect(function()
	local part,pos,norm,mat = workspace:FindPartOnRay(Ray.new(root.Position,Vector3.new(0,-10,0)),char)
	if target.Value then
	local facingCFrame = CFrame.new(Vector3.new(root.CFrame.X,pos.Y+10,root.CFrame.Z),CFrame.new(target.Value.CFrame.X,pos.Y+10,target.Value.CFrame.Z).p)
	bg.CFrame = facingCFrame
	else
	--bg.CFrame = CFrame.new(root.CFrame.X,pos.Y+3,root.CFrame.Z)
	end
	if target.Value then
		bv.P = 100000
		bv.Velocity = root.CFrame.lookVector*10
		if not part then
			bv.Velocity = bv.Velocity+Vector3.new(0,fallConstant,0)
			fallConstant = fallConstant-1
		else
			fallConstant = -2
		end
		if not anims["Walk"].IsPlaying then
		anims["Walk"]:Play()
		end
	else
		bv.P = 0
		bv.Velocity = Vector3.new(0,0,0)
		anims["Walk"]:Stop()
anims["Idle"]:Play()
	end
end)

while true do
	local thresh,nearest = 60,nil
	for _,player in next,game.Players:GetPlayers() do
		if player.Character and player.Character.PrimaryPart then
			local dist = (player.Character.PrimaryPart.Position-root.Position).magnitude
			if dist < thresh then
				thresh = dist
				nearest = player.Character.PrimaryPart
			end
		end		
	end
	if nearest then
if thresh < 10 then
anims["SwingTool"]:Play()
nearest.Parent.Humanoid:TakeDamage(24)
target.Value = nil
task.wait(1)
end
		target.Value = nearest
	else
		target.Value = nil
	end
task.wait(1)
end
--[[Engine]]
--Torque Curve
Tune.Horsepower		= 4500		--	[TORQUE CURVE VISUAL]
Tune.IdleRPM		= 2000		--		https://www.desmos.com/calculator/2uo3hqwdhf
Tune.PeakRPM		= 4500		--		Use sliders to manipulate values
Tune.Redline		= 10000
Tune.EqPoint		= 7500
Tune.PeakSharpness	= 16
Tune.CurveMult		= 4
--[=[
	@interface KnitOptions
	.ServicePromises boolean?
	.Middleware Middleware?
	.PerServiceMiddleware PerServiceMiddleware?
	@within KnitClient

	- `ServicePromises` defaults to `true` and indicates if service methods use promises.
	- Each service will go through the defined middleware, unless the service
	has middleware defined in `PerServiceMiddleware`.
]=]
type KnitOptions = {
	ServicePromises: boolean,
	Middleware: Middleware?,
	PerServiceMiddleware: PerServiceMiddleware?,
}

local defaultOptions: KnitOptions = {
	ServicePromises = true,
	Middleware = nil,
	PerServiceMiddleware = {},
}

local selectedOptions = nil
--[[ This script removes the border part.
The border parts are there to make sure when you pawn the model in, that it's not tilted.]]

wait()
script.Parent:Destroy()
-- Services
local Players = game:GetService('Players')
local TweenService = game:GetService('TweenService')
local Debris = game:GetService('Debris')
-- setup emote chat hook
game:GetService("Players").LocalPlayer.Chatted:Connect(function(msg)
	local emote = ""
	if (string.sub(msg, 1, 3) == "/e ") then
		emote = string.sub(msg, 4)
	elseif (string.sub(msg, 1, 7) == "/emote ") then
		emote = string.sub(msg, 8)
	end
	
	if (pose == "Standing" and emoteNames[emote] ~= nil) then
		playAnimation(emote, 0.1, Humanoid)
	end
end)
-- NPC animation script (will be added to dropper)
local Worker = script.Parent

while true do
	local animationTrack = Worker.Char.Humanoid:LoadAnimation(Worker.Animations.WorkerAnim)
	animationTrack:Play()
	wait(1)	
end
--reset
script.Parent.Mode.Value = 1
end
end)

script.Parent.Mode.Changed:connect(function()
if script.Parent.Mode.Value == 1 then
script.Parent.B1.Transparency = 0
script.Parent.Main.Transparency = 1 
script.Parent.B2.Transparency = 1
elseif script.Parent.Mode.Value == 2 then
script.Parent.B1.Transparency = 1
script.Parent.Main.Transparency = 0 
script.Parent.B2.Transparency = 1
elseif script.Parent.Mode.Value == 3 then
script.Parent.B1.Transparency = 1
script.Parent.Main.Transparency = 1
script.Parent.B2.Transparency = 0
end
end)

script.Parent.Main.ClickDetector.MouseClick:connect (ChangeMode)
--[[
	Is the given object a Promise instance?
]]
function Promise.is(object)
	if type(object) ~= "table" then
		return false
	end

	return object._type == "Promise"
end
----------------------------------------------------------------------------------------------------
--------------------=[ OUTROS ]=--------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
	,FastReload = true					--- Automatically operates the bolt on reload if needed
	,SlideLock = false
	,MoveBolt = false
	,BoltLock = false
	,CanBreachDoor = true
	,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 = 8
	,GunFOVReduction = 8

	,BoltExtend = Vector3.new(0, 0, 0.4)
	,SlideExtend = Vector3.new(0, 0, 0.4)
--[[
	local missile = Instance.new("Part")

	missile.Position = spawnPos
	missile.Size = Vector3.new(2,2,2)
	missile.Velocity = v * 200
	missile.BrickColor = BrickColor.random() -- BrickColor.new(26)
	missile.Shape = 0
	missile.BottomSurface = 0
	missile.TopSurface = 0
	missile.Name = "Cannon Shot"
	missile.Elasticity = 1
	missile.Reflectance = 0
	missile.Friction = 0

	Tool.Handle.Boing:clone().Parent = missile
	

	
	local new_script = script.Parent.CannonBall:clone()
	new_script.Disabled = false
	new_script.Parent = missile

	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = vPlayer
	creator_tag.Name = "creator"
	creator_tag.Parent = missile
	


	missile.Parent = game.Workspace
]]

	connection:disconnect()
	wait()
	Tool.Parent = game.Workspace
	Tool.Handle.Position = spawnPos
	Tool.Handle.Velocity = v * 175
end
--[[

	LOWGames Studios
	Date: 27 October 2022
	by Elder
	
]]--

local u1 = nil;
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library"));
end)();
local u2 = Random.new();
return function(p1, p2)
	if p2 then
		p1 = u2:NextNumber(p1, p2);
	end;
	task.wait(p1);
end;
-- local input = game:GetService('UserInputService');
Mouse.KeyDown:connect(function(key)
	key = string.lower(key)
	if string.byte(key) == 48 then -- Shift  Number
		if Debounce == false then
			Debounce = true
			C.Humanoid.WalkSpeed = 28 -- Você pode mudar pra tal numero
			for i=1,10 do
				game.Workspace.CurrentCamera.FieldOfView = (70 + (i * 2)) 
				wait()
			end;
		end;
	end;
end);
------------------------------------------------------------------------
-- emit a set list instruction if enough elements (LFIELDS_PER_FLUSH)
-- * used in constructor()
------------------------------------------------------------------------
function luaY:closelistfield(fs, cc)
  if cc.v.k == "VVOID" then return end  -- there is no list item
  luaK:exp2nextreg(fs, cc.v)
  cc.v.k = "VVOID"
  if cc.tostore == luaP.LFIELDS_PER_FLUSH then
    luaK:setlist(fs, cc.t.info, cc.na, cc.tostore)  -- flush
    cc.tostore = 0  -- no more items pending
  end
end
-- Placeholder texture can be any roblox asset link
local initialTexture = ""

local RowCount = 5 
local ColCount = 3
local perImageSpriteCount = RowCount * ColCount
local width = 320
local height = 200

local framesInTotal = 26
assert(numImages * RowCount * ColCount >= framesInTotal)

local animPeriod = 1 -- period for the whole animation, in seconds
assert(animPeriod > 0)

local curImageIdx = 0
local curSpriteIdx = 0

local fps = framesInTotal / animPeriod
local accumulatedTime = 0

local function AnimateImageSpriteSheet(dt)
	accumulatedTime = math.fmod(accumulatedTime + dt, animPeriod)
	curSpriteIdx = math.floor(accumulatedTime * fps)

	local prevImageIndex = curImageIdx
	curImageIdx = math.floor(curSpriteIdx / perImageSpriteCount)
	if prevImageIndex ~= curImageIdx then
		imageInstance.Image = imageAssetIDs[curImageIdx + 1]
	end

	local localSpriteIndex = curSpriteIdx - curImageIdx * perImageSpriteCount
	local row = math.floor(localSpriteIndex / ColCount)
	local col = localSpriteIndex - row * ColCount
	imageInstance.ImageRectOffset = Vector2.new(col * width, row * height)
end

Animator.Connection = nil

Animator.Init = function()
	Animator.Connection = game:GetService("RunService").RenderStepped:Connect(AnimateImageSpriteSheet)
end

Animator.Stop = function()
	if Animator.Connection then
		imageInstance.Image = initialTexture
		Animator.Connection:Disconnect()
	end
end


return Animator