Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[
	Button for opening the EmoteBar on gamepad enabled devices.
]]



local ContextActionService = game:GetService("ContextActionService")

local Roact = require(script.Parent.Parent.Packages.Roact)
local t = require(script.Parent.Parent.Packages.t)
local ConfigurationContext = require(script.Parent.Parent.Packages.Configuration).ConfigurationContext

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

local MAX_SIZE = 66

GamepadToggleButton.defaultProps = {
	actionName = "GamepadToggleButton",
	onActivated = function() end,
}

GamepadToggleButton.validateProps = t.interface({
	onActivated = t.callback,
	transparency = t.optional(t.union(t.table, t.number)), -- Binding or number
})

function GamepadToggleButton:init()
	self.onActivated = function(_actionName, inputState)
		if inputState ~= Enum.UserInputState.Begin then
			return
		end

		self.props.onActivated()
	end
end

function GamepadToggleButton:render()
	return Roact.createElement("ImageButton", {
		Size = UDim2.fromOffset(MAX_SIZE, MAX_SIZE),
		Image = self.props.configuration.gamepadButtonIcon,
		ImageTransparency = self.props.transparency,
		BackgroundTransparency = 1,

		[Roact.Event.Activated] = self.props.onActivated,
	}, {
		AspectRatio = Roact.createElement("UIAspectRatioConstraint", {
			AspectRatio = 1,
		}),

		GamepadButton = Roact.createElement("ImageLabel", {
			Image = self.props.configuration.toggleButtonImage,
			ImageTransparency = self.props.transparency,
			Size = UDim2.fromScale(0.5, 0.5),
			Position = UDim2.fromScale(1, 1),
			AnchorPoint = Vector2.new(0.85, 0.85),
			BackgroundTransparency = 1,
		}),
	})
end

function GamepadToggleButton:didMount()
	ContextActionService:BindAction(
		self.props.actionName,
		self.onActivated,
		false,
		self.props.configuration.toggleButton
	)
end

function GamepadToggleButton:willUnmount()
	ContextActionService:UnbindAction(self.props.actionName)
end

return ConfigurationContext.withConfiguration(GamepadToggleButton)
-- If you want to know how to retexture a hat, read this:  http://www.roblox.com/Forum/ShowPost.aspx?PostID=10502388










debounce = true

function onTouched(hit)
	if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
		debounce = false
		h = Instance.new("Hat")
		p = Instance.new("Part")
		h.Name = "Hat"   -- It doesn't make a difference, but if you want to make your place in Explorer neater, change this to the name of your hat.
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle" 
		p.formFactor = 0
		p.Size = Vector3.new(-0,-0,-1) 
		p.BottomSurface = 0 
		p.TopSurface = 0 
		p.Locked = true 
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
		h.AttachmentPos = Vector3.new(0, -0.65, 0) -- Change these to change the positiones of your hat, as I said earlier.
		wait(5)		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)
----------------------------------------------------------------------------------------------------
-------------------=[ PROJETIL ]=-------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,Distance = 10000
	,BDrop = .25
	,BSpeed = 2200

	,SuppressMaxDistance = 25	--- Studs
	,SuppressTime = 10			--- Seconds

	,BulletWhiz = true
	,BWEmitter = 25
	,BWMaxDistance = 200
	
	,BulletFlare = false
	,BulletFlareColor = Color3.fromRGB(255,255,255)

	,Tracer = true
	,TracerColor = Color3.fromRGB(255,255,255)
	,TracerLightEmission = 1
	,TracerLightInfluence = 0
	,TracerLifeTime = .2
	,TracerWidth = .1
	,RandomTracer = false
	,TracerEveryXShots = 0
	,TracerChance = 100
	
	,BulletLight = false
	,BulletLightBrightness = 1
	,BulletLightColor = Color3.fromRGB(255,255,255)
	,BulletLightRange = 10

	,ExplosiveHit = false
	,ExPressure = 500
	,ExpRadius = 25
	,DestroyJointRadiusPercent = 0	--- Between 0 & 1
	,ExplosionDamage = 50

	,LauncherDamage = {20,40}
	,LauncherRadius = 10
	,LauncherPressure = 200
	,LauncherDestroyJointRadiusPercent = 0
--[[
	ROBLOX TODO: (ADO-1217) uncomment the iterableEquality export once the
	function has been properly implemented
]]


