· 4 months ago · May 14, 2025, 07:20 AM
1-- Services
2local UIS = game:GetService("UserInputService")
3local screenSize = UIS:GetScreenSize() -- Get screen size for mobile optimization
4local player = game.Players.LocalPlayer
5local gui = Instance.new("ScreenGui")
6gui.Parent = player:WaitForChild("PlayerGui") -- Adding to the player's GUI
7
8-- Create Main Frame (for the entire GUI)
9local mainFrame = Instance.new("Frame")
10mainFrame.Parent = gui -- Add to the ScreenGui
11mainFrame.Size = UDim2.new(0.8, 0, 0.8, 0) -- 80% of the screen width and height
12mainFrame.Position = UDim2.new(0.5, 0, 0.5, 0) -- Centered
13mainFrame.AnchorPoint = Vector2.new(0.5, 0.5) -- Center the frame
14mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) -- Dark background
15
16-- Create Status Label (For Logs/Warnings)
17local statusLabel = Instance.new("TextLabel")
18statusLabel.Parent = mainFrame
19statusLabel.Size = UDim2.new(0.9, 0, 0.15, 0) -- 90% width, 15% height
20statusLabel.Position = UDim2.new(0.05, 0, 0.85, 0) -- Bottom of the screen
21statusLabel.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
22statusLabel.BackgroundTransparency = 1 -- Transparent background
23statusLabel.Text = "No logs yet..."
24statusLabel.TextSize = 16
25
26-- Create FPS Display Label
27local fpsLabel = Instance.new("TextLabel")
28fpsLabel.Parent = mainFrame
29fpsLabel.Size = UDim2.new(0.4, 0, 0.1, 0) -- 40% width
30fpsLabel.Position = UDim2.new(0.05, 0, 0.2, 0) -- Below the theme button
31fpsLabel.Text = "FPS: Loading..."
32fpsLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
33fpsLabel.BackgroundTransparency = 1 -- Transparent background
34
35-- Create Memory Usage Label
36local memoryLabel = Instance.new("TextLabel")
37memoryLabel.Parent = mainFrame
38memoryLabel.Size = UDim2.new(0.4, 0, 0.1, 0) -- 40% width
39memoryLabel.Position = UDim2.new(0.05, 0, 0.3, 0) -- Below FPS label
40memoryLabel.Text = "Memory: Loading..."
41memoryLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
42memoryLabel.BackgroundTransparency = 1
43
44-- Create Settings Button (Opens Settings Menu)
45local settingsButton = Instance.new("TextButton")
46settingsButton.Parent = mainFrame
47settingsButton.Size = UDim2.new(0.2, 0, 0.1, 0) -- 20% width of screen
48settingsButton.Position = UDim2.new(0.75, 0, 0.05, 0) -- Top-right corner
49settingsButton.Text = "Settings"
50settingsButton.TextColor3 = Color3.fromRGB(255, 255, 255)
51settingsButton.BackgroundColor3 = Color3.fromRGB(0, 0, 255) -- Blue background
52
53-- Create Settings Frame
54local settingsFrame = Instance.new("Frame")
55settingsFrame.Parent = mainFrame
56settingsFrame.Size = UDim2.new(0.5, 0, 0.5, 0) -- 50% of screen width, 50% height
57settingsFrame.Position = UDim2.new(0.25, 0, 0.25, 0) -- Centered on the main frame
58settingsFrame.BackgroundColor3 = Color3.fromRGB(60, 60, 60) -- Dark grey background
59settingsFrame.Visible = false -- Hidden by default
60
61-- Create Language Buttons in Settings Frame
62local englishButton = Instance.new("TextButton")
63englishButton.Parent = settingsFrame
64englishButton.Size = UDim2.new(0.8, 0, 0.2, 0) -- 80% width of settings frame
65englishButton.Position = UDim2.new(0.1, 0, 0.1, 0) -- Top of settings
66englishButton.Text = "English"
67englishButton.TextColor3 = Color3.fromRGB(255, 255, 255)
68englishButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) -- Red background
69
70local ukrainianButton = Instance.new("TextButton")
71ukrainianButton.Parent = settingsFrame
72ukrainianButton.Size = UDim2.new(0.8, 0, 0.2, 0)
73ukrainianButton.Position = UDim2.new(0.1, 0, 0.4, 0) -- Below English
74ukrainianButton.Text = "Ukrainian"
75ukrainianButton.TextColor3 = Color3.fromRGB(255, 255, 255)
76ukrainianButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0) -- Green background
77
78local russianButton = Instance.new("TextButton")
79russianButton.Parent = settingsFrame
80russianButton.Size = UDim2.new(0.8, 0, 0.2, 0)
81russianButton.Position = UDim2.new(0.1, 0, 0.7, 0) -- Below Ukrainian
82russianButton.Text = "Russian"
83russianButton.TextColor3 = Color3.fromRGB(255, 255, 255)
84russianButton.BackgroundColor3 = Color3.fromRGB(0, 0, 255) -- Blue background
85
86-- Create Close Settings Button
87local closeSettingsButton = Instance.new("TextButton")
88closeSettingsButton.Parent = settingsFrame
89closeSettingsButton.Size = UDim2.new(0.3, 0, 0.1, 0)
90closeSettingsButton.Position = UDim2.new(0.35, 0, 0.85, 0) -- Bottom center
91closeSettingsButton.Text = "Close"
92closeSettingsButton.TextColor3 = Color3.fromRGB(255, 255, 255)
93closeSettingsButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) -- Red background
94
95-- Password Authentication for login
96local password = "opensesame" -- The password for login
97local passwordInput = Instance.new("TextBox")
98passwordInput.Parent = mainFrame
99passwordInput.Size = UDim2.new(0.4, 0, 0.1, 0) -- Text box for password input
100passwordInput.Position = UDim2.new(0.3, 0, 0.45, 0) -- Centered
101passwordInput.PlaceholderText = "Enter password"
102passwordInput.TextColor3 = Color3.fromRGB(255, 255, 255)
103passwordInput.BackgroundColor3 = Color3.fromRGB(0, 0, 0) -- Black background
104passwordInput.TextSize = 18
105
106local loginButton = Instance.new("TextButton")
107loginButton.Parent = mainFrame
108loginButton.Size = UDim2.new(0.2, 0, 0.1, 0) -- Button for login
109loginButton.Position = UDim2.new(0.4, 0, 0.55, 0) -- Below password input
110loginButton.Text = "Login"
111loginButton.TextColor3 = Color3.fromRGB(255, 255, 255)
112loginButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0) -- Green background
113
114loginButton.MouseButton1Click:Connect(function()
115 if passwordInput.Text == password then
116 updateStatus("Login Successful!", Color3.fromRGB(0, 255, 0)) -- Green success message
117 else
118 updateStatus("Incorrect Password", Color3.fromRGB(255, 0, 0)) -- Red failure message
119 end
120end)
121
122-- Script Execution (loadstring, require, default)
123local scriptHub = Instance.new("Frame")
124scriptHub.Parent = mainFrame
125scriptHub.Size = UDim2.new(0.8, 0, 0.3, 0) -- 80% width, 30% height
126scriptHub.Position = UDim2.new(0.1, 0, 0.55, 0) -- Centered on the bottom part
127scriptHub.BackgroundColor3 = Color3.fromRGB(50, 50, 50) -- Dark background
128
129local scriptInput = Instance.new("TextBox")
130scriptInput.Parent = scriptHub
131scriptInput.Size = UDim2.new(0.9, 0, 0.6, 0) -- 90% width, 60% height of scriptHub
132scriptInput.Position = UDim2.new(0.05, 0, 0.05, 0) -- Inside scriptHub
133scriptInput.PlaceholderText = "Enter Lua script here"
134scriptInput.TextColor3 = Color3.fromRGB(255, 255, 255)
135scriptInput.BackgroundColor3 = Color3.fromRGB(0, 0, 0) -- Black background
136scriptInput.TextSize = 16
137
138local executeButton = Instance.new("TextButton")
139executeButton.Parent = scriptHub
140executeButton.Size = UDim2.new(0.4, 0, 0.2, 0) -- 40% width of scriptHub
141executeButton.Position = UDim2.new(0.3, 0, 0.7, 0) -- Bottom center
142executeButton.Text = "Execute Script"
143executeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
144executeButton.BackgroundColor3 = Color3.fromRGB(0, 255, 255) -- Cyan background
145
146executeButton.MouseButton1Click:Connect(function()
147 local success, result = pcall(function()
148 loadstring(scriptInput.Text)()
149 end)
150
151 if success then
152 updateStatus("Script Executed Successfully!", Color3.fromRGB(0, 255, 0)) -- Success
153 else
154 updateStatus("Script Execution Failed: " .. result, Color3.fromRGB(255, 0, 0)) -- Error message
155 end
156end)
157
158-- Function to update status label
159local function updateStatus(message, color)
160 local currentText = statusLabel.Text
161 currentText = message .. "\n" .. currentText
162
163 local lines = {}
164 for line in currentText:gmatch("([^\n]*)\n?") do
165 table.insert(lines, line)
166 end
167 if #lines > 5 then -- Limit to 5 logs
168 table.remove(lines, #lines)
169 end
170 statusLabel.Text = table.concat(lines, "\n")
171 statusLabel.TextColor3 = color or Color3.fromRGB(255, 255, 255)
172end
173
174-- Function for Draggable GUI
175local dragging, dragInput, dragStart, startPos
176local function updatePosition(input)
177 local delta = input.Position - dragStart
178 mainFrame.Position = UDim2.new(startPos.X.Scale, delta.X, startPos.Y.Scale, delta.Y)
179end
180
181mainFrame.InputBegan:Connect(function(input)
182 if input.UserInputType == Enum.UserInputType.MouseButton1 then
183 dragging = true
184 dragStart = input.Position
185 startPos = mainFrame.Position
186 input.Changed:Connect(function()
187 if input.UserInputState == Enum.UserInputState.End then
188 dragging = false
189 end
190 end)
191 end
192end)
193
194mainFrame.InputChanged:Connect(function(input)
195 if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
196 updatePosition(input)
197 end
198end)
199
200-- Example of updating status
201updateStatus("GulikHub Initialized!", Color3.fromRGB(0, 255, 0)) -- Green for success
202