Skip to content

Commit

Permalink
Create index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
notqaltx authored Feb 18, 2024
1 parent 00a4730 commit 973c872
Showing 1 changed file with 118 additions and 0 deletions.
118 changes: 118 additions & 0 deletions Projects/BindService/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BindService Documentation</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}

.header {
background-color: #333;
color: #fff;
padding: 10px;
text-align: center;
}

.tab {
overflow: hidden;
border: 1px solid #ccc;
background-color: #f1f1f1;
}

.tab button {
background-color: inherit;
float: left;
border: none;
outline: none;
cursor: pointer;
padding: 14px 16px;
transition: 0.3s;
}

.tab button:hover {
background-color: #ddd;
}

.tab button.active {
background-color: #ccc;
}

.tabcontent {
display: none;
padding: 20px;
border-top: none;
}
</style>
</head>

<body>

<div class="header">
<h1>BindService Documentation</h1>
</div>

<div class="tab">
<button class="tablinks" onclick="openTab(event, 'Welcome')">Welcome</button>
<button class="tablinks" onclick="openTab(event, 'Installation')">Installation</button>
<button class="tablinks" onclick="openTab(event, 'Usage')">Usage Example</button>
<!-- Add more tabs here -->
</div>

<div id="Welcome" class="tabcontent">
<h3>Welcome to BindService Documentation</h3>
<p>This documentation provides information on how to use the BindService module in your Roblox games.</p>
</div>

<div id="Installation" class="tabcontent">
<h3>Installation</h3>
<p>To use BindService in your Roblox game, follow these steps:</p>
<ol>
<li>Insert the BindService module script into your game's hierarchy.</li>
<li>Require the BindService module in your scripts using `require(script.Parent.BindService)`.</li>
</ol>
</div>

<div id="Usage" class="tabcontent">
<h3>Usage Example</h3>
<pre><code>
local BindService = require(game:GetService("ServerScriptService").BindService)

-- Define a callback function
local function MoveForward()
-- Move the player forward
end

-- Bind the "W" key to the MoveForward function
BindService.BindKeyPresses("MoveForward", MoveForward, 0.5, Enum.KeyCode.W)
</code></pre>
</div>

<!-- Add more tab content here -->

<script>
function openTab(evt, tabName) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(tabName).style.display = "block";
evt.currentTarget.className += " active";
}

document.getElementsByClassName("tablinks")[0].click(); // Open the first tab by default
</script>

</body>

</html>

0 comments on commit 973c872

Please sign in to comment.