Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

This module is heavily used across the Obby Wiki

This module automatically collects and sorts the majority of pages on this wiki, a breaking change could damage the functionality of the wiki largely. Be careful when making edits.

This module is a part of the central shared Obby Wiki code repository

This module's source code may not be available here in full. It may be minified and automatically uploaded, meaning any changes will be difficult and potentially overwritten later. To make edits, see our central code repository available on GitHub.

Please refer to any documentation for the Player Infobox template at: https://obbywiki.com/wiki/Template:PlayerInfobox.

This infobox uses InfoboxNeue, which is likely imported, view more information at: https://obbywiki.com/wiki/Module:InfoboxNeue.


--[=[
    DO NOT EDIT THIS FILE MANUALLY.

    This file was automatically minified and transpiled from Luau by DarkLua.
    The original source code was written in Luau, the below code is transpiled and compatible with Lua 5.1.5 and contains the necessary polyfills.
    
    Uploaded automatically via WikiWire. View the original source at our central code repository: https://github.com/obbywiki/modules
    ANY EDITS WILL LIKELY BE OVERWRITTEN. A copyright notice should be supplied at the bottom of this page.
]=]--



table.find=table.find or function(t,v,i) for j=i or 1,#t do if t[j]==v then return j end end end;string.split=string.split or function(s,sep) return mw.text.split(s,sep,true) end;
local PlayerInfobox={}local months_full={'January','February','March','April','May','June','July','August','September','October','November','December'}local function month_by_index(month)return months_full[month]or'N/A'end local function get_comma_val(num)local formatted=num while true do local k formatted,k=string.gsub(formatted,'^(-?%d+)(%d%d%d)','%1,%2')if(k==0)then break end end return formatted end local smm={twitter={icon='External Twitter Coloured Small.webp',url='https://twitter.com/',display='Twitter'},bsky={icon='External BlueSky White Small.png',url='https://bsky.app/profile/',display='BlueSky'},youtube={icon='External YouTube White Small.png',url='https://youtube.com/@',display='YouTube'},discord={icon='External Discord White Small.png',url='https://discord.com/invite/',display='Discord'},guilded={icon='External Guilded White Small.png',url='https://guilded.gg/',display='Guilded'},roblox={icon='External Roblox White Small.png',url='https://roblox.com/users/profile?username=',display='Roblox'},website={icon='GoogleMaterialIcons-Globe.svg',url='https://',display='Website'},wiki={icon='External MediaWiki White Small.png',url='https://',display='MediaWiki'}}local cargo=mw.ext.cargo local player_schema={['_table']='Players',display_name='String',username='String',is_verified='Boolean',user_id='String',total_obbies='Integer',total_visits='Float',most_popular_obby='String',most_recent_obby='String',image='String',headshot='String',activity='String',year='Integer',month='Integer',day='Integer'}function PlayerInfobox.declare(frame)return cargo.declare(player_schema)end function PlayerInfobox.store(frame,data)local store_args={'_table='..player_schema._table}for k,v in pairs(data)do if v~=nil and v~=''then table.insert(store_args,k..'='..tostring(v))end end return frame:callParserFunction{name='#cargo_store',args=store_args}end function PlayerInfobox.main(frame)local InfoboxNeue=require('Module:InfoboxNeue')local test=InfoboxNeue:new({placeholderImage='Standard11placeholder.webp'})local args=require('Module:Arguments').getArgs(frame)local player_user_name=mw.title.getCurrentTitle().text local player_display_name local player_user_id=args.user_id or args.id or 1 local player_total_obbies=args.obbies or args.games or 0 local player_user_name_unformatted=player_user_name player_user_name_unformatted=string.gsub(player_user_name_unformatted,'@','')player_user_name_unformatted=string.gsub(player_user_name_unformatted,'~','')local player_roles=args.roles or args.known_for or'player'player_roles=string.lower(player_roles)local roles={}for _,v in pairs(string.split(player_roles,','))do if table.find({'player','developer','content-creator'},v)then table.insert(roles,v)else if v=='influencer'then table.insert(roles,'content-creator')end end end local player_creation_year,player_creation_month,player_creation_day,player_creation_month_num local player_is_verified=false local player_total_visits=args.visits or args.total_visits or 0 local player_total_likes=0 local player_total_dislikes=0 local player_total_favorites=0 local thumb=args.image or args.thumbnail or args.thumb local player_user_name_raw local player_display_name_raw local player_is_terminated=false if player_user_id then local user_res=mw.ext.externalData.getExternalData{url='https://users.roblox.com/v1/users/'..tostring(player_user_id),format='json'}local user_json=user_res and user_res.__json local row=user_json mw.log(user_json,row)if row and row.name then player_user_name_raw='@'..row.name player_display_name=row.displayName or row.name player_display_name_raw=row.displayName or row.name player_is_verified=row.hasVerifiedBadge or false player_user_name=string.format('[https://www.roblox.com/users/%s/profile %s%s]',player_user_id,player_user_name_raw,(row.hasVerifiedBadge and[=[  [[File:Roblox_Verification_Badge.svg|12px|alt=Verified|link=]]]=])or'')player_display_name=string.format('[https://www.roblox.com/users/%s/profile %s%s]',player_user_id,player_display_name,(row.hasVerifiedBadge and[=[  [[File:Roblox_Verification_Badge.svg|12px|alt=Verified|link=]]]=])or'')end if row and row.isBanned and row.isBanned==true then player_is_terminated=true end if row and row.created then local year,month,day=row.created:match('^([%d]+)-([%d]+)-([%d]+)T')player_creation_year=year player_creation_month=month_by_index(tonumber(month))player_creation_month_num=tonumber(month)player_creation_day=day end end local most_popular_obby={name='',visits=0,year='',month='',image=''}local most_popular_obby_contributed={name='',visits=0,year='',month='',image=''}local most_recent_obby={name='',visits=0,year='',month='',image=''}local most_popular_group={name='',creator='',members=0,year='',month='',image=''}local player_contributed_obbies=0 local player_contributed_visits=0 local player_contributed_likes=0 local player_contributed_dislikes=0 local player_contributed_favorites=0 local player_owned_obbies=0 local player_owned_visits=0 local player_owned_likes=0 local player_owned_dislikes=0 local player_owned_favorites=0 if mw.ext.cargo and mw.ext.cargo.query then local target_user=player_user_name_raw or('@'..player_user_name_unformatted)local data=mw.ext.cargo.query('Obbies',[[COUNT(*)=count, SUM(visits)=total_visits, SUM(likes)=total_likes, SUM(dislikes)=total_dislikes, SUM(favorites)=total_favorites]],{where="developers HOLDS '"..target_user.."'"})if data and data[1]then player_total_obbies=tonumber(data[1].count)or 0 player_total_visits=tonumber(data[1].total_visits)or 0 player_total_likes=tonumber(data[1].total_likes)or 0 player_total_dislikes=tonumber(data[1].total_dislikes)or 0 player_total_favorites=tonumber(data[1].total_favorites)or 0 end local owned_data=mw.ext.cargo.query('Obbies',[[COUNT(*)=count, SUM(visits)=total_visits, SUM(likes)=total_likes, SUM(dislikes)=total_dislikes, SUM(favorites)=total_favorites]],{where="creator = '"..target_user.."' AND NOT (developers HOLDS '"..target_user.."')"})if owned_data and owned_data[1]then player_owned_obbies=tonumber(owned_data[1].count)or 0 player_owned_visits=tonumber(owned_data[1].total_visits)or 0 player_owned_likes=tonumber(owned_data[1].total_likes)or 0 player_owned_dislikes=tonumber(owned_data[1].total_dislikes)or 0 player_owned_favorites=tonumber(owned_data[1].total_favorites)or 0 end local contributors_data=mw.ext.cargo.query('Obbies',[[COUNT(*)=count, SUM(visits)=total_visits, SUM(likes)=total_likes, SUM(dislikes)=total_dislikes, SUM(favorites)=total_favorites]],{where="contributors HOLDS '"..target_user.."'"})if contributors_data and contributors_data[1]then player_contributed_obbies=tonumber(contributors_data[1].count)or 0 player_contributed_visits=tonumber(contributors_data[1].total_visits)or 0 player_contributed_likes=tonumber(contributors_data[1].total_likes)or 0 player_contributed_dislikes=tonumber(contributors_data[1].total_dislikes)or 0 player_contributed_favorites=tonumber(contributors_data[1].total_favorites)or 0 end local popular_data=mw.ext.cargo.query('Obbies','_pageName=name, visits, month, year, thumbnail',{where="developers HOLDS '"..target_user.."'",orderBy='visits DESC',limit=1})if popular_data and popular_data[1]then most_popular_obby.name=popular_data[1].name most_popular_obby.image=popular_data[1].thumbnail most_popular_obby.visits=tonumber(popular_data[1].visits)or 0 most_popular_obby.month=tostring(popular_data[1].month)most_popular_obby.year=tostring(popular_data[1].year)end local popular_data_for_contributed=mw.ext.cargo.query('Obbies','_pageName=name, visits, month, year, thumbnail',{where="contributors HOLDS '"..target_user.."'",orderBy='visits DESC',limit=1})if popular_data_for_contributed and popular_data_for_contributed[1]then most_popular_obby_contributed.name=popular_data_for_contributed[1].name most_popular_obby_contributed.image=popular_data_for_contributed[1].thumbnail most_popular_obby_contributed.visits=tonumber(popular_data_for_contributed[1].visits)or 0 most_popular_obby_contributed.month=tostring(popular_data_for_contributed[1].month)most_popular_obby_contributed.year=tostring(popular_data_for_contributed[1].year)end local recent_data=mw.ext.cargo.query('Obbies','_pageName=name, visits, day, month, year, thumbnail',{where="developers HOLDS '"..target_user.."'",orderBy='year DESC, month DESC, day DESC',limit=1})if recent_data and recent_data[1]then most_recent_obby.name=recent_data[1].name most_recent_obby.image=recent_data[1].thumbnail most_recent_obby.visits=tonumber(recent_data[1].visits)or 0 most_recent_obby.month=tostring(recent_data[1].month)most_recent_obby.year=tostring(recent_data[1].year)end local popular_group_data=mw.ext.cargo.query('Studios','_pageName=name, members, month, year, thumbnail',{where="developers HOLDS '"..target_user.."'",orderBy='members DESC',limit=1})if popular_group_data and popular_group_data[1]then most_popular_group.name=popular_group_data[1].name most_popular_group.image=popular_group_data[1].thumbnail most_popular_group.members=tonumber(popular_group_data[1].members)or 0 most_popular_group.month=tostring(popular_group_data[1].month)most_popular_group.year=tostring(popular_group_data[1].year)end end player_total_obbies=player_total_obbies+player_owned_obbies player_total_visits=player_total_visits+player_owned_visits player_total_likes=player_total_likes+player_owned_likes player_total_dislikes=player_total_dislikes+player_owned_dislikes player_total_favorites=player_total_favorites+player_owned_favorites test:renderImage(thumb)test:renderIndicator({data=player_is_terminated and'Terminated'or'Active',color=player_is_terminated and'red'or'green',tooltip=player_is_terminated and'This user is currently banned/terminated on Roblox.'or'This user is considered active on Roblox.'})test:renderHeader({title=player_display_name,subtitle=player_user_name_raw})test:renderSection({title='Statistics',col=2,content={test:renderItem('Total Visits',get_comma_val(player_total_visits)..[[+ <ref name="statistics_data">Statistics are collected from every obby developed or contributed to by ]]..player_user_name_raw..[[ that is stored in the Obby Wiki's database. Data may not be conclusive.</ref>]]),test:renderItem('Obbies','~'..player_total_obbies..' <ref name="statistics_data" />'),test:renderItem('Total Rating',(player_total_likes+player_total_dislikes)>0 and(math.floor((player_total_likes/(player_total_likes+player_total_dislikes))*1000)/10)..'% ( [[File:Likes.svg|12px|alt=Likes|link=]] '..get_comma_val(tostring(player_total_likes))..' &nbsp; [[File:Dislikes.svg|12px|alt=Dislikes|link=]] '..get_comma_val(tostring(player_total_dislikes))..')'or'N/A'),test:renderItem('Total Favorites',get_comma_val(player_total_favorites)..'+ <ref name="statistics_data" />')}})test:renderSection({title='Featured',col=2,content={test:renderItem({label='Most Popular Obby',colspan=2,data=test:renderGameCard(most_popular_obby.image,most_popular_obby.name,get_comma_val(tostring(most_popular_obby.visits or 0)),month_by_index(tonumber(most_popular_obby.month)),most_popular_obby.year)}),test:renderItem({label='Most Recent Obby',colspan=2,data=test:renderGameCard(most_recent_obby.image,most_recent_obby.name,get_comma_val(tostring(most_recent_obby.visits or 0)),month_by_index(tonumber(most_recent_obby.month)),most_recent_obby.year)})}})test:renderSection({title='Contributions',col=2,content={test:renderItem('Contributed Visits',get_comma_val(player_contributed_visits)),test:renderItem('Contributions','~'..player_contributed_obbies),test:renderItem('Contributed Rating',(player_contributed_likes+player_contributed_dislikes)>0 and(math.floor((player_contributed_likes/(player_contributed_likes+player_contributed_dislikes))*1000)/10)..'% ( [[File:Likes.svg|12px|alt=Likes|link=]] '..get_comma_val(tostring(player_contributed_likes))..' &nbsp; [[File:Dislikes.svg|12px|alt=Dislikes|link=]] '..get_comma_val(tostring(player_contributed_dislikes))..')'or'N/A'),test:renderItem('Contributed Favorites',get_comma_val(player_contributed_favorites)..'+'),test:renderItem({label='Most Popular Contribution',colspan=2,data=test:renderGameCard(most_popular_obby_contributed.image,most_popular_obby_contributed.name,get_comma_val(tostring(most_popular_obby_contributed.visits or 0)),month_by_index(tonumber(most_popular_obby_contributed.month)),most_popular_obby_contributed.year)})}})test:renderSection({title='Other',col=2,content={test:renderItem('Joined Roblox',player_creation_month..' '..player_creation_year),test:renderItem('Most Popular Group',string.format('[[%s]] — %s members',tostring(most_popular_group.name),tostring(get_comma_val(tostring(most_popular_group.members)))))}})local social_icons_wikitext={}for i,v in pairs(smm)do if args[i]then local handle=args[i]local full_url=v.url..handle local wikitext=string.format([=[[%s [[File:%s|24px|link=|alt=%s|class=social-icon %s-social-icon]]]]=],full_url,v.icon,v.display..' icon',string.lower(v.display))table.insert(social_icons_wikitext,wikitext)end end if#social_icons_wikitext>0 then test:renderSection({title='Presence',content={test:renderItem({label='Socials',plainlinks_enabled=true,data=table.concat(social_icons_wikitext,' ')})}})end test:renderSection({title='Advanced',col=2,content={test:renderItem('User ID','<code>'..(player_user_id==1 and'Unlisted'or tostring(player_user_id)or'Unknown')..'</code>')}})local rendered=test:renderInfobox(nil,player_user_name)local append_categories={}table.insert(append_categories,'[[Category:'..'Player'..']]')local default_sort='{{DEFAULTSORT:'..string.sub(player_user_name_raw,2)..'}}'local display_title='{{DISPLAYTITLE:@'..string.sub(player_user_name_raw,2)..'}}'PlayerInfobox.store(frame,{username=string.sub(player_user_name_raw,2),display_name=player_display_name_raw,is_verified=player_is_verified,total_obbies=tonumber(player_total_obbies),total_visits=tonumber(player_total_visits),most_popular_obby=most_popular_obby.name,most_recent_obby=most_recent_obby.name,year=tonumber(player_creation_year),month=player_creation_month_num,day=tonumber(player_creation_day),user_id=tostring(player_user_id),image=thumb,headshot=args.headshot})return frame:preprocess(default_sort..display_title)..rendered..'\n'..table.concat(append_categories,'\n')end return PlayerInfobox