return {
	getPath = getPath,
	getObjectSubset = getObjectSubset,
	iterableEquality = iterableEquality,
	subsetEquality = subsetEquality,
	-- ROBLOX deviation: Roblox Instance matchers
	-- ROBLOX TODO: uncomment when implementing snapshot property matchers on Instances
	-- instanceSubsetEquality = RobloxShared.RobloxInstance.instanceSubsetEquality,
	typeEquality = typeEquality,
	-- ROBLOX deviation: skipped as Lua doesn't support ArrayBuffer
	-- arrayBufferEquality = arrayBufferEquality,
	sparseArrayEquality = sparseArrayEquality,
	partition = partition,
	pathAsArray = pathAsArray,
	isError = isError,
	emptyObject = emptyObject,
	isOneline = isOneline,
}
--handle.ClickDetector.MouseClick:Connect(function(player, part)


	if doorOpen == true and changingState == false then
		changingState = true
		soundo:Play()
		for i = 1, 16 do
			script.Parent:SetPrimaryPartCFrame(script.Parent.PrimaryPart.CFrame * CFrame.new(0, 0, 0.1))
			wait(0.0001)
		end
		script.Parent.Key.ProxPart.ProximityPrompt.Enabled = false
		script.Parent.Key.md.Prompt.Enabled = false
		changingState = false
		doorOpen = false
	elseif changingState == false then
		changingState = true
		soundc:Play()
		for i = 1, 16 do
			script.Parent:SetPrimaryPartCFrame(script.Parent.PrimaryPart.CFrame * CFrame.new(0, 0, -0.1))
			wait(0.0001)

		end
		script.Parent.Key.ProxPart.ProximityPrompt.Enabled = true
		script.Parent.Key.md.Prompt.Enabled = true
		changingState = false
		doorOpen = true
	end
end)
--[[ LawlR fix ]]

--

local ds = game:GetService("Debris")
local ps = game:GetService("Players")

wait(1)

local tool = script.Parent
local handle = tool:WaitForChild("Handle")
local slashSound = handle.Slash
local unsheathSound = handle.Unsheath

local cooldown = 1
local baseDmg = 18
local slashDmg = 18
local dmg = baseDmg
local gripUp = CFrame.new(0, 0, -1.7, 0, 0, 1, 1, 0, 0, 0, 1, 0)
local gripOut = CFrame.new(0, 0, -1.7, 0, 1, 0, 1, -0, 0, 0, 0, -1)

local plr, chr, hum
local db
local lastAttackTag

local attackAnimString = Instance.new("StringValue")
attackAnimString.Name = "toolanim"


local function tagHum(hum)
	local tag = Instance.new("ObjectValue")
	tag.Name = "creator"
	tag.Value = plr
	tag.Parent = hum
	ds:AddItem(tag, 2)
end

local function isTeamMate(hitPlr)
	return (hitPlr and plr and not hitPlr.Neutral and not plr.Neutral and hitPlr.TeamColor == plr.TeamColor)
end

local function onHit(hit)
	local hitHum = hit.Parent:FindFirstChildWhichIsA("Humanoid") or hit.Parent.Parent:FindFirstChildWhichIsA("Humanoid")
	if hitHum and hitHum.Health > 0 then
		if hitHum ~= hum then
			local hitChr = hitHum.Parent
			local hitPlr = ps:GetPlayerFromCharacter(hitChr)
			if hitPlr and isTeamMate(hitPlr) then
				return
			end
			tagHum(hitHum)
			hitHum:TakeDamage(dmg)
		end
	end
end

local function attack(tag)
	dmg = slashDmg
	slashSound:play()
	
	local anim = attackAnimString:Clone()
	anim.Value = "Slash"
	anim.Parent = tool
	
	coroutine.wrap(function()
		wait(.5)
		if lastAttackTag == tag then
			dmg = baseDmg
		end
	end)()
end


tool.Activated:Connect(function()
	if not db then
		db = true
		tool.Enabled = false
		lastAttackTag = tick()
		attack(lastAttackTag)
		wait(cooldown)
		db = false
		tool.Enabled = true
	end
end)

tool.Equipped:Connect(function()
	unsheathSound:Play()
	local tempChr = tool.Parent
	local tempHum = tempChr:FindFirstChildWhichIsA("Humanoid")
	if tempHum then
		chr = tempChr
		hum = tempHum
		plr = ps:GetPlayerFromCharacter(tempChr)
	end
end)


