What is HtmlService?

(i know this topic is kind of old but i couldnt stop myself from showing that)

i found an old script from 2007 that used htmlservice so
i launched a 2007 roblox client and ran the following script

-- WARNING! For full functionality, do not edit this script!

local w = game:GetService("HtmlService"):NewWindow(470,530)

function getPlayer(humanoid) 
	local players = game.Players:children() 
		for i = 1, #players do 
			if players[i].Character.Humanoid == humanoid then return players[i] end 
		end 
	return nil 
end 

w:SetCallback(function(a) 
	print(a)

	if a == "help" then
		w:SetBody([==[
<table width="420" height="470" border="2" bordercolor="blue">
	<tr>
		<td width="490" bgcolor="#000000"><font color="#FFFF00">&nbsp;
			</font><div align="center">
				<p><font color="#FFFF00" size="6"><b>Chat: Help</b></font></p>
				<table width="410" height="0" border="2" bordercolor="blue">
					<tr>
						<td><p><font color="#FFFF00" size="4">Command:</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">"help/"</font></p></div></td>
					</tr>
					<tr>
						<td><p><font color="#FFFF00" size="4">Function:</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">Opens the Help window.</font></p></div></td>
					</tr>
				</table>
				<br>
				<input id="Button" type="button" width="20" value="Back" onclick="window.external.Call('back')" /><br />
			</div>
		</td>
	</tr>
</table>
		]==])
		w:Show()
	end

	if a == "vec" then
		w:SetBody([==[
<table width="420" height="470" border="2" bordercolor="blue">
	<tr>
		<td width="490" bgcolor="#000000"><font color="#FFFF00">&nbsp;
			</font><div align="center">
				<p><font color="#FFFF00" size="6"><b>Chat: Teleport</b></font></p>
				<table width="410" height="0" border="2" bordercolor="blue">
					<tr>
						<td><p><font color="#FFFF00" size="4">Command:</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">"vec/Player/Vector3"</font></p></div></td>
					</tr>
					<tr>
						<td><p><font color="#FFFF00" size="4">Function:</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">Moves Player's character to Vector3.</font></p></div></td>
					</tr>
				</table>
				<br>
				<input id="Button" type="button" width="20" value="Back" onclick="window.external.Call('back')" /><br />
			</div>
		</td>
	</tr>
</table>
		]==])
		w:Show()
	end

	if a == "admin" then
		w:SetBody([==[
<table width="420" height="470" border="2" bordercolor="blue">
	<tr>
		<td width="490" bgcolor="#000000"><font color="#FFFF00">&nbsp;
			</font><div align="center">
				<p><font color="#FFFF00" size="6"><b>Chat: Administration</b></font></p>
				<table width="410" height="0" border="2" bordercolor="blue">
					<tr>
						<td><p><font color="#FFFF00" size="4">Command:</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">"admin/Player[/...]"</font></p></div></td>
					</tr>
					<tr>
						<td><p><font color="#FFFF00" size="4">Function:</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">Adds Player to the permission list.<br>
							Extra arguments can be used for extra players.</font></p></div></td>
					</tr>
				</table>
				<br>
				<table width="410" height="0" border="2" bordercolor="blue">
					<tr>
						<td><p><font color="#FFFF00" size="4">Command:</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">"unadmin/Player[/...]"</font></p></div></td>
					</tr>
					<tr>
						<td><p><font color="#FFFF00" size="4">Function:</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">Removes Player from the permission list.<br>
							Extra arguments can be used for extra players.</font></p></div></td>
					</tr>
				</table>
				<br>
				<input id="Button" type="button" value="Back" onclick="window.external.Call('back')" /><br />
			</div>
		</td>
	</tr>
</table>
		]==])
		w:Show()
	end

	if a == "ban" then
		w:SetBody([==[
<table width="420" height="470" border="2" bordercolor="blue">
	<tr>
		<td width="490" bgcolor="#000000"><font color="#FFFF00">&nbsp;
			</font><div align="center">
				<p><font color="#FFFF00" size="6"><b>Chat: Ban</b></font></p>
				<table width="410" height="0" border="2" bordercolor="blue">
					<tr>
						<td><p><font color="#FFFF00" size="4">Command:</font></p></td>
						<td><div align="center"><div align="center"><p><font color="#FFFF00">"ban/Player[/...]"</font></p></div></td>
					</tr>
					<tr>
						<td><p><font color="#FFFF00" size="4">Function:</font></p></td>
						<td><div align="center"><div align="center"><p><font color="#FFFF00">Bans Player from the server.<br>
							Extra arguments can be used for extra players.</font></p></div></td>
					</tr>
				</table>
				<br>
				<input id="Button" type="button" width="20" value="Back" onclick="window.external.Call('back')" /><br />
			</div>
		</td>
	</tr>
</table>
		]==])
		w:Show()
	end

	if a == "boot" then
		w:SetBody([==[
<table width="420" height="470" border="2" bordercolor="blue">
	<tr>
		<td width="490" bgcolor="#000000"><font color="#FFFF00">&nbsp;
			</font><div align="center">
				<p><font color="#FFFF00" size="6"><b>Chat: Boot</b></font></p>
				<table width="410" height="0" border="2" bordercolor="blue">
					<tr>
						<td><p><font color="#FFFF00" size="4">Command:</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">"boot/Player[/...]"</font></p></div></td>
					</tr>
					<tr>
						<td><p><font color="#FFFF00" size="4">Function:</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">Removes Player from the server (player can come back).<br>
							Extra arguments can be used for extra players.</font></p></div></td>
					</tr>
				</table>
				<br>
				<input id="Button" type="button" width="20" value="Back" onclick="window.external.Call('back')" /><br />
			</div>
		</td>
	</tr>
</table>
		]==])
		w:Show()
	end

	if a == "kill" then
		w:SetBody([==[
<table width="420" height="470" border="2" bordercolor="blue">
	<tr>
		<td width="490" bgcolor="#000000"><font color="#FFFF00">&nbsp;
			</font><div align="center">
				<p><font color="#FFFF00" size="6"><b>Chat: Kill</b></font></p>
				<table width="410" height="0" border="2" bordercolor="blue">
					<tr>
						<td><p><font color="#FFFF00" size="4">Command:</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">"kill/(1: all)(2: Player[/...])"</font></p></div></td>
					</tr>
					<tr>
						<td><p><font color="#FFFF00" size="4">Function(1):</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">Kills all non-admin players.</font></p></div></td>
					</tr>
					<tr>
						<td><p><font color="#FFFF00" size="4">Function(2):</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">Kills Player.<br>
							Extra arguments can be used for extra players.</font></p></div></td>
					</tr>
				</table>
				<br>
				<input id="Button" type="button" width="20" value="Back" onclick="window.external.Call('back')" /><br />
			</div>
		</td>
	</tr>
</table>
		]==])
		w:Show()
	end

	if a == "msg" then
		w:SetBody([==[
<table width="420" height="470" border="2" bordercolor="blue">
	<tr>
		<td width="490" bgcolor="#000000"><font color="#FFFF00">&nbsp;
			</font><div align="center">
				<p><font color="#FFFF00" size="6"><b>Chat: Message</b></font></p>
				<table width="410" height="0" border="2" bordercolor="blue">
					<tr>
						<td><p><font color="#FFFF00" size="4">Command:</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">"m/Message[/Wait]"</font></p></div></td>
					</tr>
					<tr>
						<td><p><font color="#FFFF00" size="4">Function:</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">Displays Message to all players.<br>
							An extra argument sets the duration of Message</font></p></div></td>
					</tr>
				</table>
				<br>
				<table width="410" height="0" border="2" bordercolor="blue">
					<tr>
						<td><p><font color="#FFFF00" size="4">Command:</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">"h/Message"</font></p></div></td>
					</tr>
					<tr>
						<td><p><font color="#FFFF00" size="4">Function:</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">Displays Message to all players in a hint</font></p></div></td>
					</tr>
				</table>
				<br>
				<table width="410" height="0" border="2" bordercolor="blue">
					<tr>
						<td><p><font color="#FFFF00" size="4">Command:</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">"rh/"</font></p></div></td>
					</tr>
					<tr>
						<td><p><font color="#FFFF00" size="4">Function:</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">Removes a hint if displayed</font></p></div></td>
					</tr>
				</table>
				<br>
				<table width="410" height="0" border="2" bordercolor="blue">
					<tr>
						<td><p><font color="#FFFF00" size="4">Command:</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">"dm/"</font></p></div></td>
					</tr>
					<tr>
						<td><p><font color="#FFFF00" size="4">Function:</font></p></td>
						<td><div align="center"><p><font color="#FFFF00">Removes all messages and hints from all players and the workspace</font></p></div></td>
					</tr>
				</table>
				<br>
				<input id="Button" type="button" value="Back" onclick="window.external.Call('back')" /><br />
			</div>
		</td>
	</tr>
</table>
		]==])
		w:Show()
	end

	if a == "back" then
		w:SetBody([==[
<table width="420" height="470" border="2" bordercolor="blue">
	<tr>
		<td width="490" bgcolor="#000000"><font color="#FFFF00">&nbsp;
			</font><div align="center">
				<p><font color="#FFFF00" size="6"><b>Admin Help</b></font></p>

				<p><font color="#FFFF00">Click on one of the following buttons to learn their commands.</font></p>

				<input id="Button" type="button" style="width: 150px;" value="Help" onclick="window.external.Call('help')" /><br>
				<input id="Button" type="button" style="width: 150px;" value="Administration" onclick="window.external.Call('admin')" /><br>
				<input id="Button" type="button" style="width: 150px;" value="Vector3" onclick="window.external.Call('vec')" /><br>
				<input id="Button" type="button" style="width: 150px;" value="Ban" onclick="window.external.Call('ban')" /><br>
				<input id="Button" type="button" style="width: 150px;" value="Boot" onclick="window.external.Call('boot')" /><br>
				<input id="Button" type="button" style="width: 150px;" value="Kill" onclick="window.external.Call('kill')" /><br>
				<input id="Button" type="button" style="width: 150px;" value="Message" onclick="window.external.Call('msg')" /><br>
				<br>
				<input id="Button" type="button" value="Close" onclick="window.external.Call('close')" /><br>

				<p><font color="#FFFF00" size="1">All commands are in the following format: "[function]/[argument]/[argument]"</font></p>
			</div>
		</td>
	</tr>
</table>
		]==])
		w:Show()
	end

	if a == "close" then
		w:Close()
	end

end)

