Spaces:
Running
Running
Add 2 files
Browse files- README.md +7 -5
- index.html +655 -19
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: static
|
7 |
pinned: false
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: roblox-project-1
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: red
|
5 |
+
colorTo: green
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
+
tags:
|
9 |
+
- deepsite
|
10 |
---
|
11 |
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
@@ -1,19 +1,655 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Cookie Clicker Roblox Game Guide</title>
|
7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
+
<style>
|
10 |
+
.code-block {
|
11 |
+
font-family: 'Courier New', monospace;
|
12 |
+
background-color: #1e293b;
|
13 |
+
color: #f8fafc;
|
14 |
+
padding: 1rem;
|
15 |
+
border-radius: 0.5rem;
|
16 |
+
overflow-x: auto;
|
17 |
+
}
|
18 |
+
|
19 |
+
.game-feature {
|
20 |
+
transition: all 0.3s ease;
|
21 |
+
}
|
22 |
+
|
23 |
+
.game-feature:hover {
|
24 |
+
transform: translateY(-3px);
|
25 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
26 |
+
}
|
27 |
+
|
28 |
+
.skin-preview {
|
29 |
+
transition: all 0.3s ease;
|
30 |
+
cursor: pointer;
|
31 |
+
}
|
32 |
+
|
33 |
+
.skin-preview:hover {
|
34 |
+
transform: scale(1.05);
|
35 |
+
z-index: 10;
|
36 |
+
}
|
37 |
+
|
38 |
+
.tab-content {
|
39 |
+
display: none;
|
40 |
+
}
|
41 |
+
|
42 |
+
.tab-content.active {
|
43 |
+
display: block;
|
44 |
+
animation: fadeIn 0.5s ease;
|
45 |
+
}
|
46 |
+
|
47 |
+
@keyframes fadeIn {
|
48 |
+
from { opacity: 0; transform: translateY(10px); }
|
49 |
+
to { opacity: 1; transform: translateY(0); }
|
50 |
+
}
|
51 |
+
|
52 |
+
.flag-grid {
|
53 |
+
display: grid;
|
54 |
+
grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
|
55 |
+
gap: 10px;
|
56 |
+
}
|
57 |
+
</style>
|
58 |
+
</head>
|
59 |
+
<body class="bg-amber-50 min-h-screen">
|
60 |
+
<div class="container mx-auto px-4 py-8">
|
61 |
+
<!-- Header -->
|
62 |
+
<header class="bg-gradient-to-r from-amber-600 to-amber-800 text-white rounded-xl p-6 mb-8 shadow-lg">
|
63 |
+
<div class="flex items-center justify-between">
|
64 |
+
<div>
|
65 |
+
<h1 class="text-4xl font-bold mb-2">Global Cookie Clicker</h1>
|
66 |
+
<p class="text-xl opacity-90">Create a Roblox cookie-clicker game with customization and global competition</p>
|
67 |
+
</div>
|
68 |
+
<div class="bg-white/20 p-4 rounded-full">
|
69 |
+
<i class="fas fa-cookie-bite text-4xl"></i>
|
70 |
+
</div>
|
71 |
+
</div>
|
72 |
+
</header>
|
73 |
+
|
74 |
+
<!-- Game Overview -->
|
75 |
+
<section class="bg-white rounded-xl p-6 mb-8 shadow-md">
|
76 |
+
<h2 class="text-2xl font-bold mb-4 text-gray-800 border-b pb-2">Game Concept Overview</h2>
|
77 |
+
<p class="text-gray-700 mb-6">Create a cookie-clicker game where players can:</p>
|
78 |
+
|
79 |
+
<div class="grid md:grid-cols-3 gap-6 mb-6">
|
80 |
+
<div class="game-feature bg-amber-50 p-4 rounded-lg border border-amber-200">
|
81 |
+
<div class="bg-amber-100 w-12 h-12 rounded-full flex items-center justify-center mb-3 mx-auto">
|
82 |
+
<i class="fas fa-mouse-pointer text-amber-600 text-xl"></i>
|
83 |
+
</div>
|
84 |
+
<h3 class="font-bold text-center mb-2">Cookie Clicking</h3>
|
85 |
+
<p class="text-gray-700 text-center">Basic clicking mechanics with upgrades and power-ups</p>
|
86 |
+
</div>
|
87 |
+
|
88 |
+
<div class="game-feature bg-blue-50 p-4 rounded-lg border border-blue-200">
|
89 |
+
<div class="bg-blue-100 w-12 h-12 rounded-full flex items-center justify-center mb-3 mx-auto">
|
90 |
+
<i class="fas fa-globe text-blue-600 text-xl"></i>
|
91 |
+
</div>
|
92 |
+
<h3 class="font-bold text-center mb-2">Global Competition</h3>
|
93 |
+
<p class="text-gray-700 text-center">Leaderboards showing top players worldwide</p>
|
94 |
+
</div>
|
95 |
+
|
96 |
+
<div class="game-feature bg-purple-50 p-4 rounded-lg border border-purple-200">
|
97 |
+
<div class="bg-purple-100 w-12 h-12 rounded-full flex items-center justify-center mb-3 mx-auto">
|
98 |
+
<i class="fas fa-paint-brush text-purple-600 text-xl"></i>
|
99 |
+
</div>
|
100 |
+
<h3 class="font-bold text-center mb-2">Cookie Customization</h3>
|
101 |
+
<p class="text-gray-700 text-center">Skins, colors, and flag-themed cookie designs</p>
|
102 |
+
</div>
|
103 |
+
</div>
|
104 |
+
|
105 |
+
<div class="bg-amber-100 border-l-4 border-amber-500 p-4 rounded-lg">
|
106 |
+
<div class="flex items-start">
|
107 |
+
<div class="flex-shrink-0 pt-1">
|
108 |
+
<i class="fas fa-lightbulb text-amber-600 text-xl"></i>
|
109 |
+
</div>
|
110 |
+
<div class="ml-3">
|
111 |
+
<h3 class="text-lg font-medium text-amber-900">Monetization Strategy</h3>
|
112 |
+
<div class="mt-1 text-amber-800">
|
113 |
+
<p>Implement Game Passes for special cookie skins and boosters. Use Developer Products for one-time purchases like flag skins.</p>
|
114 |
+
</div>
|
115 |
+
</div>
|
116 |
+
</div>
|
117 |
+
</div>
|
118 |
+
</section>
|
119 |
+
|
120 |
+
<!-- Development Guide -->
|
121 |
+
<section class="bg-white rounded-xl p-6 mb-8 shadow-md">
|
122 |
+
<h2 class="text-2xl font-bold mb-6 text-gray-800 border-b pb-2">Development Guide</h2>
|
123 |
+
|
124 |
+
<div class="flex mb-4 border-b">
|
125 |
+
<button class="tab-btn py-2 px-4 font-medium border-b-2 border-amber-500 text-amber-600" data-tab="basic">Basic Setup</button>
|
126 |
+
<button class="tab-btn py-2 px-4 font-medium" data-tab="clicker">Clicker Mechanics</button>
|
127 |
+
<button class="tab-btn py-2 px-4 font-medium" data-tab="skins">Cookie Skins</button>
|
128 |
+
<button class="tab-btn py-2 px-4 font-medium" data-tab="leaderboard">Leaderboards</button>
|
129 |
+
</div>
|
130 |
+
|
131 |
+
<!-- Basic Setup Tab -->
|
132 |
+
<div id="basic" class="tab-content active">
|
133 |
+
<h3 class="text-xl font-bold mb-4 text-gray-800">Basic Game Setup</h3>
|
134 |
+
|
135 |
+
<div class="mb-6">
|
136 |
+
<h4 class="font-bold text-lg mb-2 text-gray-800">1. Create the Cookie Model</h4>
|
137 |
+
<p class="text-gray-700 mb-3">Create a cookie model that will be the main clickable object:</p>
|
138 |
+
<div class="code-block mb-3">
|
139 |
+
<pre>-- Create a basic cookie model
|
140 |
+
local cookie = Instance.new("Part")
|
141 |
+
cookie.Name = "Cookie"
|
142 |
+
cookie.Size = Vector3.new(4, 1, 4)
|
143 |
+
cookie.Shape = Enum.PartType.Cylinder
|
144 |
+
cookie.BrickColor = BrickColor.new("Brown")
|
145 |
+
cookie.Material = Enum.Material.Sand
|
146 |
+
cookie.Anchored = true
|
147 |
+
cookie.Parent = workspace
|
148 |
+
|
149 |
+
-- Add a click detector
|
150 |
+
local clickDetector = Instance.new("ClickDetector")
|
151 |
+
clickDetector.Parent = cookie</pre>
|
152 |
+
</div>
|
153 |
+
</div>
|
154 |
+
|
155 |
+
<div class="mb-6">
|
156 |
+
<h4 class="font-bold text-lg mb-2 text-gray-800">2. Setup Player Data</h4>
|
157 |
+
<p class="text-gray-700 mb-3">Create a data saving system to track cookies clicked and skins unlocked:</p>
|
158 |
+
<div class="code-block mb-3">
|
159 |
+
<pre>-- Data saving setup
|
160 |
+
local DataStoreService = game:GetService("DataStoreService")
|
161 |
+
local cookieData = DataStoreService:GetDataStore("CookieData")
|
162 |
+
|
163 |
+
game.Players.PlayerAdded:Connect(function(player)
|
164 |
+
-- Create leaderstats folder
|
165 |
+
local leaderstats = Instance.new("Folder")
|
166 |
+
leaderstats.Name = "leaderstats"
|
167 |
+
leaderstats.Parent = player
|
168 |
+
|
169 |
+
-- Create cookies value
|
170 |
+
local cookies = Instance.new("IntValue")
|
171 |
+
cookies.Name = "Cookies"
|
172 |
+
cookies.Value = 0
|
173 |
+
cookies.Parent = leaderstats
|
174 |
+
|
175 |
+
-- Load player data
|
176 |
+
local success, err = pcall(function()
|
177 |
+
local data = cookieData:GetAsync(player.UserId.."_data")
|
178 |
+
if data then
|
179 |
+
cookies.Value = data.cookies or 0
|
180 |
+
-- Load skins data here
|
181 |
+
end
|
182 |
+
end)
|
183 |
+
|
184 |
+
if not success then
|
185 |
+
warn("Error loading data: "..err)
|
186 |
+
end
|
187 |
+
end)
|
188 |
+
|
189 |
+
game.Players.PlayerRemoving:Connect(function(player)
|
190 |
+
local data = {
|
191 |
+
cookies = player.leaderstats.Cookies.Value,
|
192 |
+
-- Add skins data here
|
193 |
+
}
|
194 |
+
|
195 |
+
local success, err = pcall(function()
|
196 |
+
cookieData:SetAsync(player.UserId.."_data", data)
|
197 |
+
end)
|
198 |
+
|
199 |
+
if not success then
|
200 |
+
warn("Error saving data: "..err)
|
201 |
+
end
|
202 |
+
end)</pre>
|
203 |
+
</div>
|
204 |
+
</div>
|
205 |
+
</div>
|
206 |
+
|
207 |
+
<!-- Clicker Mechanics Tab -->
|
208 |
+
<div id="clicker" class="tab-content">
|
209 |
+
<h3 class="text-xl font-bold mb-4 text-gray-800">Clicker Mechanics</h3>
|
210 |
+
|
211 |
+
<div class="mb-6">
|
212 |
+
<h4 class="font-bold text-lg mb-2 text-gray-800">1. Basic Clicking Functionality</h4>
|
213 |
+
<p class="text-gray-700 mb-3">Implement the core clicking mechanic that increases the player's cookie count:</p>
|
214 |
+
<div class="code-block mb-3">
|
215 |
+
<pre>-- Cookie click functionality
|
216 |
+
local cookie = workspace:WaitForChild("Cookie")
|
217 |
+
local clickDetector = cookie:WaitForChild("ClickDetector")
|
218 |
+
|
219 |
+
clickDetector.MouseClick:Connect(function(player)
|
220 |
+
-- Get player's leaderstats
|
221 |
+
local leaderstats = player:FindFirstChild("leaderstats")
|
222 |
+
if leaderstats then
|
223 |
+
local cookies = leaderstats:FindFirstChild("Cookies")
|
224 |
+
if cookies then
|
225 |
+
-- Increment cookie count
|
226 |
+
cookies.Value = cookies.Value + 1
|
227 |
+
|
228 |
+
-- Visual feedback
|
229 |
+
local effect = Instance.new("ParticleEmitter")
|
230 |
+
effect.Texture = "rbxassetid://9430770660" -- Cookie crumb texture
|
231 |
+
effect.LightEmission = 1
|
232 |
+
effect.Size = NumberSequence.new(0.5)
|
233 |
+
effect.Lifetime = NumberRange.new(0.5)
|
234 |
+
effect.Speed = NumberRange.new(5)
|
235 |
+
effect.EmissionDirection = Enum.NormalId.Top
|
236 |
+
effect.Parent = cookie
|
237 |
+
|
238 |
+
game.Debris:AddItem(effect, 0.5)
|
239 |
+
end
|
240 |
+
end
|
241 |
+
end)</pre>
|
242 |
+
</div>
|
243 |
+
</div>
|
244 |
+
|
245 |
+
<div class="mb-6">
|
246 |
+
<h4 class="font-bold text-lg mb-2 text-gray-800">2. Auto-Clickers and Upgrades</h4>
|
247 |
+
<p class="text-gray-700 mb-3">Add upgrades that automatically generate cookies over time:</p>
|
248 |
+
<div class="code-block mb-3">
|
249 |
+
<pre>-- Auto-clicker system
|
250 |
+
local autoClickers = {
|
251 |
+
{name = "Grandma", cost = 100, rate = 1},
|
252 |
+
{name = "Oven", cost = 500, rate = 5},
|
253 |
+
{name = "Factory", cost = 3000, rate = 20}
|
254 |
+
}
|
255 |
+
|
256 |
+
local function setupAutoClicker(player, upgrade)
|
257 |
+
while player and player.Parent do
|
258 |
+
local leaderstats = player:FindFirstChild("leaderstats")
|
259 |
+
if leaderstats then
|
260 |
+
local cookies = leaderstats:FindFirstChild("Cookies")
|
261 |
+
if cookies then
|
262 |
+
cookies.Value = cookies.Value + upgrade.rate
|
263 |
+
end
|
264 |
+
end
|
265 |
+
wait(1) -- Rate per second
|
266 |
+
end
|
267 |
+
end
|
268 |
+
|
269 |
+
-- Example of purchasing an upgrade
|
270 |
+
local function buyUpgrade(player, upgradeName)
|
271 |
+
local upgrade
|
272 |
+
for _, u in ipairs(autoClickers) do
|
273 |
+
if u.name == upgradeName then
|
274 |
+
upgrade = u
|
275 |
+
break
|
276 |
+
end
|
277 |
+
end
|
278 |
+
|
279 |
+
if not upgrade then return end
|
280 |
+
|
281 |
+
local leaderstats = player:FindFirstChild("leaderstats")
|
282 |
+
if leaderstats then
|
283 |
+
local cookies = leaderstats:FindFirstChild("Cookies")
|
284 |
+
if cookies and cookies.Value >= upgrade.cost then
|
285 |
+
cookies.Value = cookies.Value - upgrade.cost
|
286 |
+
coroutine.wrap(setupAutoClicker)(player, upgrade)
|
287 |
+
return true
|
288 |
+
end
|
289 |
+
end
|
290 |
+
return false
|
291 |
+
end</pre>
|
292 |
+
</div>
|
293 |
+
</div>
|
294 |
+
</div>
|
295 |
+
|
296 |
+
<!-- Cookie Skins Tab -->
|
297 |
+
<div id="skins" class="tab-content">
|
298 |
+
<h3 class="text-xl font-bold mb-4 text-gray-800">Cookie Customization</h3>
|
299 |
+
|
300 |
+
<div class="mb-6">
|
301 |
+
<h4 class="font-bold text-lg mb-2 text-gray-800">1. Basic Skin System</h4>
|
302 |
+
<p class="text-gray-700 mb-3">Implement a system to change the cookie's appearance:</p>
|
303 |
+
<div class="code-block mb-3">
|
304 |
+
<pre>-- Cookie skin system
|
305 |
+
local skins = {
|
306 |
+
default = {color = Color3.fromRGB(139, 69, 19), texture = ""},
|
307 |
+
chocolate = {color = Color3.fromRGB(60, 35, 10), texture = "rbxassetid://9430770660"},
|
308 |
+
strawberry = {color = Color3.fromRGB(222, 111, 161), texture = "rbxassetid://9430770777"},
|
309 |
+
// Add more skins here
|
310 |
+
}
|
311 |
+
|
312 |
+
local function applySkin(player, skinName)
|
313 |
+
local skin = skins[skinName]
|
314 |
+
if not skin then return end
|
315 |
+
|
316 |
+
-- Save to player data (not shown here)
|
317 |
+
|
318 |
+
-- Apply to cookie
|
319 |
+
local cookie = workspace:FindFirstChild("Cookie")
|
320 |
+
if cookie then
|
321 |
+
cookie.BrickColor = BrickColor.new(skin.color)
|
322 |
+
if skin.texture ~= "" then
|
323 |
+
local decal = Instance.new("Decal")
|
324 |
+
decal.Texture = skin.texture
|
325 |
+
decal.Face = Enum.NormalId.Top
|
326 |
+
decal.Parent = cookie
|
327 |
+
else
|
328 |
+
-- Remove existing decals
|
329 |
+
for _, child in ipairs(cookie:GetChildren()) do
|
330 |
+
if child:IsA("Decal") then
|
331 |
+
child:Destroy()
|
332 |
+
end
|
333 |
+
end
|
334 |
+
end
|
335 |
+
end
|
336 |
+
end</pre>
|
337 |
+
</div>
|
338 |
+
</div>
|
339 |
+
|
340 |
+
<div class="mb-6">
|
341 |
+
<h4 class="font-bold text-lg mb-2 text-gray-800">2. Flag-Themed Cookie Skins</h4>
|
342 |
+
<p class="text-gray-700 mb-3">Create country flag skins that players can unlock:</p>
|
343 |
+
|
344 |
+
<div class="flag-grid mb-4">
|
345 |
+
<div class="skin-preview bg-white border rounded p-2">
|
346 |
+
<div class="w-full h-16 bg-gradient-to-r from-blue-900 to-white to-red-600 mb-1"></div>
|
347 |
+
<p class="text-xs text-center">France</p>
|
348 |
+
</div>
|
349 |
+
<div class="skin-preview bg-white border rounded p-2">
|
350 |
+
<div class="w-full h-16 bg-gradient-to-b from-red-600 to-white to-red-600 mb-1"></div>
|
351 |
+
<p class="text-xs text-center">Austria</p>
|
352 |
+
</div>
|
353 |
+
<div class="skin-preview bg-white border rounded p-2">
|
354 |
+
<div class="w-full h-16 bg-gradient-to-b from-yellow-400 to-blue-600 mb-1"></div>
|
355 |
+
<p class="text-xs text-center">Ukraine</p>
|
356 |
+
</div>
|
357 |
+
<div class="skin-preview bg-white border rounded p-2">
|
358 |
+
<div class="w-full h-16 bg-gradient-to-b from-green-600 to-white to-red-600 mb-1"></div>
|
359 |
+
<p class="text-xs text-center">Italy</p>
|
360 |
+
</div>
|
361 |
+
<div class="skin-preview bg-white border rounded p-2">
|
362 |
+
<div class="w-full h-16 bg-gradient-to-b from-red-600 to-yellow-400 mb-1"></div>
|
363 |
+
<p class="text-xs text-center">Spain</p>
|
364 |
+
</div>
|
365 |
+
</div>
|
366 |
+
|
367 |
+
<div class="code-block mb-3">
|
368 |
+
<pre>-- Flag skins implementation
|
369 |
+
local flagSkins = {
|
370 |
+
france = {
|
371 |
+
colors = {
|
372 |
+
Color3.fromRGB(0, 35, 149), -- Blue
|
373 |
+
Color3.fromRGB(255, 255, 255), -- White
|
374 |
+
Color3.fromRGB(237, 41, 57) -- Red
|
375 |
+
},
|
376 |
+
pattern = "vertical" -- or "horizontal"
|
377 |
+
},
|
378 |
+
// Add more flag skins here
|
379 |
+
}
|
380 |
+
|
381 |
+
local function applyFlagSkin(player, flagName)
|
382 |
+
local flag = flagSkins[flagName]
|
383 |
+
if not flag then return end
|
384 |
+
|
385 |
+
local cookie = workspace:FindFirstChild("Cookie")
|
386 |
+
if not cookie then return end
|
387 |
+
|
388 |
+
-- Clear existing decals
|
389 |
+
for _, child in ipairs(cookie:GetChildren()) do
|
390 |
+
if child:IsA("Decal") then
|
391 |
+
child:Destroy()
|
392 |
+
end
|
393 |
+
end
|
394 |
+
|
395 |
+
-- Apply flag pattern
|
396 |
+
if flag.pattern == "vertical" then
|
397 |
+
local partWidth = cookie.Size.X / #flag.colors
|
398 |
+
for i, color in ipairs(flag.colors) do
|
399 |
+
local part = Instance.new("Part")
|
400 |
+
part.Size = Vector3.new(partWidth, cookie.Size.Y, cookie.Size.Z)
|
401 |
+
part.Position = cookie.Position + Vector3.new(
|
402 |
+
-cookie.Size.X/2 + partWidth/2 + (i-1)*partWidth,
|
403 |
+
0,
|
404 |
+
0
|
405 |
+
)
|
406 |
+
part.BrickColor = BrickColor.new(color)
|
407 |
+
part.Anchored = true
|
408 |
+
part.Parent = cookie
|
409 |
+
end
|
410 |
+
else
|
411 |
+
-- Horizontal pattern implementation
|
412 |
+
end
|
413 |
+
end</pre>
|
414 |
+
</div>
|
415 |
+
</div>
|
416 |
+
</div>
|
417 |
+
|
418 |
+
<!-- Leaderboards Tab -->
|
419 |
+
<div id="leaderboard" class="tab-content">
|
420 |
+
<h3 class="text-xl font-bold mb-4 text-gray-800">Global Leaderboards</h3>
|
421 |
+
|
422 |
+
<div class="mb-6">
|
423 |
+
<h4 class="font-bold text-lg mb-2 text-gray-800">1. Global Leaderboard Setup</h4>
|
424 |
+
<p class="text-gray-700 mb-3">Create a global leaderboard to show top players worldwide:</p>
|
425 |
+
<div class="code-block mb-3">
|
426 |
+
<pre>-- Global leaderboard system
|
427 |
+
local DataStoreService = game:GetService("DataStoreService")
|
428 |
+
local leaderboardStore = DataStoreService:GetOrderedDataStore("GlobalCookieLeaderboard")
|
429 |
+
|
430 |
+
local function updateLeaderboard()
|
431 |
+
-- Get top 10 players
|
432 |
+
local success, data = pcall(function()
|
433 |
+
return leaderboardStore:GetSortedAsync(false, 10)
|
434 |
+
end)
|
435 |
+
|
436 |
+
if success and data then
|
437 |
+
local leaderboardGui = game.ServerStorage:FindFirstChild("LeaderboardGui")
|
438 |
+
if leaderboardGui then
|
439 |
+
-- Clear existing entries
|
440 |
+
local frame = leaderboardGui:FindFirstChild("Frame")
|
441 |
+
if frame then
|
442 |
+
frame:ClearAllChildren()
|
443 |
+
|
444 |
+
-- Add header
|
445 |
+
local header = Instance.new("TextLabel")
|
446 |
+
header.Text = "TOP COOKIE CLICKERS"
|
447 |
+
header.Font = Enum.Font.GothamBold
|
448 |
+
header.TextSize = 18
|
449 |
+
header.TextColor3 = Color3.new(1, 1, 1)
|
450 |
+
header.BackgroundTransparency = 1
|
451 |
+
header.Size = UDim2.new(1, 0, 0, 30)
|
452 |
+
header.Parent = frame
|
453 |
+
|
454 |
+
-- Add entries
|
455 |
+
local entries = data:GetCurrentPage()
|
456 |
+
for rank, entry in ipairs(entries) do
|
457 |
+
local playerName
|
458 |
+
local success, result = pcall(function()
|
459 |
+
return game:GetService("Players"):GetNameFromUserIdAsync(entry.key)
|
460 |
+
end)
|
461 |
+
|
462 |
+
if success then
|
463 |
+
playerName = result
|
464 |
+
else
|
465 |
+
playerName = "Player "..entry.key
|
466 |
+
end
|
467 |
+
|
468 |
+
local entryFrame = Instance.new("Frame")
|
469 |
+
entryFrame.BackgroundTransparency = 0.8
|
470 |
+
entryFrame.BackgroundColor3 = rank % 2 == 0 and Color3.new(0.2, 0.2, 0.2) or Color3.new(0.3, 0.3, 0.3)
|
471 |
+
entryFrame.Size = UDim2.new(1, 0, 0, 30)
|
472 |
+
entryFrame.Position = UDim2.new(0, 0, 0, 30 + (rank-1)*30)
|
473 |
+
entryFrame.Parent = frame
|
474 |
+
|
475 |
+
local rankLabel = Instance.new("TextLabel")
|
476 |
+
rankLabel.Text = rank.."."
|
477 |
+
rankLabel.Font = Enum.Font.Gotham
|
478 |
+
rankLabel.TextSize = 14
|
479 |
+
rankLabel.TextColor3 = Color3.new(1, 1, 1)
|
480 |
+
rankLabel.BackgroundTransparency = 1
|
481 |
+
rankLabel.Size = UDim2.new(0.1, 0, 1, 0)
|
482 |
+
rankLabel.Parent = entryFrame
|
483 |
+
|
484 |
+
local nameLabel = Instance.new("TextLabel")
|
485 |
+
nameLabel.Text = playerName
|
486 |
+
nameLabel.Font = Enum.Font.Gotham
|
487 |
+
nameLabel.TextSize = 14
|
488 |
+
nameLabel.TextColor3 = Color3.new(1, 1, 1)
|
489 |
+
nameLabel.BackgroundTransparency = 1
|
490 |
+
nameLabel.Size = UDim2.new(0.6, 0, 1, 0)
|
491 |
+
nameLabel.Position = UDim2.new(0.1, 0, 0, 0)
|
492 |
+
nameLabel.Parent = entryFrame
|
493 |
+
|
494 |
+
local scoreLabel = Instance.new("TextLabel")
|
495 |
+
scoreLabel.Text = tostring(entry.value)
|
496 |
+
scoreLabel.Font = Enum.Font.GothamBold
|
497 |
+
scoreLabel.TextSize = 14
|
498 |
+
scoreLabel.TextColor3 = Color3.new(1, 0.8, 0)
|
499 |
+
scoreLabel.BackgroundTransparency = 1
|
500 |
+
scoreLabel.Size = UDim2.new(0.3, 0, 1, 0)
|
501 |
+
scoreLabel.Position = UDim2.new(0.7, 0, 0, 0)
|
502 |
+
scoreLabel.Parent = entryFrame
|
503 |
+
end
|
504 |
+
end
|
505 |
+
end
|
506 |
+
end
|
507 |
+
end
|
508 |
+
|
509 |
+
-- Update leaderboard periodically
|
510 |
+
while true do
|
511 |
+
updateLeaderboard()
|
512 |
+
wait(60) -- Update every minute
|
513 |
+
end</pre>
|
514 |
+
</div>
|
515 |
+
</div>
|
516 |
+
|
517 |
+
<div class="mb-6">
|
518 |
+
<h4 class="font-bold text-lg mb-2 text-gray-800">2. Updating Player Scores</h4>
|
519 |
+
<p class="text-gray-700 mb-3">Update the global leaderboard when players earn cookies:</p>
|
520 |
+
<div class="code-block mb-3">
|
521 |
+
<pre>-- Update player score in global leaderboard
|
522 |
+
game.Players.PlayerAdded:Connect(function(player)
|
523 |
+
local leaderstats = player:WaitForChild("leaderstats")
|
524 |
+
local cookies = leaderstats:WaitForChild("Cookies")
|
525 |
+
|
526 |
+
cookies.Changed:Connect(function(value)
|
527 |
+
-- Update global leaderboard
|
528 |
+
local success, err = pcall(function()
|
529 |
+
leaderboardStore:SetAsync(player.UserId, value)
|
530 |
+
end)
|
531 |
+
|
532 |
+
if not success then
|
533 |
+
warn("Error updating leaderboard: "..err)
|
534 |
+
end
|
535 |
+
end)
|
536 |
+
end)</pre>
|
537 |
+
</div>
|
538 |
+
</div>
|
539 |
+
</div>
|
540 |
+
</section>
|
541 |
+
|
542 |
+
<!-- Monetization Tips -->
|
543 |
+
<section class="bg-white rounded-xl p-6 mb-8 shadow-md">
|
544 |
+
<h2 class="text-2xl font-bold mb-4 text-gray-800 border-b pb-2">Monetization Strategies</h2>
|
545 |
+
|
546 |
+
<div class="grid md:grid-cols-2 gap-6">
|
547 |
+
<div class="bg-green-50 border border-green-200 rounded-lg p-4">
|
548 |
+
<h3 class="font-bold text-green-800 mb-3"><i class="fas fa-tag mr-2"></i>Game Passes</h3>
|
549 |
+
<ul class="list-disc pl-5 space-y-1 text-gray-700">
|
550 |
+
<li><strong>Double Click Power</strong> - 2x cookies per click (200 Robux)</li>
|
551 |
+
<li><strong>Golden Cookie Skin</strong> - Exclusive golden cookie (150 Robux)</li>
|
552 |
+
<li><strong>Auto-Clicker Boost</strong> - 2x auto-clicker speed (300 Robux)</li>
|
553 |
+
</ul>
|
554 |
+
</div>
|
555 |
+
|
556 |
+
<div class="bg-purple-50 border border-purple-200 rounded-lg p-4">
|
557 |
+
<h3 class="font-bold text-purple-800 mb-3"><i class="fas fa-shopping-cart mr-2"></i>Developer Products</h3>
|
558 |
+
<ul class="list-disc pl-5 space-y-1 text-gray-700">
|
559 |
+
<li><strong>Flag Skin Pack</strong> - 5 country flag skins (50 Robux)</li>
|
560 |
+
<li><strong>Premium Flag Pack</strong> - 10 rare flag skins (100 Robux)</li>
|
561 |
+
<li><strong>Cookie Booster</strong> - 1 hour of 3x cookies (25 Robux)</li>
|
562 |
+
</ul>
|
563 |
+
</div>
|
564 |
+
</div>
|
565 |
+
</section>
|
566 |
+
|
567 |
+
<!-- Final Tips -->
|
568 |
+
<section class="bg-amber-100 border border-amber-200 rounded-xl p-6 shadow-md">
|
569 |
+
<h2 class="text-2xl font-bold mb-4 text-amber-900 border-b border-amber-300 pb-2">Final Tips</h2>
|
570 |
+
|
571 |
+
<div class="space-y-4">
|
572 |
+
<div class="flex items-start">
|
573 |
+
<div class="flex-shrink-0 mt-1">
|
574 |
+
<i class="fas fa-check-circle text-amber-700"></i>
|
575 |
+
</div>
|
576 |
+
<div class="ml-3">
|
577 |
+
<p class="text-amber-900 font-medium">Start with basic functionality first, then add skins and leaderboards</p>
|
578 |
+
</div>
|
579 |
+
</div>
|
580 |
+
|
581 |
+
<div class="flex items-start">
|
582 |
+
<div class="flex-shrink-0 mt-1">
|
583 |
+
<i class="fas fa-check-circle text-amber-700"></i>
|
584 |
+
</div>
|
585 |
+
<div class="ml-3">
|
586 |
+
<p class="text-amber-900 font-medium">Test your game thoroughly before publishing</p>
|
587 |
+
</div>
|
588 |
+
</div>
|
589 |
+
|
590 |
+
<div class="flex items-start">
|
591 |
+
<div class="flex-shrink-0 mt-1">
|
592 |
+
<i class="fas fa-check-circle text-amber-700"></i>
|
593 |
+
</div>
|
594 |
+
<div class="ml-3">
|
595 |
+
<p class="text-amber-900 font-medium">Promote your game on social media and Roblox groups</p>
|
596 |
+
</div>
|
597 |
+
</div>
|
598 |
+
|
599 |
+
<div class="flex items-start">
|
600 |
+
<div class="flex-shrink-0 mt-1">
|
601 |
+
<i class="fas fa-check-circle text-amber-700"></i>
|
602 |
+
</div>
|
603 |
+
<div class="ml-3">
|
604 |
+
<p class="text-amber-900 font-medium">Update regularly with new skins and features to keep players engaged</p>
|
605 |
+
</div>
|
606 |
+
</div>
|
607 |
+
</div>
|
608 |
+
</section>
|
609 |
+
|
610 |
+
<!-- Footer -->
|
611 |
+
<footer class="mt-12 text-center text-gray-600">
|
612 |
+
<p>© 2023 Roblox Cookie Clicker Guide | Created with <i class="fas fa-cookie-bite text-amber-600"></i> for aspiring developers</p>
|
613 |
+
</footer>
|
614 |
+
</div>
|
615 |
+
|
616 |
+
<script>
|
617 |
+
// Tab functionality
|
618 |
+
document.querySelectorAll('.tab-btn').forEach(btn => {
|
619 |
+
btn.addEventListener('click', () => {
|
620 |
+
// Remove active class from all buttons
|
621 |
+
document.querySelectorAll('.tab-btn').forEach(b => {
|
622 |
+
b.classList.remove('border-b-2', 'border-amber-500', 'text-amber-600');
|
623 |
+
});
|
624 |
+
|
625 |
+
// Add active class to clicked button
|
626 |
+
btn.classList.add('border-b-2', 'border-amber-500', 'text-amber-600');
|
627 |
+
|
628 |
+
// Hide all tab contents
|
629 |
+
document.querySelectorAll('.tab-content').forEach(tab => {
|
630 |
+
tab.classList.remove('active');
|
631 |
+
});
|
632 |
+
|
633 |
+
// Show corresponding tab
|
634 |
+
const tabId = btn.getAttribute('data-tab');
|
635 |
+
document.getElementById(tabId).classList.add('active');
|
636 |
+
});
|
637 |
+
});
|
638 |
+
|
639 |
+
// Preview skin hover effect
|
640 |
+
document.querySelectorAll('.skin-preview').forEach(skin => {
|
641 |
+
skin.addEventListener('mouseenter', () => {
|
642 |
+
skin.style.transform = 'scale(1.1)';
|
643 |
+
skin.style.zIndex = '10';
|
644 |
+
skin.style.boxShadow = '0 10px 15px -3px rgba(0, 0, 0, 0.2)';
|
645 |
+
});
|
646 |
+
|
647 |
+
skin.addEventListener('mouseleave', () => {
|
648 |
+
skin.style.transform = 'scale(1)';
|
649 |
+
skin.style.zIndex = '1';
|
650 |
+
skin.style.boxShadow = 'none';
|
651 |
+
});
|
652 |
+
});
|
653 |
+
</script>
|
654 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=DiamondVi/roblox-project-1" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
655 |
+
</html>
|