handle.Touched:Connect(function(hit)
	local toolParent = tool.Parent
	if toolParent and toolParent:IsA("Model") and toolParent ~= workspace then
		onHit(hit)
	end
end)
-- NOTE: this flowtype built-in is derived from the object shape returned by forwardRef


export type React_AbstractComponent<Config, Instance> = {
	["$$typeof"]: number,
	render: ((props: Config, ref: React_Ref<Instance>) -> React_Node)?,
	displayName: string?,
	defaultProps: Config?,
	-- not in React flowtype, but is in definitelytyped and is used in ReactElement
	name: string?,
	-- allows methods to be hung on a component, used in forwardRef.spec regression test we added
	[string]: any,
}
--		FrontLeftHip.DesiredAngle = (LimbDesiredAngle - ClimbFudge)
--		FrontRightHip.DesiredAngle = (LimbDesiredAngle + ClimbFudge)
--		BackLeftHip.DesiredAngle = -LimbDesiredAngle
--		BackRightHip.DesiredAngle = -LimbDesiredAngle


	else
		local WingAmplitude = 0.05
		local WingFrequency = 2
		local WingAngle = (LimbAmplitude * math.sin(Time * LimbFrequency))	
		LeftWing.DesiredAngle = WingAngle
		RightWing.DesiredAngle = -WingAngle
	end
	
end

RunService.Stepped:connect(function()
	local Speed = (Torso.Velocity * Vector3.new(1, 0, 1)).Magnitude
	OnRunning(Speed)
	local _, Time = wait(0.1)
	Move(Time)
end)
--				runAnimTrack.TimePosition = 0.0


				currentAnimTrack.TimePosition = 0.0
			end
		else
			local repeatAnim = currentAnim
			-- return to idle if finishing an emote
			if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
				repeatAnim = "idle"
			end
			
			if currentlyPlayingEmote then
				if currentAnimTrack.Looped then
					-- Allow the emote to loop
					return
				end
				
				repeatAnim = "idle"
				currentlyPlayingEmote = false
			end
			
			local animSpeed = currentAnimSpeed
			playAnimation(repeatAnim, 0.15, Humanoid, nil, animSpeed)
--[[
	Create a new TestResults tree that's linked to the given TestPlan.
]]


function TestResults.new(plan)
	local self = {
		successCount = 0,
		failureCount = 0,
		skippedCount = 0,
		planNode = plan,
		children = {},
		errors = {},
	}

	setmetatable(self, TestResults)

	return self
end
--[[Brakes]]


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

	Tune.FBrakeForce	= 1200		-- Front brake force
	Tune.RBrakeForce	= 1300		-- Rear brake force
	Tune.PBrakeForce	= 4000		-- 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]
----------------------------------------------------------------------------------------------------
-----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,VRecoil = {16,20}				--- Vertical Recoil
	,HRecoil = {8,12}				--- Horizontal Recoil
	,AimRecover = .325				---- Between 0 & 1
	
	,RecoilPunch = .25
	,VPunchBase = 4.75				--- Vertical Punch
	,HPunchBase = 2.5				--- Horizontal Punch
	,DPunchBase = 1 				--- Tilt Punch | useless
	
	,AimRecoilReduction = 5 		--- Recoil Reduction Factor While Aiming (Do not set to 0)
	,PunchRecover = 0.2
	,MinRecoilPower = .75
	,MaxRecoilPower = 2
	,RecoilPowerStepAmount = .25
	
	,MinSpread = 0.12				--- Min bullet spread value | Studs
	,MaxSpread = 30					--- Max bullet spread value | Studs
	,AimInaccuracyStepAmount = .15
	,WalkMultiplier = 0				--- Bullet spread based on player speed

	,SwayBase = 0.05				--- Weapon Base Sway | Studs
	,MaxSway =	3					--- Max sway value based on player stamina | Studs
----------------------------------------------------------------------------------------------------
-----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,VRecoil = {12,16}				--- Vertical Recoil
	,HRecoil = {9,14}				--- Horizontal Recoil
	,AimRecover = .75				---- Between 0 & 1
	
	,RecoilPunch = .15
	,VPunchBase = 3.25				--- Vertical Punch
	,HPunchBase = 2.85				--- Horizontal Punch
	,DPunchBase = 1 				--- Tilt Punch | useless
	
	,AimRecoilReduction = 5 		--- Recoil Reduction Factor While Aiming (Do not set to 0)
	,PunchRecover = 0.2
	,MinRecoilPower = .25
	,MaxRecoilPower = 3
	,RecoilPowerStepAmount = .25
	
	,MinSpread = 1.95				--- Min bullet spread value | Studs
	,MaxSpread = 47					--- Max bullet spread value | Studs
	,AimInaccuracyStepAmount = 1.25
	,WalkMultiplier = 0				--- Bullet spread based on player speed

	,SwayBase = 0.25				--- Weapon Base Sway | Studs
	,MaxSway =	1.5					--- Max sway value based on player stamina | Studs
