Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game.StarterGui:SetCore("SendNotification", {
- Title = "Credit To : Augus X";
- Text = "Script Loaded!";
- Icon = "rbxthumb://type=Asset&id=6038460241&w=150&h=150";
- } )
- -- Calculate the center of the screen
- local screenWidth = game:GetService("Workspace").CurrentCamera.ViewportSize.X
- local screenHeight = game:GetService("Workspace").CurrentCamera.ViewportSize.Y
- local centerX = screenWidth / 2
- local centerY = screenHeight / 2
- -- Define the size of the GUI for Android tablets (adjust as needed)
- local guiWidth = 200
- local guiHeight = 150
- -- Create a ScreenGui
- local gui = Instance.new("ScreenGui")
- gui.Name = "ScriptEditor"
- gui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- gui.ResetOnSpawn = false
- -- Create a Frame for the script editor (big-sized tab)
- local frame = Instance.new("Frame")
- frame.Size = UDim2.new(0, guiWidth, 0, guiHeight)
- frame.Position = UDim2.new(0, centerX - (guiWidth / 2), 0, centerY - (guiHeight / 2))
- frame.BackgroundColor3 = Color3.new(1, 1, 1) -- Red color for the tab
- frame.Active = true
- frame.Draggable = true -- Make the frame draggable
- frame.Parent = gui
- -- Create a label for the tab ("FireX")
- local nameLabel = Instance.new("TextLabel")
- nameLabel.Size = UDim2.new(1, 0, 0, 30)
- nameLabel.Position = UDim2.new(0, 0, 0, 0)
- nameLabel.BackgroundColor3 = Color3.new(1, 1, 1)
- nameLabel.TextColor3 = Color3.new(0, 0, 0)
- nameLabel.Font = Enum.Font.Cartoon
- nameLabel.TextSize = 20
- nameLabel.Text = "Simple Executor Gui"
- nameLabel.Parent = frame
- -- Create a TextBox for script input
- local scriptInput = Instance.new("TextBox")
- scriptInput.Size = UDim2.new(1, -20, 1, -90)
- scriptInput.Position = UDim2.new(0, 10, 0, 40)
- scriptInput.BackgroundColor3 = Color3.new(0, 0, 0)
- scriptInput.TextColor3 = Color3.new(1, 1, 1)
- scriptInput.Font = Enum.Font.Code
- scriptInput.PlaceholderText = "Script Here..."
- scriptInput.TextSize = 10
- scriptInput.TextWrapped = true
- scriptInput.Parent = frame
- -- Create a "Go" button
- local goButton = Instance.new("TextButton")
- goButton.Size = UDim2.new(0, 160, 0, 30)
- goButton.Position = UDim2.new(0.55, -90, 1.05, -50)
- goButton.BackgroundColor3 = Color3.new(0, 1, 0)
- goButton.Font = Enum.Font.Cartoon
- goButton.Text = "Execute"
- goButton.TextSize = 20
- goButton.Parent = frame
- local isDragging = false
- local offset = Vector2.new(0, 0)
- -- Function to execute the entered script
- local function executeScript()
- local scriptText = scriptInput.Text
- local success, errorMessage = pcall(function()
- loadstring(scriptText)() -- Execute the Lua code
- end)
- if not success then
- warn("Script execution error: " .. errorMessage)
- end
- end
- -- Function to handle GUI dragging
- frame.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.Touch and input.UserInputType == Enum.UserInputType.MouseButton1 then
- isDragging = true
- offset = input.Position - frame.Position
- end
- end)
- frame.InputChanged:Connect(function(input)
- if isDragging and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then
- frame.Position = UDim2.new(0, input.Position.X - offset.X, 0, input.Position.Y - offset.Y)
- end
- end)
- frame.InputEnded:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then
- isDragging = false
- end
- end)
- goButton.MouseButton1Click:Connect(executeScript)
Advertisement
Add Comment
Please, Sign In to add comment