Spaces:
Running
Running
Add 1 files
Browse files- index.html +387 -500
index.html
CHANGED
@@ -3,56 +3,81 @@
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title>Cookie
|
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 |
-
.
|
11 |
-
|
12 |
-
|
13 |
-
color: #f8fafc;
|
14 |
-
padding: 1rem;
|
15 |
-
border-radius: 0.5rem;
|
16 |
-
overflow-x: auto;
|
17 |
}
|
18 |
|
19 |
-
.
|
20 |
-
|
|
|
21 |
}
|
22 |
|
23 |
-
.
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
26 |
}
|
27 |
|
28 |
-
.
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
}
|
32 |
|
33 |
-
.
|
34 |
-
transform: scale(1.
|
35 |
-
z-index: 10;
|
36 |
}
|
37 |
|
38 |
-
.
|
39 |
-
|
|
|
40 |
}
|
41 |
|
42 |
-
.
|
43 |
-
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
}
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
}
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
|
|
|
|
|
|
56 |
}
|
57 |
</style>
|
58 |
</head>
|
@@ -62,511 +87,375 @@
|
|
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">
|
66 |
-
<p class="text-xl opacity-90">
|
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 |
-
<!--
|
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">
|
77 |
-
<p class="text-gray-700 mb-
|
78 |
|
79 |
-
<div class="
|
80 |
-
<div class="
|
81 |
-
<div class="
|
82 |
-
<i class="fas fa-
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
89 |
-
|
90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
97 |
-
|
98 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
</div>
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
125 |
-
|
126 |
-
<
|
127 |
-
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
</div>
|
130 |
|
131 |
-
<!--
|
132 |
-
<div
|
133 |
-
<
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
|
|
|
|
|
|
|
|
|
|
152 |
</div>
|
153 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
|
155 |
-
<div class="
|
156 |
-
<
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
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 |
-
|
208 |
-
|
209 |
-
<
|
210 |
|
211 |
-
<div class="mb-
|
212 |
-
<
|
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 |
-
|
|
|
280 |
|
281 |
-
|
282 |
-
|
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 |
-
--
|
|
|
|
|
|
|
|
|
317 |
|
318 |
-
--
|
319 |
-
local
|
320 |
-
if
|
321 |
-
|
322 |
-
|
323 |
-
|
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 |
-
|
337 |
-
|
|
|
|
|
|
|
|
|
|
|
338 |
</div>
|
339 |
|
340 |
-
<div class="
|
341 |
-
<
|
342 |
-
|
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="
|
358 |
-
<
|
359 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
419 |
-
|
420 |
-
<
|
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="
|
518 |
-
<
|
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 |
-
|
524 |
-
local
|
|
|
|
|
525 |
|
526 |
-
cookies
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
|
|
536 |
end)</pre>
|
537 |
-
</div>
|
538 |
</div>
|
539 |
</div>
|
540 |
</section>
|
541 |
|
542 |
-
<!--
|
543 |
-
<section class="bg-
|
544 |
-
<h2 class="text-2xl font-bold mb-4 text-
|
545 |
|
546 |
<div class="grid md:grid-cols-2 gap-6">
|
547 |
-
<div class="bg-
|
548 |
-
<h3 class="font-bold text-
|
|
|
|
|
549 |
<ul class="list-disc pl-5 space-y-1 text-gray-700">
|
550 |
-
<li
|
551 |
-
<li
|
552 |
-
<li
|
|
|
553 |
</ul>
|
554 |
</div>
|
555 |
|
556 |
-
<div class="bg-
|
557 |
-
<h3 class="font-bold text-purple-
|
|
|
|
|
558 |
<ul class="list-disc pl-5 space-y-1 text-gray-700">
|
559 |
-
<li
|
560 |
-
<li
|
561 |
-
<li
|
|
|
562 |
</ul>
|
563 |
</div>
|
564 |
</div>
|
565 |
</section>
|
566 |
|
567 |
-
<!-- Final
|
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
|
570 |
|
571 |
<div class="space-y-4">
|
572 |
<div class="flex items-start">
|
@@ -574,7 +463,7 @@ end)</pre>
|
|
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">
|
578 |
</div>
|
579 |
</div>
|
580 |
|
@@ -583,7 +472,7 @@ end)</pre>
|
|
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">
|
587 |
</div>
|
588 |
</div>
|
589 |
|
@@ -592,7 +481,7 @@ end)</pre>
|
|
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">
|
596 |
</div>
|
597 |
</div>
|
598 |
|
@@ -601,7 +490,7 @@ end)</pre>
|
|
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">
|
605 |
</div>
|
606 |
</div>
|
607 |
</div>
|
@@ -609,46 +498,44 @@ end)</pre>
|
|
609 |
|
610 |
<!-- Footer -->
|
611 |
<footer class="mt-12 text-center text-gray-600">
|
612 |
-
<p>© 2023 Roblox Cookie
|
|
|
613 |
</footer>
|
614 |
</div>
|
615 |
|
616 |
<script>
|
617 |
-
//
|
618 |
-
document.querySelectorAll('.
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
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 |
-
//
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
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>
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Cookie Model Creation 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 |
+
.step-card {
|
11 |
+
transition: all 0.3s ease;
|
12 |
+
perspective: 1000px;
|
|
|
|
|
|
|
|
|
13 |
}
|
14 |
|
15 |
+
.step-card:hover {
|
16 |
+
transform: translateY(-5px);
|
17 |
+
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
|
18 |
}
|
19 |
|
20 |
+
.step-card-inner {
|
21 |
+
position: relative;
|
22 |
+
width: 100%;
|
23 |
+
height: 100%;
|
24 |
+
transition: transform 0.6s;
|
25 |
+
transform-style: preserve-3d;
|
26 |
}
|
27 |
|
28 |
+
.step-card:hover .step-card-inner {
|
29 |
+
transform: rotateY(5deg);
|
30 |
+
}
|
31 |
+
|
32 |
+
.image-container {
|
33 |
+
border-radius: 0.5rem;
|
34 |
+
overflow: hidden;
|
35 |
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
36 |
+
}
|
37 |
+
|
38 |
+
.image-container img {
|
39 |
+
transition: transform 0.3s ease;
|
40 |
}
|
41 |
|
42 |
+
.image-container:hover img {
|
43 |
+
transform: scale(1.03);
|
|
|
44 |
}
|
45 |
|
46 |
+
.tooltip {
|
47 |
+
position: relative;
|
48 |
+
display: inline-block;
|
49 |
}
|
50 |
|
51 |
+
.tooltip .tooltiptext {
|
52 |
+
visibility: hidden;
|
53 |
+
width: 200px;
|
54 |
+
background-color: #555;
|
55 |
+
color: #fff;
|
56 |
+
text-align: center;
|
57 |
+
border-radius: 6px;
|
58 |
+
padding: 5px;
|
59 |
+
position: absolute;
|
60 |
+
z-index: 1;
|
61 |
+
bottom: 125%;
|
62 |
+
left: 50%;
|
63 |
+
margin-left: -100px;
|
64 |
+
opacity: 0;
|
65 |
+
transition: opacity 0.3s;
|
66 |
}
|
67 |
|
68 |
+
.tooltip:hover .tooltiptext {
|
69 |
+
visibility: visible;
|
70 |
+
opacity: 1;
|
71 |
}
|
72 |
|
73 |
+
@keyframes pulse {
|
74 |
+
0% { transform: scale(1); }
|
75 |
+
50% { transform: scale(1.05); }
|
76 |
+
100% { transform: scale(1); }
|
77 |
+
}
|
78 |
+
|
79 |
+
.pulse {
|
80 |
+
animation: pulse 2s infinite;
|
81 |
}
|
82 |
</style>
|
83 |
</head>
|
|
|
87 |
<header class="bg-gradient-to-r from-amber-600 to-amber-800 text-white rounded-xl p-6 mb-8 shadow-lg">
|
88 |
<div class="flex items-center justify-between">
|
89 |
<div>
|
90 |
+
<h1 class="text-4xl font-bold mb-2">Cookie Model Creation Guide</h1>
|
91 |
+
<p class="text-xl opacity-90">Step-by-step visual tutorial for creating a clickable cookie in Roblox</p>
|
92 |
</div>
|
93 |
+
<div class="bg-white/20 p-4 rounded-full pulse">
|
94 |
<i class="fas fa-cookie-bite text-4xl"></i>
|
95 |
</div>
|
96 |
</div>
|
97 |
</header>
|
98 |
|
99 |
+
<!-- Introduction -->
|
100 |
<section class="bg-white rounded-xl p-6 mb-8 shadow-md">
|
101 |
+
<h2 class="text-2xl font-bold mb-4 text-gray-800 border-b pb-2">Introduction</h2>
|
102 |
+
<p class="text-gray-700 mb-4">This guide will walk you through creating a 3D cookie model in Roblox Studio that players can click to earn points. We'll cover everything from basic part creation to adding visual effects.</p>
|
103 |
|
104 |
+
<div class="bg-blue-50 border-l-4 border-blue-500 p-4 rounded-lg">
|
105 |
+
<div class="flex items-start">
|
106 |
+
<div class="flex-shrink-0 pt-1">
|
107 |
+
<i class="fas fa-info-circle text-blue-600 text-xl"></i>
|
108 |
+
</div>
|
109 |
+
<div class="ml-3">
|
110 |
+
<h3 class="text-lg font-medium text-blue-900">Before You Begin</h3>
|
111 |
+
<div class="mt-1 text-blue-800">
|
112 |
+
<p>Make sure you have Roblox Studio installed and a basic understanding of the interface. We'll be working in the 3D view and Explorer panel.</p>
|
113 |
+
</div>
|
114 |
</div>
|
|
|
|
|
115 |
</div>
|
116 |
+
</div>
|
117 |
+
</section>
|
118 |
+
|
119 |
+
<!-- Step-by-Step Guide -->
|
120 |
+
<section class="bg-white rounded-xl p-6 mb-8 shadow-md">
|
121 |
+
<h2 class="text-2xl font-bold mb-6 text-gray-800 border-b pb-2">Step-by-Step Creation</h2>
|
122 |
+
|
123 |
+
<!-- Step 1 -->
|
124 |
+
<div class="step-card bg-amber-50 border border-amber-200 rounded-lg p-6 mb-6">
|
125 |
+
<div class="step-card-inner">
|
126 |
+
<div class="flex flex-col md:flex-row gap-6">
|
127 |
+
<div class="md:w-1/2">
|
128 |
+
<h3 class="text-xl font-bold mb-3 text-amber-800 flex items-center">
|
129 |
+
<span class="bg-amber-600 text-white rounded-full w-8 h-8 flex items-center justify-center mr-3">1</span>
|
130 |
+
Create the Base Part
|
131 |
+
</h3>
|
132 |
+
<ol class="list-decimal pl-5 space-y-2 text-gray-700">
|
133 |
+
<li>Open Roblox Studio and create a new Baseplate</li>
|
134 |
+
<li>Go to the <strong>Home</strong> tab and click <strong>Part</strong></li>
|
135 |
+
<li>In the Properties window:
|
136 |
+
<ul class="list-disc pl-5 mt-1">
|
137 |
+
<li>Set <span class="font-mono bg-gray-200 px-1 rounded">Name</span> to "Cookie"</li>
|
138 |
+
<li>Set <span class="font-mono bg-gray-200 px-1 rounded">Size</span> to (4, 1, 4)</li>
|
139 |
+
<li>Set <span class="font-mono bg-gray-200 px-1 rounded">Shape</span> to Cylinder</li>
|
140 |
+
</ul>
|
141 |
+
</li>
|
142 |
+
</ol>
|
143 |
+
</div>
|
144 |
+
<div class="md:w-1/2 image-container">
|
145 |
+
<img src="https://tr.rbxcdn.com/9f1e5a7d4b4b0c0c1b4f5f5f5f5f5f5f/420/420/Image/Png" alt="Creating a cylinder part" class="w-full h-auto rounded-lg">
|
146 |
+
<p class="text-sm text-gray-500 mt-1 text-center">Creating a cylinder part in Roblox Studio</p>
|
147 |
+
</div>
|
148 |
</div>
|
|
|
|
|
149 |
</div>
|
150 |
+
</div>
|
151 |
+
|
152 |
+
<!-- Step 2 -->
|
153 |
+
<div class="step-card bg-amber-50 border border-amber-200 rounded-lg p-6 mb-6">
|
154 |
+
<div class="step-card-inner">
|
155 |
+
<div class="flex flex-col md:flex-row gap-6">
|
156 |
+
<div class="md:w-1/2">
|
157 |
+
<h3 class="text-xl font-bold mb-3 text-amber-800 flex items-center">
|
158 |
+
<span class="bg-amber-600 text-white rounded-full w-8 h-8 flex items-center justify-center mr-3">2</span>
|
159 |
+
Customize Appearance
|
160 |
+
</h3>
|
161 |
+
<ol class="list-decimal pl-5 space-y-2 text-gray-700">
|
162 |
+
<li>With the part selected, go to Properties</li>
|
163 |
+
<li>Set these properties:
|
164 |
+
<ul class="list-disc pl-5 mt-1">
|
165 |
+
<li><span class="font-mono bg-gray-200 px-1 rounded">Material</span>: Sand</li>
|
166 |
+
<li><span class="font-mono bg-gray-200 px-1 rounded">Color</span>: Brown (RGB 139, 69, 19)</li>
|
167 |
+
<li><span class="font-mono bg-gray-200 px-1 rounded">Anchored</span>: Checked ✔️</li>
|
168 |
+
<li><span class="font-mono bg-gray-200 px-1 rounded">CanCollide</span>: Checked ✔️</li>
|
169 |
+
</ul>
|
170 |
+
</li>
|
171 |
+
<li>Position the cookie above the baseplate</li>
|
172 |
+
</ol>
|
173 |
+
</div>
|
174 |
+
<div class="md:w-1/2 image-container">
|
175 |
+
<img src="https://tr.rbxcdn.com/9f1e5a7d4b4b0c0c1b4f5f5f5f5f5f5f/420/420/Image/Png" alt="Customizing part properties" class="w-full h-auto rounded-lg">
|
176 |
+
<p class="text-sm text-gray-500 mt-1 text-center">Setting part properties for cookie appearance</p>
|
177 |
+
</div>
|
178 |
</div>
|
|
|
|
|
179 |
</div>
|
180 |
</div>
|
181 |
|
182 |
+
<!-- Step 3 -->
|
183 |
+
<div class="step-card bg-amber-50 border border-amber-200 rounded-lg p-6 mb-6">
|
184 |
+
<div class="step-card-inner">
|
185 |
+
<div class="flex flex-col md:flex-row gap-6">
|
186 |
+
<div class="md:w-1/2">
|
187 |
+
<h3 class="text-xl font-bold mb-3 text-amber-800 flex items-center">
|
188 |
+
<span class="bg-amber-600 text-white rounded-full w-8 h-8 flex items-center justify-center mr-3">3</span>
|
189 |
+
Add Chocolate Chips
|
190 |
+
</h3>
|
191 |
+
<ol class="list-decimal pl-5 space-y-2 text-gray-700">
|
192 |
+
<li>Create small spherical parts (Size 0.5, 0.5, 0.5)</li>
|
193 |
+
<li>Set their:
|
194 |
+
<ul class="list-disc pl-5 mt-1">
|
195 |
+
<li><span class="font-mono bg-gray-200 px-1 rounded">Material</span>: Plastic</li>
|
196 |
+
<li><span class="font-mono bg-gray-200 px-1 rounded">Color</span>: Dark brown (RGB 60, 35, 10)</li>
|
197 |
+
</ul>
|
198 |
+
</li>
|
199 |
+
<li>Position them on top of the cookie</li>
|
200 |
+
<li>Select all chips and group them (Ctrl+G)</li>
|
201 |
+
<li>Name the group "ChocolateChips"</li>
|
202 |
+
</ol>
|
203 |
+
</div>
|
204 |
+
<div class="md:w-1/2 image-container">
|
205 |
+
<img src="https://tr.rbxcdn.com/9f1e5a7d4b4b0c0c1b4f5f5f5f5f5f5f/420/420/Image/Png" alt="Adding chocolate chips" class="w-full h-auto rounded-lg">
|
206 |
+
<p class="text-sm text-gray-500 mt-1 text-center">Creating and positioning chocolate chips</p>
|
207 |
+
</div>
|
208 |
</div>
|
209 |
+
</div>
|
210 |
+
</div>
|
211 |
+
|
212 |
+
<!-- Step 4 -->
|
213 |
+
<div class="step-card bg-amber-50 border border-amber-200 rounded-lg p-6 mb-6">
|
214 |
+
<div class="step-card-inner">
|
215 |
+
<div class="flex flex-col md:flex-row gap-6">
|
216 |
+
<div class="md:w-1/2">
|
217 |
+
<h3 class="text-xl font-bold mb-3 text-amber-800 flex items-center">
|
218 |
+
<span class="bg-amber-600 text-white rounded-full w-8 h-8 flex items-center justify-center mr-3">4</span>
|
219 |
+
Add Click Detection
|
220 |
+
</h3>
|
221 |
+
<ol class="list-decimal pl-5 space-y-2 text-gray-700">
|
222 |
+
<li>Right-click the Cookie part in Explorer</li>
|
223 |
+
<li>Select <strong>Insert Object</strong> → <strong>ClickDetector</strong></li>
|
224 |
+
<li>In ClickDetector properties:
|
225 |
+
<ul class="list-disc pl-5 mt-1">
|
226 |
+
<li><span class="font-mono bg-gray-200 px-1 rounded">MaxActivationDistance</span>: 10</li>
|
227 |
+
<li><span class="font-mono bg-gray-200 px-1 rounded">CursorIcon</span>: (optional) Custom cursor</li>
|
228 |
+
</ul>
|
229 |
+
</li>
|
230 |
+
<li>Test by clicking the cookie in Play mode</li>
|
231 |
+
</ol>
|
232 |
+
</div>
|
233 |
+
<div class="md:w-1/2 image-container">
|
234 |
+
<img src="https://tr.rbxcdn.com/9f1e5a7d4b4b0c0c1b4f5f5f5f5f5f5f/420/420/Image/Png" alt="Adding ClickDetector" class="w-full h-auto rounded-lg">
|
235 |
+
<p class="text-sm text-gray-500 mt-1 text-center">Inserting and configuring a ClickDetector</p>
|
236 |
</div>
|
237 |
</div>
|
238 |
</div>
|
239 |
</div>
|
|
|
|
|
|
|
|
|
|
|
240 |
|
241 |
+
<!-- Step 5 -->
|
242 |
+
<div class="step-card bg-amber-50 border border-amber-200 rounded-lg p-6 mb-6">
|
243 |
+
<div class="step-card-inner">
|
244 |
+
<div class="flex flex-col md:flex-row gap-6">
|
245 |
+
<div class="md:w-1/2">
|
246 |
+
<h3 class="text-xl font-bold mb-3 text-amber-800 flex items-center">
|
247 |
+
<span class="bg-amber-600 text-white rounded-full w-8 h-8 flex items-center justify-center mr-3">5</span>
|
248 |
+
Add Visual Effects
|
249 |
+
</h3>
|
250 |
+
<ol class="list-decimal pl-5 space-y-2 text-gray-700">
|
251 |
+
<li>Right-click Cookie → <strong>Insert Object</strong> → <strong>ParticleEmitter</strong></li>
|
252 |
+
<li>Configure the emitter:
|
253 |
+
<ul class="list-disc pl-5 mt-1">
|
254 |
+
<li><span class="font-mono bg-gray-200 px-1 rounded">Texture</span>: Use crumb texture (ID 9430770660)</li>
|
255 |
+
<li><span class="font-mono bg-gray-200 px-1 rounded">LightEmission</span>: 0.5</li>
|
256 |
+
<li><span class="font-mono bg-gray-200 px-1 rounded">Size</span>: 0.3</li>
|
257 |
+
<li><span class="font-mono bg-gray-200 px-1 rounded">Speed</span>: 2</li>
|
258 |
+
<li><span class="font-mono bg-gray-200 px-1 rounded">Enabled</span>: False (we'll trigger this in code)</li>
|
259 |
+
</ul>
|
260 |
+
</li>
|
261 |
+
<li>Name the emitter "ClickEffect"</li>
|
262 |
+
</ol>
|
263 |
+
</div>
|
264 |
+
<div class="md:w-1/2 image-container">
|
265 |
+
<img src="https://tr.rbxcdn.com/9f1e5a7d4b4b0c0c1b4f5f5f5f5f5f5f/420/420/Image/Png" alt="Configuring ParticleEmitter" class="w-full h-auto rounded-lg">
|
266 |
+
<p class="text-sm text-gray-500 mt-1 text-center">Setting up visual click effects</p>
|
267 |
+
</div>
|
268 |
+
</div>
|
269 |
+
</div>
|
270 |
</div>
|
271 |
|
272 |
+
<!-- Step 6 -->
|
273 |
+
<div class="step-card bg-amber-50 border border-amber-200 rounded-lg p-6 mb-6">
|
274 |
+
<div class="step-card-inner">
|
275 |
+
<div class="flex flex-col md:flex-row gap-6">
|
276 |
+
<div class="md:w-1/2">
|
277 |
+
<h3 class="text-xl font-bold mb-3 text-amber-800 flex items-center">
|
278 |
+
<span class="bg-amber-600 text-white rounded-full w-8 h-8 flex items-center justify-center mr-3">6</span>
|
279 |
+
Add Sound Effects
|
280 |
+
</h3>
|
281 |
+
<ol class="list-decimal pl-5 space-y-2 text-gray-700">
|
282 |
+
<li>Right-click Cookie → <strong>Insert Object</strong> → <strong>Sound</strong></li>
|
283 |
+
<li>Configure the sound:
|
284 |
+
<ul class="list-disc pl-5 mt-1">
|
285 |
+
<li><span class="font-mono bg-gray-200 px-1 rounded">SoundId</span>: Use cookie crunch sound (ID 357420354)</li>
|
286 |
+
<li><span class="font-mono bg-gray-200 px-1 rounded">Volume</span>: 0.5</li>
|
287 |
+
<li><span class="font-mono bg-gray-200 px-1 rounded">PlayOnRemove</span>: False</li>
|
288 |
+
</ul>
|
289 |
+
</li>
|
290 |
+
<li>Name the sound "ClickSound"</li>
|
291 |
+
<li>Test in Play mode to verify sound plays</li>
|
292 |
+
</ol>
|
293 |
+
</div>
|
294 |
+
<div class="md:w-1/2 image-container">
|
295 |
+
<img src="https://tr.rbxcdn.com/9f1e5a7d4b4b0c0c1b4f5f5f5f5f5f5f/420/420/Image/Png" alt="Adding sound effects" class="w-full h-auto rounded-lg">
|
296 |
+
<p class="text-sm text-gray-500 mt-1 text-center">Configuring click sound effects</p>
|
297 |
+
</div>
|
298 |
</div>
|
299 |
</div>
|
300 |
+
</div>
|
301 |
+
|
302 |
+
<!-- Final Result -->
|
303 |
+
<div class="bg-green-50 border border-green-200 rounded-lg p-6 mb-6">
|
304 |
+
<h3 class="text-xl font-bold mb-4 text-green-800 flex items-center">
|
305 |
+
<i class="fas fa-check-circle mr-3"></i> Final Cookie Model Structure
|
306 |
+
</h3>
|
307 |
|
308 |
+
<div class="flex flex-col md:flex-row gap-6 items-center">
|
309 |
+
<div class="md:w-1/2">
|
310 |
+
<div class="bg-gray-800 text-green-400 p-4 rounded-lg font-mono text-sm overflow-x-auto">
|
311 |
+
<pre>Workspace
|
312 |
+
└── Cookie (Part)
|
313 |
+
├── ClickDetector
|
314 |
+
├── ClickEffect (ParticleEmitter)
|
315 |
+
├── ClickSound (Sound)
|
316 |
+
└── ChocolateChips (Model)
|
317 |
+
├── ChocolateChip1 (Part)
|
318 |
+
├── ChocolateChip2 (Part)
|
319 |
+
└── ...</pre>
|
320 |
+
</div>
|
321 |
+
</div>
|
322 |
+
<div class="md:w-1/2 image-container">
|
323 |
+
<img src="https://tr.rbxcdn.com/9f1e5a7d4b4b0c0c1b4f5f5f5f5f5f5f/420/420/Image/Png" alt="Final cookie model" class="w-full h-auto rounded-lg">
|
324 |
+
<p class="text-sm text-gray-500 mt-1 text-center">Completed cookie model in Roblox Studio</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
325 |
</div>
|
326 |
</div>
|
327 |
</div>
|
328 |
+
</section>
|
329 |
+
|
330 |
+
<!-- Scripting Section -->
|
331 |
+
<section class="bg-white rounded-xl p-6 mb-8 shadow-md">
|
332 |
+
<h2 class="text-2xl font-bold mb-4 text-gray-800 border-b pb-2">Adding Functionality with Scripts</h2>
|
333 |
|
334 |
+
<div class="mb-6">
|
335 |
+
<h3 class="text-xl font-bold mb-3 text-gray-800">1. Basic Click Script</h3>
|
336 |
+
<p class="text-gray-700 mb-3">Create a Script in ServerScriptService to handle cookie clicks:</p>
|
337 |
|
338 |
+
<div class="bg-gray-800 text-gray-100 p-4 rounded-lg font-mono text-sm overflow-x-auto mb-4">
|
339 |
+
<pre>-- ServerScriptService/CookieClickHandler.lua
|
|
|
|
|
|
|
340 |
local cookie = workspace:WaitForChild("Cookie")
|
341 |
local clickDetector = cookie:WaitForChild("ClickDetector")
|
342 |
|
343 |
clickDetector.MouseClick:Connect(function(player)
|
344 |
-- Get player's leaderstats
|
345 |
local leaderstats = player:FindFirstChild("leaderstats")
|
346 |
+
if not leaderstats then return end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
347 |
|
348 |
+
local cookies = leaderstats:FindFirstChild("Cookies")
|
349 |
+
if not cookies then return end
|
350 |
|
351 |
+
-- Increment cookie count
|
352 |
+
cookies.Value = cookies.Value + 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
353 |
|
354 |
+
-- Play sound effect
|
355 |
+
local sound = cookie:FindFirstChild("ClickSound")
|
356 |
+
if sound then
|
357 |
+
sound:Play()
|
358 |
+
end
|
359 |
|
360 |
+
-- Show particle effect
|
361 |
+
local emitter = cookie:FindFirstChild("ClickEffect")
|
362 |
+
if emitter then
|
363 |
+
emitter.Enabled = true
|
364 |
+
wait(0.2)
|
365 |
+
emitter.Enabled = false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
366 |
end
|
367 |
+
|
368 |
+
-- Small animation
|
369 |
+
local originalSize = cookie.Size
|
370 |
+
cookie.Size = originalSize * 0.95
|
371 |
+
wait(0.1)
|
372 |
+
cookie.Size = originalSize
|
373 |
+
end)</pre>
|
374 |
</div>
|
375 |
|
376 |
+
<div class="bg-blue-50 border-l-4 border-blue-500 p-4 rounded-lg">
|
377 |
+
<div class="flex items-start">
|
378 |
+
<div class="flex-shrink-0 pt-1">
|
379 |
+
<i class="fas fa-code text-blue-600"></i>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
</div>
|
381 |
+
<div class="ml-3">
|
382 |
+
<h3 class="text-lg font-medium text-blue-900">Script Explanation</h3>
|
383 |
+
<div class="mt-1 text-blue-800 text-sm">
|
384 |
+
<p>This script listens for clicks on the cookie and:</p>
|
385 |
+
<ul class="list-disc pl-5 mt-1">
|
386 |
+
<li>Increments the player's cookie count</li>
|
387 |
+
<li>Plays a crunch sound effect</li>
|
388 |
+
<li>Triggers particle effects</li>
|
389 |
+
<li>Adds a small "squish" animation</li>
|
390 |
+
</ul>
|
391 |
+
</div>
|
392 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
393 |
</div>
|
394 |
</div>
|
395 |
</div>
|
396 |
|
397 |
+
<div class="mb-6">
|
398 |
+
<h3 class="text-xl font-bold mb-3 text-gray-800">2. Leaderstats Setup</h3>
|
399 |
+
<p class="text-gray-700 mb-3">Add this script to create player statistics:</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
400 |
|
401 |
+
<div class="bg-gray-800 text-gray-100 p-4 rounded-lg font-mono text-sm overflow-x-auto">
|
402 |
+
<pre>-- ServerScriptService/PlayerStatsSetup.lua
|
|
|
|
|
|
|
403 |
game.Players.PlayerAdded:Connect(function(player)
|
404 |
+
-- Create leaderstats folder
|
405 |
+
local leaderstats = Instance.new("Folder")
|
406 |
+
leaderstats.Name = "leaderstats"
|
407 |
+
leaderstats.Parent = player
|
408 |
|
409 |
+
-- Create cookies value
|
410 |
+
local cookies = Instance.new("IntValue")
|
411 |
+
cookies.Name = "Cookies"
|
412 |
+
cookies.Value = 0
|
413 |
+
cookies.Parent = leaderstats
|
414 |
+
|
415 |
+
-- Optional: Create CPS (Cookies Per Second) value
|
416 |
+
local cps = Instance.new("IntValue")
|
417 |
+
cps.Name = "CPS"
|
418 |
+
cps.Value = 0
|
419 |
+
cps.Parent = leaderstats
|
420 |
end)</pre>
|
|
|
421 |
</div>
|
422 |
</div>
|
423 |
</section>
|
424 |
|
425 |
+
<!-- Advanced Tips -->
|
426 |
+
<section class="bg-purple-50 border border-purple-200 rounded-xl p-6 mb-8">
|
427 |
+
<h2 class="text-2xl font-bold mb-4 text-purple-800 border-b border-purple-300 pb-2">Advanced Enhancement Tips</h2>
|
428 |
|
429 |
<div class="grid md:grid-cols-2 gap-6">
|
430 |
+
<div class="bg-white p-4 rounded-lg shadow-sm">
|
431 |
+
<h3 class="font-bold text-purple-700 mb-3 flex items-center">
|
432 |
+
<i class="fas fa-star mr-2 text-yellow-500"></i> Visual Enhancements
|
433 |
+
</h3>
|
434 |
<ul class="list-disc pl-5 space-y-1 text-gray-700">
|
435 |
+
<li>Add a <strong>SurfaceGui</strong> with cookie texture for more realism</li>
|
436 |
+
<li>Create multiple cookie models with different toppings</li>
|
437 |
+
<li>Add glow effects for special cookies</li>
|
438 |
+
<li>Implement cookie "cracking" animation when clicked</li>
|
439 |
</ul>
|
440 |
</div>
|
441 |
|
442 |
+
<div class="bg-white p-4 rounded-lg shadow-sm">
|
443 |
+
<h3 class="font-bold text-purple-700 mb-3 flex items-center">
|
444 |
+
<i class="fas fa-cogs mr-2 text-blue-500"></i> Functional Enhancements
|
445 |
+
</h3>
|
446 |
<ul class="list-disc pl-5 space-y-1 text-gray-700">
|
447 |
+
<li>Add critical hits (random chance for bonus cookies)</li>
|
448 |
+
<li>Implement cookie combos (faster clicks = multipliers)</li>
|
449 |
+
<li>Create power-ups that temporarily boost click value</li>
|
450 |
+
<li>Add achievement system for milestones</li>
|
451 |
</ul>
|
452 |
</div>
|
453 |
</div>
|
454 |
</section>
|
455 |
|
456 |
+
<!-- Final Notes -->
|
457 |
<section class="bg-amber-100 border border-amber-200 rounded-xl p-6 shadow-md">
|
458 |
+
<h2 class="text-2xl font-bold mb-4 text-amber-900 border-b border-amber-300 pb-2">Final Notes</h2>
|
459 |
|
460 |
<div class="space-y-4">
|
461 |
<div class="flex items-start">
|
|
|
463 |
<i class="fas fa-check-circle text-amber-700"></i>
|
464 |
</div>
|
465 |
<div class="ml-3">
|
466 |
+
<p class="text-amber-900 font-medium">Test your cookie model thoroughly in different lighting conditions</p>
|
467 |
</div>
|
468 |
</div>
|
469 |
|
|
|
472 |
<i class="fas fa-check-circle text-amber-700"></i>
|
473 |
</div>
|
474 |
<div class="ml-3">
|
475 |
+
<p class="text-amber-900 font-medium">Consider performance - too many particles can lag the game</p>
|
476 |
</div>
|
477 |
</div>
|
478 |
|
|
|
481 |
<i class="fas fa-check-circle text-amber-700"></i>
|
482 |
</div>
|
483 |
<div class="ml-3">
|
484 |
+
<p class="text-amber-900 font-medium">Document your asset IDs for easy reference later</p>
|
485 |
</div>
|
486 |
</div>
|
487 |
|
|
|
490 |
<i class="fas fa-check-circle text-amber-700"></i>
|
491 |
</div>
|
492 |
<div class="ml-3">
|
493 |
+
<p class="text-amber-900 font-medium">Create variations of your cookie model for different game modes</p>
|
494 |
</div>
|
495 |
</div>
|
496 |
</div>
|
|
|
498 |
|
499 |
<!-- Footer -->
|
500 |
<footer class="mt-12 text-center text-gray-600">
|
501 |
+
<p>© 2023 Roblox Cookie Model Guide | Created with <i class="fas fa-cookie-bite text-amber-600"></i> for aspiring developers</p>
|
502 |
+
<p class="text-sm mt-2">Note: Placeholder images shown - replace with actual screenshots from your Roblox Studio</p>
|
503 |
</footer>
|
504 |
</div>
|
505 |
|
506 |
<script>
|
507 |
+
// Add tooltip functionality
|
508 |
+
document.querySelectorAll('.tooltip').forEach(el => {
|
509 |
+
el.addEventListener('mouseenter', function() {
|
510 |
+
this.querySelector('.tooltiptext').style.opacity = '1';
|
511 |
+
this.querySelector('.tooltiptext').style.visibility = 'visible';
|
512 |
+
});
|
513 |
+
|
514 |
+
el.addEventListener('mouseleave', function() {
|
515 |
+
this.querySelector('.tooltiptext').style.opacity = '0';
|
516 |
+
this.querySelector('.tooltiptext').style.visibility = 'hidden';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
517 |
});
|
518 |
});
|
519 |
|
520 |
+
// Add animation to step cards on scroll
|
521 |
+
const observerOptions = {
|
522 |
+
threshold: 0.1
|
523 |
+
};
|
524 |
+
|
525 |
+
const observer = new IntersectionObserver((entries) => {
|
526 |
+
entries.forEach(entry => {
|
527 |
+
if (entry.isIntersecting) {
|
528 |
+
entry.target.style.opacity = '1';
|
529 |
+
entry.target.style.transform = 'translateY(0)';
|
530 |
+
}
|
|
|
531 |
});
|
532 |
+
}, observerOptions);
|
533 |
+
|
534 |
+
document.querySelectorAll('.step-card').forEach((card, index) => {
|
535 |
+
card.style.opacity = '0';
|
536 |
+
card.style.transform = 'translateY(20px)';
|
537 |
+
card.style.transition = `all 0.5s ease ${index * 0.1}s`;
|
538 |
+
observer.observe(card);
|
539 |
});
|
540 |
</script>
|
541 |
<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>
|