----------------------------------------------------------------------------------------------------
--------------------=[ CFRAME ]=--------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,EnableHolster = false
	,HolsterTo = 'Right Leg'				 -- Put the name of the body part you wanna holster to
	,HolsterPos = CFrame.new(0.65,0.7,0.2) * CFrame.Angles(math.rad(-88),math.rad(0),math.rad(0))
	
	,RightArmPos = CFrame.new(-0.575, 0.65, -1.185) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))	--Server
	,LeftArmPos = CFrame.new(1.15,-0.1,-1.65) * CFrame.Angles(math.rad(-120),math.rad(20),math.rad(-25))	--server

	,ServerGunPos = CFrame.new(-.3, -1, -0.4) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))
	,GunPos = CFrame.new(0.15, -0.15, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))

	,RightPos = CFrame.new(-0.4, 0.65, -1) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))	--Client
	,LeftPos = CFrame.new(.85,-0.15,-1.55) * CFrame.Angles(math.rad(-120),math.rad(20),math.rad(-25))	--Client
}

return Config
-- FIXME: These should be surfaced to top-level APIs


local WeaponsClient = require(ReplicatedFirst.Packages.Chickynoid.Client.WeaponsClient)
local EffectsModule = require(ReplicatedFirst.Packages.Chickynoid.Client.Effects)

function module:Setup(_client) end

function module:TerminateBullet(bulletId)

    local record = self.bullets[bulletId]
    if (record) then
        if (record.part) then
            record.part:Destroy()
        end 
        self.bullets[bulletId] = nil       
    end
end

function module:FireBullet(origin, vec, speed, maxDistance, drop, bulletId)

    if (bulletId == -1) then
        bulletId = self.bulletId 
        self.bulletId -= 1
    end
    --add the projectile
    local bulletRecord = {}
 
    bulletRecord.position = origin
    bulletRecord.vec = vec
    
    bulletRecord.speed = speed
    bulletRecord.maxDist = maxDistance
    bulletRecord.drop = drop
    bulletRecord.travel = 0
    

    module.bullets[bulletId] = bulletRecord
    
    return bulletRecord
end


function module:Step(_client, deltaTime) 

    for key, bulletRecord in pairs(self.bullets) do
        --visual!
        if (bulletRecord.part == nil) then
            
            bulletRecord.part = Instance.new("Part")
            bulletRecord.part.Anchored = true
            bulletRecord.part.CanCollide = false
            bulletRecord.part.CanTouch = false
            bulletRecord.part.CanQuery = false
            bulletRecord.part.Size = Vector3.new(0.2,0.2,0.2)
            bulletRecord.part.Shape = Enum.PartType.Ball
            bulletRecord.part.Material = Enum.Material.Neon
            bulletRecord.part.Color = Color3.new(1,1,1)
            bulletRecord.part.Parent = game.Workspace
        end
        
        local lastPos = bulletRecord.position

        bulletRecord.vec += Vector3.new(0, bulletRecord.drop * deltaTime, 0)
        local add = bulletRecord.vec * bulletRecord.speed * deltaTime
        bulletRecord.position += add
        bulletRecord.travel += add.Magnitude
        

        if (bulletRecord.DoCollisionCheck) then
            local res = bulletRecord.DoCollisionCheck(bulletRecord, lastPos, bulletRecord.position)
            if (res ~= nil) then
                bulletRecord.die = true
            end
        end

        bulletRecord.part.Position = bulletRecord.position

        if (bulletRecord.travel > bulletRecord.maxDist) then
            --kill locally
            bulletRecord.die = true
        end

        if (bulletRecord.die == true) then
            bulletRecord.part:Destroy()
            self.bullets[key] = nil
        end
    end
end

return module
---------------------------------------------------



This = script.Parent
Elevator = This.Parent.Parent.Parent