w.DocumentComplete:connect(function ()
	w:SetBody([==[
<table width="420" height="470" border="2" bordercolor="blue">
	<tr>
		<td width="490" bgcolor="#000000"><font color="#FFFF00">&nbsp;
			</font><div align="center">
				<p><font color="#FFFF00" size="6"><b>Admin Help</b></font></p>

				<p><font color="#FFFF00">Click on one of the following buttons to learn their commands.</font></p>

				<input id="Button" type="button" style="width: 150px;" value="Help" onclick="window.external.Call('help')" /><br>
				<input id="Button" type="button" style="width: 150px;" value="Administration" onclick="window.external.Call('admin')" /><br>
				<input id="Button" type="button" style="width: 150px;" value="Vector3" onclick="window.external.Call('vec')" /><br>
				<input id="Button" type="button" style="width: 150px;" value="Ban" onclick="window.external.Call('ban')" /><br>
				<input id="Button" type="button" style="width: 150px;" value="Boot" onclick="window.external.Call('boot')" /><br>
				<input id="Button" type="button" style="width: 150px;" value="Kill" onclick="window.external.Call('kill')" /><br>
				<input id="Button" type="button" style="width: 150px;" value="Message" onclick="window.external.Call('msg')" /><br>
				<br>
				<input id="Button" type="button" value="Close" onclick="window.external.Call('close')" /><br>

				<p><font color="#FFFF00" size="1">All commands are in the following format: "[function]/[argument]/[argument]"</font></p>
			</div>
		</td>
	</tr>
</table>
	]==])

	w:Show()
end)

w:Navigate()

and this happened

21 Likes