--Services local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui") local TweenService = game:GetService("TweenService") local Players = game:GetService("Players") local player = Players.LocalPlayer -- Create GUI local gui = Instance.new("ScreenGui") gui.Name = "GooshUI" gui.Parent = PlayerGui -- Image background local Background = Instance.new("ImageLabel") Background.Name = "BackgroundImage" Background.Size = UDim2.new(0.488, 0, 0.419, 0) Background.Image = "rbxassetid://120321730706642" Background.BackgroundTransparency = 1 Background.Position = UDim2.new(0.256, 0, 0.289, 0) Background.Parent = gui -- UI corners for frame local frameCorner = Instance.new("UICorner") frameCorner.CornerRadius = UDim.new(0, 12) frameCorner.Parent = Background -- This is a bar at the Top frame! local Bar = Instance.new("Frame") Bar.Size = UDim2.new(1, 0, 0.101, 0) Bar.Position = UDim2.new(0, 0, 0, 0) Bar.BackgroundColor3 = Color3.fromRGB(56, 56, 56) Bar.Parent = Background -- UICorner for Bar local barCorner = Instance.new("UICorner") barCorner.CornerRadius = UDim.new(0, 12) barCorner.Parent = Bar -- This is the button to be later used to close the UI! local Close = Instance.new("TextButton") Close.Name = "CloseButton" Close.Text = "X" Close.Position = UDim2.new(0.902, 0, 0, 0) Close.TextColor3 = Color3.fromRGB(255, 0, 0) Close.TextSize = 28 Close.Font = Enum.Font.LuckiestGuy Close.Size = UDim2.new(0.098, 0, 1, 0) Close.BackgroundTransparency = 1 Close.Parent = Bar -- Label this is the Welcome label or the name of the ui local WelcomeLabel = Instance.new("TextLabel") WelcomeLabel.Name = "WelcomeLabel" WelcomeLabel.Size = UDim2.new(0.391, 0, 1, 0) WelcomeLabel.Position = UDim2.new(0.326, 0, 0, 0) WelcomeLabel.TextSize = 28 WelcomeLabel.TextColor3 = Color3.fromRGB(255, 255, 255) WelcomeLabel.Font = Enum.Font.LuckiestGuy WelcomeLabel.BackgroundTransparency = 1 WelcomeLabel.Text = "Goosh-UI-V1!" WelcomeLabel.Parent = Bar -- Improved TextBox local ScriptBox = Instance.new("TextBox") ScriptBox.Name = "ScriptBox" ScriptBox.Size = UDim2.new(0.96, 0, 0.6, 0) ScriptBox.Position = UDim2.new(0.02, 0, 0.15, 0) ScriptBox.AnchorPoint = Vector2.new(0, 0) ScriptBox.TextColor3 = Color3.fromRGB(255, 255, 255) ScriptBox.TextSize = 12 ScriptBox.BackgroundColor3 = Color3.fromRGB(29, 29, 29) ScriptBox.BackgroundTransparency = 0.1 ScriptBox.ClearTextOnFocus = false ScriptBox.MultiLine = true ScriptBox.TextWrapped = true ScriptBox.TextXAlignment = Enum.TextXAlignment.Left ScriptBox.TextYAlignment = Enum.TextYAlignment.Top ScriptBox.PlaceholderText = "Paste your script here..." ScriptBox.Parent = Background -- TextBox Corner local boxCorner = Instance.new("UICorner") boxCorner.CornerRadius = UDim.new(0, 8) boxCorner.Parent = ScriptBox -- Execute Button local Execute = Instance.new("TextButton") Execute.Name = "ExecuteButton" Execute.Size = UDim2.new(0.23, 0, 0.15, 0) Execute.Position = UDim2.new(0.02, 0, 0.78, 0) Execute.Font = Enum.Font.LuckiestGuy Execute.BackgroundColor3 = Color3.fromRGB(27, 27, 27) Execute.TextColor3 = Color3.fromRGB(255, 255, 255) Execute.TextSize = 24 Execute.Text = "Execute" Execute.Parent = Background -- Execute Button Corner local executeCorner = Instance.new("UICorner") executeCorner.CornerRadius = UDim.new(0, 12) executeCorner.Parent = Execute -- Clear Button local Clear = Instance.new("TextButton") Clear.Name = "ClearButton" Clear.Size = UDim2.new(0.23, 0, 0.15, 0) Clear.Position = UDim2.new(0.27, 0, 0.78, 0) Clear.Font = Enum.Font.LuckiestGuy Clear.BackgroundColor3 = Color3.fromRGB(27, 27, 27) Clear.TextColor3 = Color3.fromRGB(255, 255, 255) Clear.TextSize = 24 Clear.Text = "Clear" Clear.Parent = Background -- Clear Button Corner local clearCorner = Instance.new("UICorner") clearCorner.CornerRadius = UDim.new(0, 12) clearCorner.Parent = Clear -- Code/Logic -- Close button functionality Close.MouseButton1Click:Connect(function() Close.Active = false -- makes the button unactive first local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out) -- info about the tween like wich animations and shit local tween1 = TweenService:Create(Background, tweenInfo, {ImageTransparency = 1}) -- image Transparency is other then background one so yeah then u know! local tween2 = TweenService:Create(Bar, tweenInfo, {BackgroundTransparency = 1}) local tween3 = TweenService:Create(WelcomeLabel, tweenInfo, {TextTransparency = 1}) local tween4 = TweenService:Create(Close, tweenInfo, {TextTransparency = 1}) local tween5 = TweenService:Create(ScriptBox, tweenInfo, {BackgroundTransparency = 1, TextTransparency = 1}) local tween6 = TweenService:Create(Execute, tweenInfo, {BackgroundTransparency = 1, TextTransparency = 1}) local tween7 = TweenService:Create(Clear, tweenInfo, {BackgroundTransparency = 1, TextTransparency = 1}) -- Play all tweens tween1:Play() tween2:Play() tween3:Play() tween4:Play() tween5:Play() tween6:Play() tween7:Play() wait(1) -- wait 1 sec gui:Destroy() -- destroys the gui end) Clear.MouseButton1Click:Connect(function() ScriptBox.Text = "" end) Execute.MouseButton1Click:Connect(function() local scriptText = ScriptBox.Text if scriptText and scriptText ~= "" then print("Executing...") local success, errorMessage = pcall(function() loadstring(scriptText)() end) if not success then print("Error executing script:", errorMessage) else print("Script executed successfully!") end else print("ScriptBox is empty") end end) -- variables local dragging local dragInput local dragStart local startPos local function updateInput(input) -- this a fuction thats gonna be later used for update the input so it can fucking work local delta = input.Position - dragStart Background.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end Bar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then -- FIX 1: Changed = to == dragging = true dragStart = input.Position startPos = Background.Position -- FIX 2: Should be Background, not Bar! input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end -- FIX 3: Added this missing 'end' end) end end) -- This was missing in your code -- FIX 4: Missing the InputChanged and InputEnded connections Bar.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement then dragInput = input end end) Bar.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end end) -- FIX 5: Need to connect to RenderStepped or Heartbeat to update position continuously game:GetService("UserInputService").InputChanged:Connect(function(input) if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then updateInput(input) end end)