Pinkstack/roblox-luau-corpus-text huggingface dataset:
-------- OMG HAX



r = game:service("RunService")


local damage = 0

local slash_damage = 0

local debounce = false
function blow(hit)
	local humanoid = hit.Parent:findFirstChild("Immortal")
	local vCharacter = script.Parent.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)
	local hum = vCharacter:findFirstChild("Immortal") -- non-nil if tool held by a character
	if humanoid~=nil and humanoid ~= hum and hum ~= nil then
	-- final check, make sure sword is in-hand
		if debounce == false then				
			debounce = true
			tagHumanoid(humanoid, vPlayer)
			zomghit = 0 + script.Parent.AddDam.Value
			humanoid:TakeDamage(zomghit)
			untagHumanoid(humanoid)
			wait(0.35)
			debounce = false	
		end
	end
end
function tagHumanoid(humanoid, player)
	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = player
	creator_tag.Name = "creator"
	creator_tag.Parent = humanoid
end

function untagHumanoid(humanoid)
	if humanoid ~= nil then
		local tag = humanoid:findFirstChild("creator")
		if tag ~= nil then
			tag.Parent = nil
		end
	end
end


function attack()
	damage = slash_damage
	
	local Slash1 = script.Parent.Handle.Slash1

	local Slash2 = script.Parent.Handle.Slash2

	Slashsounds={Slash1, Slash2}
	
	Whoosh=(Slashsounds[math.random(1,#Slashsounds)])
	Whoosh:play()
	local vCharacter = script.Parent.Parent
	local hum = vCharacter:findFirstChild("Immortal")
	
	Move1 = hum:LoadAnimation(script.Parent.Handle.LeftSlash)
	Move2 = hum:LoadAnimation(script.Parent.Handle.OverHeadSwing)
	Move3 = hum:LoadAnimation(script.Parent.Handle.RightSlash)

	
	MovesLikeJagger={Move1, Move2, Move3}
	IGotThem=(MovesLikeJagger[math.random(1,#MovesLikeJagger)])
	IGotThem:Play()
	--hum.WalkSpeed = 0
	wait(.1)
	Whoosh:play()
	wait(.1)
	--hum.WalkSpeed = 16
end

script.Parent.Enabled = true

function onActivated()

	if not script.Parent.Enabled then
		return
	end

	script.Parent.Enabled = false

	local character = script.Parent.Parent;
	local humanoid = character.Immortal
	if humanoid == nil then
		print("Humanoid not found")
		return 
	end

	attack()

	wait(.1)

	script.Parent.Enabled = true
end


function onEquipped()
	--if Tool.Handle.LightsaberOn.isPlaying == false then
		script.Parent.Handle.LightsaberOn:play()
		script.Parent.Handle.IdleLoop:Play()	
	--end
end

function onUnequipped()

	script.Parent.Handle.LightsaberOff:stop()
	script.Parent.Handle.IdleLoop:Stop()
end

script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)
script.Parent.Unequipped:connect(onUnequipped)

connection = script.Parent.Handle.Touched:connect(blow)
----- cold tap handler -----



coldTap.Interactive.ClickDetector.MouseClick:Connect(function()
	if coldOn.Value == false then
		coldOn.Value = true
		faucet.ParticleEmitter.Enabled = true
		waterSound:Play()
		coldTap:SetPrimaryPartCFrame(coldTap.PrimaryPart.CFrame * CFrame.Angles(0, math.rad(-45), 0))
	else
		coldOn.Value = false
		if hotOn.Value == false then
			faucet.ParticleEmitter.Enabled = false
			waterSound:Stop()
		end
		coldTap:SetPrimaryPartCFrame(coldTap.PrimaryPart.CFrame * CFrame.Angles(0, math.rad(45), 0))
	end
end)
--[[
	Packs an array of numbers into a given animatable data type.
	If the type is not animatable, nil will be returned.

	FUTURE: When Luau supports singleton types, those could be used in
	conjunction with intersection types to make this function fully statically
	type checkable.
]]



local Oklab = require(script.Parent.Parent.Parent.Colour.Oklab)

local function packType(numbers: {number}, typeString: string)
	if typeString == "number" then
		return numbers[1]

	elseif typeString == "CFrame" then
		return
			CFrame.new(numbers[1], numbers[2], numbers[3]) *
			CFrame.fromAxisAngle(
				Vector3.new(numbers[4], numbers[5], numbers[6]).Unit,
				numbers[7]
			)

	elseif typeString == "Color3" then
		return Oklab.from(
			Vector3.new(numbers[1], numbers[2], numbers[3]),
			false
		)

	elseif typeString == "ColorSequenceKeypoint" then
		return ColorSequenceKeypoint.new(
			numbers[4],
			Oklab.from(
				Vector3.new(numbers[1], numbers[2], numbers[3]),
				false
			)
		)

	elseif typeString == "DateTime" then
		return DateTime.fromUnixTimestampMillis(numbers[1])

	elseif typeString == "NumberRange" then
		return NumberRange.new(numbers[1], numbers[2])

	elseif typeString == "NumberSequenceKeypoint" then
		return NumberSequenceKeypoint.new(numbers[2], numbers[1], numbers[3])

	elseif typeString == "PhysicalProperties" then
		return PhysicalProperties.new(numbers[1], numbers[2], numbers[3], numbers[4], numbers[5])

	elseif typeString == "Ray" then
		return Ray.new(
			Vector3.new(numbers[1], numbers[2], numbers[3]),
			Vector3.new(numbers[4], numbers[5], numbers[6])
		)

	elseif typeString == "Rect" then
		return Rect.new(numbers[1], numbers[2], numbers[3], numbers[4])

	elseif typeString == "Region3" then
		-- FUTURE: support rotated Region3s if/when they become constructable
		local position = Vector3.new(numbers[1], numbers[2], numbers[3])
		local halfSize = Vector3.new(numbers[4] / 2, numbers[5] / 2, numbers[6] / 2)
		return Region3.new(position - halfSize, position + halfSize)

	elseif typeString == "Region3int16" then
		return Region3int16.new(
			Vector3int16.new(numbers[1], numbers[2], numbers[3]),
			Vector3int16.new(numbers[4], numbers[5], numbers[6])
		)

	elseif typeString == "UDim" then
		return UDim.new(numbers[1], numbers[2])

	elseif typeString == "UDim2" then
		return UDim2.new(numbers[1], numbers[2], numbers[3], numbers[4])

	elseif typeString == "Vector2" then
		return Vector2.new(numbers[1], numbers[2])

	elseif typeString == "Vector2int16" then
		return Vector2int16.new(numbers[1], numbers[2])

	elseif typeString == "Vector3" then
		return Vector3.new(numbers[1], numbers[2], numbers[3])

	elseif typeString == "Vector3int16" then
		return Vector3int16.new(numbers[1], numbers[2], numbers[3])
	else
		return nil
	end
end

return packType
-- return nil
-- end



local function isObject(item: any): boolean
	return item and typeof(item) == "table" and not Array.isArray(item)
end

local function testNameToKey(testName: ConfigPath, count: number): string
	return testName .. " " .. count
end

local function keyToTestName(key: string): string
	if not key:match(" %d+$") then
		error(Error("Snapshot keys must end with a number."))
	end

	return key:gsub(" %d+$", "")
end

local function getSnapshotData(
	snapshotPath: ConfigPath,
	update: ConfigSnapshotUpdateState
): { data: SnapshotData, dirty: boolean }
	local data = {}
	local dirty = false

	-- ROBLOX deviation: snapshots in Jest Roblox are ModuleScripts, so we require them to load them
	pcall(function()
		data = require(snapshotPath) :: any
	end)
	-- ROBLOX deviation: omitted validateSnapshotVersion for now since we will have our own
	-- snapshot versioning
	-- local validationResult = validateSnapshotVersion(data)
	local isInvalid = false -- data and validationResult

	-- if update == "none" and isInvalid then
	-- 	error(validationResult)
	-- end

	if (update == "all" or update == "new") and isInvalid then
		dirty = true
	end

	return {
		data = data,
		dirty = dirty,
	}
end
--[[Brakes]]


	Tune.ABSEnabled		= true		-- Implements ABS
	Tune.ABSThreshold	= 20		-- Slip speed allowed before ABS starts working (in SPS) 

	Tune.FBrakeForce	= 8500		-- Front brake force
	Tune.RBrakeForce	= 8000		-- Rear brake force
	Tune.PBrakeForce	= 9000		-- Handbrake force
	
	Tune.FLgcyBForce	= 15000		-- Front brake force [PGS OFF]
	Tune.RLgcyBForce	= 10000		-- Rear brake force [PGS OFF]
	Tune.LgcyPBForce	= 25000		-- Handbrake force [PGS OFF]
--



field:GetPropertyChangedSignal("Text"):Connect(function()
	result()
	
	tween_service:Create(frame, info, {ImageTransparency = Random.new():NextNumber(0, 1)}):Play()
end)

field.FocusLost:Connect(function()
	field.Text = ""
	
	--
	
	tween_service:Create(frame, info, {ImageTransparency = 0}):Play()
end)
--------------------------------------------------------------------------



local _WHEELTUNE = {
																		--[[	
			SS6 Presets
	[Eco]		
		WearSpeed = 1,
		TargetFriction = .7,
		MinFriction = .1,
	[Road]		
		WearSpeed = 2,
		TargetFriction = .7,
		MinFriction = .1,
	[Sport]		
		WearSpeed = 3,
		TargetFriction = .79,
		MinFriction = .1,											]]

	TireWearOn 		= true	,
	
	--Friction and Wear
	FWearSpeed		= .3	,
	FTargetFriction	= 1.1	,
	FMinFriction 	= .5	,
	
	RWearSpeed		= .3	,
	RTargetFriction	= 1.1	,
	RMinFriction	= .5	,
	
	--Tire Slip
	TCSOffRatio		= 1/3	,
	WheelLockRatio	= 1/2	,	--SS6 Default = 1/4
	WheelspinRatio	= 1/1.1	,	--SS6 Default = 1/1.2
	
	--Wheel Properties
	FFrictionWeight	= 1		,	--SS6 Default = 1
	RFrictionWeight	= 1		,	--SS6 Default = 1
	FLgcyFrWeight	= 10	,
	RLgcyFrWeight	= 10	,
	
	FElasticity		= 0		,	--SS6 Default = .5
	RElasticity		= 0		,	--SS6 Default = .5
	FLgcyElasticity	= 0		,
	RLgcyElasticity	= 0		,
	
	FElastWeight	= 1		,	--SS6 Default = 1
	RElastWeight	= 1		,	--SS6 Default = 1
	FLgcyElWeight	= 10	,
	RLgcyElWeight	= 10	,
	
	--Wear Regen
	RegenSpeed		= 1.8		--SS6 Default = 3.6
}
--[=[
	@param name string -- Name passed to `RunService:BindToRenderStep`
	@param priority number -- Priority passed to `RunService:BindToRenderStep`
	@param callbackFn UpdateCallbackFn

	Bind the `Update` method to RenderStep.

	All bond functions are cleaned up when the shake instance is stopped
	or destroyed.

	```lua
	local renderPriority = Enum.RenderPriority.Camera.Value

	local function SomeShake(pos: Vector3, rot: Vector3, completed: boolean)
		-- Shake
	end

	shake:BindToRenderStep("SomeShake", renderPriority, SomeShake)
	```
]=]


function Shake:BindToRenderStep(name: string, priority: number, callbackFn: UpdateCallbackFn)
	self._trove:BindToRenderStep(name, priority, function()
		callbackFn(self:Update())
	end)
end
--[[ Script Variables ]]

--
while not Players.LocalPlayer do
	wait()
end
local LocalPlayer = Players.LocalPlayer
local IsFollowStick = false
local ThumbstickFrame = nil
local MoveTouchObject = nil
local OnTouchEnded = nil		-- defined in Create()
local OnTouchMovedCn = nil
local OnTouchEndedCn = nil
local currentMoveVector = Vector3.new(0,0,0)
--[[
	Sets the locked status of the given emote for the specified player. The
	player will be updated of this change via a RemoteEvent.

	Parameters:
	- player - The Player whose emote lock status will be changed
	- emoteName - The name of the emote that will have its lock status changed
	- isLocked - The lock status to change to
]]


function EmoteManager:setEmoteIsLockedForPlayer(player, emoteName, isLocked)
	-- Wait for all setup for the player to complete before changing the locked
	-- status of an emote
	if not self.playerOwnedEmotes[player.UserId] then
		local updatedPlayerId = nil
		while updatedPlayerId ~= player.UserId do
			updatedPlayerId = self.updatedPlayerEmotes.Event:Wait()
		end
	end

	local allPlayerEmotes = self.playerEmoteConfig[player.UserId]

	local emote = allPlayerEmotes[emoteName]
	if emote then
		local newEmotes = Cryo.Dictionary.join(allPlayerEmotes, {
			[emoteName] = Cryo.Dictionary.join(emote, {
				isLocked = isLocked,
			}),
		})

		self.playerEmoteConfig[player.UserId] = newEmotes
		self.remotes.sendUpdatedEmotes:FireClient(player, newEmotes)
	else
		error(string.format("The emote with the name %s does not exist", emoteName))
	end
end
--[[Weight and CG]]


Tune.Weight			= 2200		-- Total weight (in pounds)
Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	--[[Width]]		6		,
	--[[Height]]		3.5		,
	--[[Length]]		14		}
Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
Tune.CGHeight		= .8		-- Center of gravity height (studs relative to median of all wheels)
Tune.WBVisible		= false		-- Makes the weight brick visible
--[[ Module Functions ]]

--
Chassis = {}

Chassis.root = PackagedVehicle:FindFirstChild("Chassis") --the root of the Chassis model
Chassis.Body = PackagedVehicle:FindFirstChild("Body") -- the body of the Chassis model
Chassis.driverSeat = Chassis.root:FindFirstChildOfClass("VehicleSeat")
Chassis.passengerSeats = {
		Chassis.root:FindFirstChild("SeatFR"),
		Chassis.root:FindFirstChild("SeatRL"),
		Chassis.root:FindFirstChild("SeatRR")
}

local randomSuspension = Chassis.root:FindFirstChild("SuspensionFL")
local wheelRadius = randomSuspension.Wheel.Size.y/2
Chassis.driverSeat.MaxSpeed = VehicleParameters.MaxSpeed * wheelRadius

function Chassis.InitializeDrivingValues()
	-- Constraint tables always ordered FL, FR, RL, RR
	Motors = getVehicleMotors()
	
	local strutSpringsFront = getSprings("StrutFront")
	local strutSpringsRear = getSprings("StrutRear")
	local torsionSprings = getSprings("TorsionBar")

	RedressMount = Chassis.root:WaitForChild("RedressMount")
	
	SteeringPrismatic = constraints:FindFirstChild("SteeringPrismatic")
	SteeringPrismatic.UpperLimit = VehicleParameters.MaxSteer
	SteeringPrismatic.LowerLimit = -VehicleParameters.MaxSteer

	for _,s in pairs(strutSpringsFront) do
		adjustSpring(s, ActualStrutSpringStiffnessFront, ActualStrutSpringDampingFront)
	end
	for _,s in pairs(strutSpringsRear) do
		adjustSpring(s, ActualStrutSpringStiffnessRear, ActualStrutSpringDampingRear)
	end
	for _,s in pairs(torsionSprings) do
		adjustSpring(s, ActualTorsionSpringStiffness, ActualTorsionSpringDamping)
	end
	
	local chassisChildren = Chassis.root:GetChildren()
	for i = 1, #chassisChildren do
		local model = chassisChildren[i]
		if model:IsA("Model") then
			local wheel = model:FindFirstChild("Wheel")
			if wheel then
				local old = wheel.CustomPhysicalProperties
				local new = PhysicalProperties.new(old.Density, VehicleParameters.WheelFriction, old.Elasticity, old.FrictionWeight, old.ElasticityWeight)
				wheel.CustomPhysicalProperties = new
			end
		end
	end

	setMotorTorque(10000)
end

function Chassis.GetDriverSeat()
	return Chassis.driverSeat
end

function Chassis.GetPassengerSeats()
	return Chassis.passengerSeats
end

function Chassis.GetBase()
	return Chassis.root.PrimaryPart or Chassis.root:FindFirstChild("FloorPanel")
end
-- ================================================================================
-- PUBLIC FUNCTIONS
-- ================================================================================


function Checkpoint.new(collisionBody, manager)
	assert(collisionBody, "Trying to set partless checkpoint")	
	
	local newCheckpoint = {CollisionBody = collisionBody, Manager = manager}
	setmetatable(newCheckpoint, Checkpoint)	
	
	newCheckpoint.PlayersTouched = {}
	
	newCheckpoint.CollisionBody.Touched:connect(function(otherPart)
		if otherPart and otherPart.Parent then
			local player = game.Players:GetPlayerFromCharacter(otherPart.Parent)
			if player then
				newCheckpoint.Manager:PlayerCrossedCheckpoint(player, newCheckpoint)
			end	
		end
	end)
	
	newCheckpoint.CollisionConnection = nil
	
	return newCheckpoint
end -- Checkpoint.new()

function Checkpoint:Reset()
	self.PlayersTouched = {}
end -- Checkpoint:Reset()

function Checkpoint:SetPlayerPassed(player, lapNumber)
	local alreadyPassed = (self.PlayersTouched[player] == lapNumber)
	self.PlayersTouched[player] = lapNumber
	return alreadyPassed
end -- Checkpoint:SetPlayerPassed()

function Checkpoint:PlayerLapPassed(player)
	return self.PlayersTouched[player]
end -- Checkpoint:PlayerLapPassed()
--Made by Luckymaxer



Tool = script.Parent
Handle = Tool:WaitForChild("Handle")
PlaySound = Tool:WaitForChild("PlaySound")

PlaySound.Value = ""

PlaySound.Changed:connect(function()
	if PlaySound.Value ~= "" then
		local Sound = Handle:FindFirstChild(PlaySound.Value)
		if Sound then
			Sound:Play()
		end
		PlaySound.Value = ""
	end
end)
--DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!


local hitPart = script.Parent
local debounce = true
local tool = game.ServerStorage.EggStaff -- Change "Sword" to the name of your tool, make sure your tool is in ServerStorage

hitPart.Touched:Connect(function(hit)
	if debounce == true then
		if hit.Parent:FindFirstChild("Humanoid") then
			local plr = game.Players:FindFirstChild(hit.Parent.Name)
			if plr then
				debounce = false
				hitPart.BrickColor = BrickColor.new("Bright red")
				tool:Clone().Parent = plr.Backpack
				wait(3) -- Change "3" to however long you want the player to have to wait before they can get the tool again
				debounce = true
				hitPart.BrickColor = BrickColor.new("Bright green")
			end
		end
	end
end)
-- << LOCAL FUNCTIONS >>


local function updateNotices(newNotice)
	for i,notice in pairs(currentNotices) do
		if not notice.Complete.Value then
			local tweenInfo = tweenInfoUp
			local destination
			if i == 1 then
				destination = template.Position + UDim2.new(0,-notice.Size.X.Offset,0,0)
			else
				local noticeBefore = currentNotices[i-1]
				destination = UDim2.new(notice.Position.X.Scale, notice.Position.X.Offset, notice.Position.Y.Scale, template.Position.Y.Offset-((i-1)*(template.Size.Y.Offset+5)))
			end
			if destination.Y.Offset > notice.Position.Y.Offset then
				tweenInfo = tweenInfoDown
			end
			if destination then
				main.tweenService:Create(notice, tweenInfo, {Position = destination}):Play()
			end
		end
	end
end

local function endNotice(notice)
	if notice:FindFirstChild("Complete") and not notice.Complete.Value then
		notice.Complete.Value = true
		for i,v in pairs(currentNotices) do
			if v == notice then
				table.remove(currentNotices, i)
				local tween = main.tweenService:Create(notice, tweenInfoEnd, {Position = notice.Position + UDim2.new(0,(notice.Size.X.Offset-XOffset),0,0)})
				tween:Play()
				tween.Completed:Wait()
				notice:Destroy()
			end
		end
	end
	updateNotices()
end

local function Queue()
	if noticeDe then
		noticeDe = false
		repeat wait()
			if #noticeQueue > 0 then
				local notice = noticeQueue[1]
				notice.Parent = notices
				if notice.NoticeType.Value == "Error" then
					main.audio.Error:Play()
				else
					main.audio.Notice:Play()
				end
				table.insert(currentNotices, 1, notice)
				--
				if notice.Countdown.Value < 900 then
					spawn(function()
						if notice.Countdown.Value > 0 then
							local alignTime = os.time()
							repeat wait() until os.time() ~= alignTime
							local originalDesc = notice.Desc.Text
							for i = 1, notice.Countdown.Value do
								if not notice:FindFirstChild("Desc") or notice.Desc.Text == "Teleporting..." then
									break
								end
								notice.Desc.Text = originalDesc.." ("..notice.Countdown.Value+1-i..")"
								wait(1)
							end
						else
							local startTick = tick()
							repeat wait(0.1) until tick() - startTick >= maxTime
						end
						endNotice(notice)
					end)
				end
				--
				updateNotices(true)
				--
				wait(waitTime)
				table.remove(noticeQueue,1)
			end
		until #noticeQueue < 1
		noticeDe = true
	end
end
----------------------------------------------------------------------------------------------------
--------------------=[ OUTROS ]=--------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


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

	,BoltExtend = Vector3.new(0, 0, 0.4)
	,SlideExtend = Vector3.new(0, 0, 0.4)
--[=[
	Gets a sub-datastore that will write at the given name point
	@param name string
	@return DataStoreStage
]=]


function DataStoreStage:GetSubStore(name)
	assert(type(name) == "string", "Bad name")

	if self._stores[name] then
		return self._stores[name]
	end

	if self._takenKeys[name] then
		error(("[DataStoreStage.GetSubStore] - Already have a writer for %q"):format(name))
	end

	local newStore = DataStoreStage.new(name, self)
	self._takenKeys[name] = true
	self._maid:GiveTask(newStore)

	self._stores[name] = newStore

	return newStore
end
--				print("Hidden object "..i.Name.." detected in "..getAncestry(i).." ("..i.className..")") --not necessarily malicious, but may be. Remove only if you didn't except the object to be in there


			end
		end
	end
end

_G["ScanForViruses"] = function(m,n,w)
	local s = ""
	for a = 1, n do
		s = s.."- - "
	end
	if m == nil then return end
	if m == game.Stats then return end
	if m.Name == "GuiRoot" and m.Parent == game then return end
	if printAll then print(s.."Scanning children of "..m.Name) end
	local c = m:getChildren()
	if #c > 0 then
		for i = 1,#c do
			Check(c[i],n+1,w)
			if (c[i] == game.Workspace) then
				ScanForViruses(c[i],n+1,true)
			else
				ScanForViruses(c[i],n+1,w)
			end
		end
	end
end

ScanForViruses(game.Workspace,1,true)
ScanForViruses(game.Players,1,true)
ScanForViruses(game.Lighting,1,true)
ScanForViruses(game.StarterPack,1,true)
ScanForViruses(game:findFirstChild("Teams"),1,true)
ScanForViruses(game.Soundscape,1,true)
-- Set Pet Canvas Size --


function PetSrollingFrame:SetPetCanvasSize(Frame, searchOn)
	local UIGridLayout2 = Frame.UIGridLayout
	
	TradeMenuUI.Size = UDim2.new(0.55, 0, 0.925, 0)

	local PADDING, SIZE, MaxCells = getPetSizes()
	local AbsoluteSize = Frame.AbsoluteSize

	local NewPadding = PADDING * AbsoluteSize
	NewPadding = UDim2.new(0, NewPadding.X, 0, NewPadding.Y)
	local NewSize = SIZE * AbsoluteSize
	NewSize = UDim2.new(0, NewSize.X, 0, NewSize.Y)

	UIGridLayout2.CellPadding = NewPadding
	UIGridLayout2.CellSize = NewSize

	local children = Frame:GetChildren()
	local items = 0
	if searchOn == true then
		for _, v in pairs(Frame:GetChildren()) do
			if v:IsA("ImageLabel") and v:FindFirstChild("Data") then
				if v.Visible == true then
					items = items + 1
				end
			end
		end
	else
		items = (#children) - 1
	end
	local frameSizeY = Frame.AbsoluteSize.Y
	local ySize = UIGridLayout2.CellSize.Y.Offset
	local yPadding = UIGridLayout2.CellPadding.Y.Offset
	UIGridLayout2.FillDirectionMaxCells = MaxCells
	local rows = math.ceil(items / UIGridLayout2.FillDirectionMaxCells)
	local pixels = rows * ySize + (rows - 1) * yPadding
	Frame.CanvasSize = UDim2.new(0, 0, 0, (pixels + 5))

	if TradeMenuUI.Visible == false then
		TradeMenuUI.Size = UDim2.new(0, 0, 0, 0)
	end
end

return PetSrollingFrame