-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
303 lines (286 loc) · 11.6 KB
/
Copy pathindex.html
File metadata and controls
303 lines (286 loc) · 11.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HUNG-TOOL HACK FREE FIRE 2025</title>
<script src="https://cdn.jsdelivr.net/npm/react@18.2.0/umd/react.production.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/react-dom@18.2.0/umd/react-dom.production.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/babel-standalone@7.22.9/babel.min.js"></script>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-900 text-white font-mono">
<div id="root"></div>
<script type="text/babel">
const App = () => {
const [userId, setUserId] = React.useState('');
const [userData, setUserData] = React.useState({});
const [view, setView] = React.useState('selectId');
const [newId, setNewId] = React.useState('');
const [typingText, setTypingText] = React.useState('');
const [isTyping, setIsTyping] = React.useState(false);
const [hackStatus, setHackStatus] = React.useState('');
const [countdown, setCountdown] = React.useState(20);
const [elapsedSeconds, setElapsedSeconds] = React.useState(0);
const [isHacking, setIsHacking] = React.useState(false);
// Load user data from localStorage
React.useEffect(() => {
const storedData = localStorage.getItem('user_data');
if (storedData) {
setUserData(JSON.parse(storedData));
}
}, []);
// Save user data to localStorage
const saveUserData = (data) => {
setUserData(data);
localStorage.setItem('user_data', JSON.stringify(data));
};
// Typing effect
const printTyping = (text, callback) => {
setIsTyping(true);
setTypingText('');
let i = 0;
const interval = setInterval(() => {
if (i < text.length) {
setTypingText(prev => prev + text[i]);
i++;
} else {
clearInterval(interval);
setIsTyping(false);
if (callback) callback();
}
}, 30);
};
// Validate ID
const isValidId = (id) => /^\d{8,11}$/.test(id);
// Handle new ID submission
const handleNewId = () => {
if (isValidId(newId)) {
const updatedData = { ...userData, [newId]: { total_diamonds: 0 } };
saveUserData(updatedData);
setUserId(newId);
setView('menu');
setNewId('');
} else {
alert('ID không hợp lệ! ID Free Fire phải là 8-11 chữ số.');
}
};
// Hack diamonds simulation
const hackDiamonds = () => {
setView('hackDiamonds');
setHackStatus('Đang kết nối với server hack kim cương Free Fire...');
let progress = 0;
const progressInterval = setInterval(() => {
progress += 1;
if (progress >= 30) {
clearInterval(progressInterval);
setHackStatus('Nhấn "Dừng" để quay lại menu.');
startHacking();
}
}, 500);
};
const startHacking = () => {
setIsHacking(true);
let localCountdown = 20;
let localElapsed = elapsedSeconds;
const hackInterval = setInterval(() => {
if (localCountdown > 0) {
setCountdown(localCountdown);
localCountdown -= 1;
localElapsed += 1;
setElapsedSeconds(localElapsed);
} else {
const diamonds = Math.floor(Math.random() * 3);
const updatedData = { ...userData };
updatedData[userId].total_diamonds += diamonds;
saveUserData(updatedData);
setHackStatus(`ID ${userId} nhận được ${diamonds} 💎 kim cương | Tổng nhận: ${updatedData[userId].total_diamonds} 💎`);
localCountdown = 20;
setCountdown(20);
}
}, 1000);
// Cleanup on component unmount or stop
return () => clearInterval(hackInterval);
};
const stopHacking = () => {
setIsHacking(false);
setHackStatus(`Đã dừng hack kim cương. Tổng kim cương nhận được: ${userData[userId].total_diamonds} 💎 | Thời gian đã chạy: ${elapsedSeconds}s`);
setTimeout(() => setView('menu'), 1000);
};
// Hack coins (mock failure)
const hackCoins = () => {
setView('hackCoins');
setHackStatus('Đang kết nối với server hack Vàng Free Fire...');
let progress = 0;
const progressInterval = setInterval(() => {
progress += 1;
if (progress >= 30) {
clearInterval(progressInterval);
setHackStatus('Kết nối server thất bại. Vui lòng thử lại sau!');
setTimeout(() => setView('menu'), 3000);
}
}, 500);
};
// Render select ID view
const renderSelectId = () => {
const idList = Object.keys(userData);
return (
<div className="max-w-2xl mx-auto p-4">
<h1 className="text-2xl text-red-500 border-4 border-red-500 p-2 text-center">
HUNG-TOOL HACK FREE FIRE 2025
</h1>
{idList.length === 0 ? (
<div className="mt-4">
<p className="text-green-500">[{(new Date()).toLocaleTimeString()}] Chưa có ID nào được lưu. Vui lòng nhập ID mới.</p>
<input
type="text"
value={newId}
onChange={(e) => setNewId(e.target.value)}
placeholder="Nhập ID game Free Fire (8-11 số)"
className="w-full p-2 mt-2 bg-gray-800 text-white rounded"
/>
<button
onClick={handleNewId}
className="mt-2 px-4 py-2 bg-green-500 text-white rounded hover:bg-green-600"
>
Xác nhận
</button>
</div>
) : (
<div className="mt-4">
<h2 className="text-green-500 border-t-2 border-b-2 border-green-500 py-2">
Danh sách ID
</h2>
{idList.map((id, idx) => (
<div
key={id}
className="flex justify-between p-2 hover:bg-gray-800 cursor-pointer"
onClick={() => {
setUserId(id);
setView('menu');
}}
>
<span className="text-yellow-500">{idx + 1}. ID: <span className="text-cyan-500">{id}</span></span>
<span className="text-yellow-500">Tổng kim cương: {userData[id].total_diamonds} 💎</span>
</div>
))}
<div
className="flex justify-between p-2 hover:bg-gray-800 cursor-pointer"
onClick={() => setView('newId')}
>
<span className="text-yellow-500">{idList.length + 1}. Thêm ID mới</span>
</div>
</div>
)}
</div>
);
};
// Render new ID input view
const renderNewId = () => (
<div className="max-w-2xl mx-auto p-4">
<h1 className="text-2xl text-red-500 border-4 border-red-500 p-2 text-center">
HUNG-TOOL HACK FREE FIRE 2025
</h1>
<div className="mt-4">
<p className="text-yellow-500">Nhập ID game Free Fire (8-11 số):</p>
<input
type="text"
value={newId}
onChange={(e) => setNewId(e.target.value)}
className="w-full p-2 mt-2 bg-gray-800 text-white rounded"
/>
<button
onClick={handleNewId}
className="mt-2 px-4 py-2 bg-green-500 text-white rounded hover:bg-green-600"
>
Xác nhận
</button>
<button
onClick={() => setView('selectId')}
className="mt-2 ml-2 px-4 py-2 bg-gray-500 text-white rounded hover:bg-gray-600"
>
Quay lại
</button>
</div>
</div>
);
// Render main menu
const renderMenu = () => (
<div className="max-w-2xl mx-auto p-4">
<h1 className="text-2xl text-red-500 border-4 border-red-500 p-2 text-center">
HUNG-TOOL HACK FREE FIRE 2025
</h1>
<p className="text-red-500 mt-2">
Lưu ý: Đây là bản kết nối với server của mình.<br />
và đây cũng là bản test server nên kim cương<br />
hay là vàng sẽ về acc sau 24h
</p>
<p className="text-yellow-500 mt-2">
Người chơi: ID: <span className="text-cyan-500">{userId}</span> | Tổng nhận: <span className="text-yellow-500">{userData[userId]?.total_diamonds || 0} 💎</span> <span className="text-green-500">Phiên bản: V1.2</span>
</p>
<div className="border-t-2 border-b-2 border-green-500 mt-4 py-2">
<div
className="p-2 hover:bg-gray-800 cursor-pointer"
onClick={hackDiamonds}
>
<span className="text-yellow-500">1.</span> <span className="text-cyan-500">Hack kim cương <span className="text-green-500">[SERVER ON]</span></span>
</div>
<div
className="p-2 hover:bg-gray-800 cursor-pointer"
onClick={hackCoins}
>
<span className="text-yellow-500">2.</span> <span className="text-cyan-500">Hack vàng <span className="text-red-500">[SERVER OFF]</span></span>
</div>
<div
className="p-2 hover:bg-gray-800 cursor-pointer"
onClick={() => setView('selectId')}
>
<span className="text-yellow-500">3.</span> <span className="text-cyan-500">Thoát tool</span>
</div>
</div>
</div>
);
// Render hack diamonds view
const renderHackDiamonds = () => (
<div className="max-w-2xl mx-auto p-4">
<h1 className="text-2xl text-red-500 border-4 border-red-500 p-2 text-center">
HUNG-TOOL HACK FREE FIRE 2025
</h1>
<p className="text-yellow-500 mt-4">[{new Date().toLocaleTimeString()}] {hackStatus}</p>
{isHacking && (
<div className="mt-4">
<p className="text-green-500">[{countdown}] <span className="text-yellow-500">[{new Date().toLocaleTimeString()}]</span> Đang hack kim cương cho ID <span className="text-cyan-500">{userId}</span>...</p>
<button
onClick={stopHacking}
className="mt-2 px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600"
>
Dừng
</button>
</div>
)}
</div>
);
// Render hack coins view
const renderHackCoins = () => (
<div className="max-w-2xl mx-auto p-4">
<h1 className="text-2xl text-red-500 border-4 border-red-500 p-2 text-center">
HUNG-TOOL HACK FREE FIRE 2025
</h1>
<p className="text-yellow-500 mt-4">[{new Date().toLocaleTimeString()}] {hackStatus}</p>
</div>
);
// Main render
return (
<div>
{view === 'selectId' && renderSelectId()}
{view === 'newId' && renderNewId()}
{view === 'menu' && renderMenu()}
{view === 'hackDiamonds' && renderHackDiamonds()}
{view === 'hackCoins' && renderHackCoins()}
</div>
);
};
ReactDOM.render(<App />, document.getElementById('root'));
</script>
</body>
</html>