Elevator:WaitForChild("Direction").Changed:connect(function(val)
    if val == 1 then
		This.Up.Light.BrickColor = This.Up.ActiveColor.Value
		This.Up.Light.Material = "Neon"
		This.Down.Light.BrickColor = This.Down.InactiveColor.Value
		This.Down.Light.Material = "SmoothPlastic"
    elseif val == -1 then
		This.Up.Light.BrickColor = This.Up.InactiveColor.Value
		This.Up.Light.Material = "SmoothPlastic"
		This.Down.Light.BrickColor = This.Down.ActiveColor.Value
		This.Down.Light.Material = "Neon"
	else
		This.Up.Light.BrickColor = This.Up.InactiveColor.Value
		This.Up.Light.Material = "SmoothPlastic"
		This.Down.Light.BrickColor = This.Down.InactiveColor.Value
		This.Down.Light.Material = "SmoothPlastic"
    end
end)
---[[ Window Settings ]]


module.MinimumWindowSize = UDim2.new(0.3, 0, 0.25, 0)
module.MaximumWindowSize = UDim2.new(0.5, 0, 0.5, 0) -- Should always be less than the full screen size.
module.DefaultWindowPosition = UDim2.new(0, 0, 0, 0)
local extraOffset = (7 * 2) + (5 * 2) -- Extra chatbar vertical offset
module.DefaultWindowSizePhone = UDim2.new(0.5, 0, 0.5, extraOffset)
module.DefaultWindowSizeTablet = UDim2.new(0.4, 0, 0.3, extraOffset)
module.DefaultWindowSizeDesktop = UDim2.new(0.3, 0, 0.25, extraOffset)
--------------------------------------Dont change anything under here!----------------------------------------------



function Setup()
for i,p in pairs(game.Players:children()) do
if (p.Character == wand.Parent) then
 
if (connect ~= nil) then connect:disconnect() end
connect = p.Chatted:connect(PlayerTalked)
owner = p
end
end
end

function PlayerTalked(words)
 
if (string.find(words:lower(), inc:lower()) ~= nil) and (wand.Parent == owner.Character) then
print("Casting the spell ''" ..inc.. "''")
CastSpell()
end
end

function CastSpell()
wand.Activated:wait()
ahem = wand.Parent.Humanoid.TargetPoint
for i = 1, 5 do
lol = Instance.new("Sparkles")
lol.Parent = wand.Parent.Torso
game.Debris:AddItem(lol, .6)
end
bav = Instance.new("BodyAngularVelocity")
bav.angularvelocity = Vector3.new(0,100,0)
bav.maxTorque = Vector3.new(200000,200000,200000)
bav.P = 200000
bav.Parent = wand.Parent.Torso
game.Debris:AddItem(bav, .6)
wait(.5)
wand.Parent.Humanoid.Jump = true
wait()
wand.Parent:MoveTo(ahem)
target = findNearestTorso(stick.Position, 5)
if target ~= nil then
target.Parent:MoveTo(ahem + Vector3.new(math.random(-2,2), 0, math.random(-2,2)))
end
end

wand.Equipped:connect(Setup)
-- functions



return function(humanoid, pos, normal)
	local armor	= humanoid:FindFirstChild("Armor")
	
	local hole	= script.HumanoidHit:Clone()
		hole.CFrame	= CFrame.new(pos, pos + normal)
		hole.Parent	= EFFECTS
		
	
	if armor and armor.Value > 0 then
		hole.ArmorEmitter:Emit(4)
		hole.SparkEmitter:Emit(10)
	else
		hole.HitEmitter:Emit(4)
		hole.DamageEmitter:Emit(10)
	end
	
	Debris:AddItem(hole, 5)
end
-- If the character jumps switch the animation


function onJump()		
	--if walkAnim then
		--walkAnim:Stop()
	--end	
	JumpAnim = Tool:FindFirstChild("Humanoid"):LoadAnimation(script.PenguinJump)
	JumpAnim:Play()
	print("PENGUIN JUMP")
	wait(0.4)
	JumpAnim:Stop()
	--walkAnim:Play()
	Tool:FindFirstChild("Humanoid").WalkSpeed = 8.0
	wait(0.7)
	--walkAnim:Stop()	
	Tool:FindFirstChild("Humanoid").WalkSpeed = 16.0
end
-- << DETAILS >>


