-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.lua
More file actions
77 lines (31 loc) · 2 KB
/
main.lua
File metadata and controls
77 lines (31 loc) · 2 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
local UserInputService = game:GetService("UserInputService")
local StarterGui = game:GetService("StarterGui")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local hrp = character:WaitForChild("HumanoidRootPart")
local humanoid = character:WaitForChild("Humanoid")
-- ตั้งค่าแรงพุ่ง (ปรับตามใจชอบ)
local UPWARD_FORCE = 100
local BOUNCE_KEY = Enum.KeyCode.X
-- ฟังก์ชันสำหรับแสดงการแจ้งเตือนแบบ Badge
local function showNotification()
StarterGui:SetCore("SendNotification", {
Title = "ระบบ เด้งตัวขึ้น ทำโดย siw", -- หัวข้อ
Text = "ระบบ เด้งตัว ทำงานเสร็จสิ้น", -- ข้อความที่ต้องการ
Duration = 3, -- แสดงค้างไว้กี่วินาที
-- Icon สามารถใส่ Asset ID ได้ (ถ้ามี)
})
end
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == BOUNCE_KEY then
-- 1. ทำให้กดรัวๆ กลางอากาศได้
humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
-- 2. รีเซ็ตแรงแนวตั้งและพุ่งขึ้น (เพื่อให้พุ่งนิ่ง ไม่ทับซ้อนแรงเดิม)
hrp.AssemblyLinearVelocity = Vector3.new(hrp.AssemblyLinearVelocity.X, UPWARD_FORCE, hrp.AssemblyLinearVelocity.Z)
-- 3. แสดงคำพูดแจ้งเตือนข้างหน้าจอ
showNotification()
print("ทำงานเสร็จสิ้น สคริปโดย siw")
end
end)