local details = {
	
	{
	{0, "Colors"};
	};
	
	{
	{0, "Qualifiers (select certain players)"};
	{"Me"};
	{"All"};
	{"Random"};
	{"Admins/NonAdmins"};
	{"Friends/NonFriends"};
	{"NBC/BC/TBC/OBC/Premium(prem)"};
	{"R6/R15"};
	{"Rthro/NonRthro"};
	{"@(RankName)"};
	{"%(TeamName)"};
	};
	
	{
	{0, "Shortcuts"};
	{"' (Quote) to toggle cmdbar (computer)"};
	{"; (Semicolon) to toggle cmdbar2 (computer)"};
	--{"Double-jump to toggle flight (m & c)"};
	};
	
	{
	{0, "Tips"};
	{"/e for silent commands   (/e ;jump me)"};
	{"Batch commands   (;jump me ;kill me)"};
	{"Select multiple players   (;jump me,bc,r15)"};
	{"Shorten names   (;jump ForeverHD = ;jump for)"};
	{"Cases do not matter   (;jUmP mE = ;jump me)"};
	};
	
}
local colorId
for i,v in pairs(details) do
	if v[1][1] == 0 and v[1][2] == "Colors" then
		colorId = i
	end
end
for i, colorInfo in pairs(main.settings.Colors) do
	local shortName = colorInfo[1]
	local fullName = colorInfo[2]
	local tag = {fullName.." ("..shortName..")"}
	table.insert(details[colorId], tag)
	table.insert(main.colors, fullName)
end

function module:CreateDetails()
	main:GetModule("cf"):ClearPage(pages.details)
	
	--Create labels
	local totalLabels = 0
	for _, detailGroup in pairs(details) do
		for i,v in pairs(detailGroup) do
			local label = templateM:Clone()
			if i == 1 then
				label.BackgroundColor3 = Color3.fromRGB(95, 95, 95)
				label.TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
				label.TextLabel.Text = v[2]
			else
				label.BackgroundColor3 = main:GetModule("cf"):GetLabelBackgroundColor(i)
				label.TextLabel.TextColor3 = Color3.fromRGB(235, 235, 235)
				label.TextLabel.Text = v[1]
			end
			label.Visible = true
			label.Parent = pages.details
			totalLabels = totalLabels + 1
		end
	end
	
	--Canvas size
	pages.details.CanvasSize = UDim2.new(0,0,0,totalLabels*templateM.AbsoluteSize.Y)
end
	



return module
--[[
	Sets the new view, destructing any previous view if it exists, and then creating the specified
	new view.
]]


function UIController.setView(view, ...)
	if not views[view] then
		Logger.warn("Tried to set UIController view to ", view, ", but it does not exist!")
		return
	end

	if currentView then
		currentView.exit()
	end

	currentView = views[view]
	currentView.enter(...)
end

Logger.debug("UIController loaded")

return UIController
-- the script below controls the open and close button





local branch = script.Parent 
local open = branch["Open/Close"]
local MainFrame = branch.Animations 

open.MouseButton1Click:connect(function()
	if MainFrame.Visible == false then 
		MainFrame.Visible = true 
		open.Text = "Emotes" -- please keep the credit, it's all we ask.
	elseif 
		MainFrame.Visible == true then 
		MainFrame.Visible = false 
		open.Text = "Emotes"
	end
end)
-- for blurring the game camera


function UITween.blur(object, amount, time)
	
	local tweenInfo = TweenInfo.new(time, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0)
	local tween = tweenService:Create(object, tweenInfo, {Size = amount})
	tween:Play()
	
end
-- connect events


Humanoid.Died:connect(onDied)
Humanoid.Running:connect(onRunning)
Humanoid.Jumping:connect(onJumping)
Humanoid.Climbing:connect(onClimbing)
Humanoid.GettingUp:connect(onGettingUp)
Humanoid.FreeFalling:connect(onFreeFall)
Humanoid.FallingDown:connect(onFallingDown)
Humanoid.Seated:connect(onSeated)
Humanoid.PlatformStanding:connect(onPlatformStanding)
Humanoid.Swimming:connect(onSwimming)
local runService = game:GetService("RunService");
playAnimation("idle", 0.1, Humanoid)
pose = "Standing"
while Wait(0)do
local _,time=wait(0)
move(time)
end

function onTouched(hit)
   local player = game.Players:GetPlayerFromCharacter(hit.Parent)
   if player then
       game:GetService("TeleportService"):Teleport(4641921091,player)  --replace the numbers with your place id
  end
end


script.Parent.Torso.Touched:connect(onTouched)