Advertisement
FreshGamer430

Untitled

Feb 2nd, 2025
394
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.51 KB | Source Code | 0 0
  1. local StarterGui = game:GetService("StarterGui")
  2. local Player = game.Players.LocalPlayer
  3. local PlayerGui = Player:WaitForChild("PlayerGui")
  4.  
  5. local lastPosition = UDim2.new(0.5, -150, 0.5, -100)
  6. local collapsed = false
  7.  
  8. local function createGUI()
  9.     if PlayerGui:FindFirstChild("MatrixGUI") then
  10.         PlayerGui.MatrixGUI:Destroy()
  11.     end
  12.  
  13.     local ScreenGUI = Instance.new("ScreenGui")
  14.     ScreenGUI.Name = "MatrixGUI"
  15.     ScreenGUI.ResetOnSpawn = false
  16.     ScreenGUI.Parent = PlayerGui
  17.  
  18.     local MainFrame = Instance.new("Frame")
  19.     MainFrame.Name = "MainFrame"
  20.     MainFrame.Size = collapsed and UDim2.new(0, 300, 0, 50) or UDim2.new(0, 300, 0, 200)
  21.     MainFrame.Position = lastPosition
  22.     MainFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  23.     MainFrame.BorderSizePixel = 0
  24.     MainFrame.Parent = ScreenGUI
  25.  
  26.     local UICorner = Instance.new("UICorner")
  27.     UICorner.CornerRadius = UDim.new(0, 10)
  28.     UICorner.Parent = MainFrame
  29.  
  30.     local ContentFrame = Instance.new("Frame")
  31.     ContentFrame.Name = "ContentFrame"
  32.     ContentFrame.Size = UDim2.new(1, 0, 1, -50)
  33.     ContentFrame.Position = UDim2.new(0, 0, 0, 50)
  34.     ContentFrame.BackgroundTransparency = 1
  35.     ContentFrame.Visible = not collapsed
  36.     ContentFrame.Parent = MainFrame
  37.  
  38.     local Title = Instance.new("TextLabel")
  39.     Title.Name = "Title"
  40.     Title.Text = "Brainrot IQ Giver"
  41.     Title.Font = Enum.Font.Code
  42.     Title.TextSize = 20
  43.     Title.TextColor3 = Color3.fromRGB(0, 255, 0)
  44.     Title.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  45.     Title.Size = UDim2.new(1, 0, 0, 50)
  46.     Title.Parent = MainFrame
  47.  
  48.     local UIS = game:GetService("UserInputService")
  49.     local dragging, dragInput, dragStart, startPos
  50.  
  51.     local function update(input)
  52.         local delta = input.Position - dragStart
  53.         MainFrame.Position = UDim2.new(
  54.             startPos.X.Scale,
  55.             startPos.X.Offset + delta.X,
  56.             startPos.Y.Scale,
  57.             startPos.Y.Offset + delta.Y
  58.         )
  59.     end
  60.  
  61.     Title.InputBegan:Connect(function(input)
  62.         if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  63.             dragging = true
  64.             dragStart = input.Position
  65.             startPos = MainFrame.Position
  66.  
  67.             input.Changed:Connect(function()
  68.                 if input.UserInputState == Enum.UserInputState.End then
  69.                     dragging = false
  70.                     lastPosition = MainFrame.Position
  71.                 end
  72.             end)
  73.         end
  74.     end)
  75.  
  76.     Title.InputChanged:Connect(function(input)
  77.         if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  78.             dragInput = input
  79.         end
  80.     end)
  81.  
  82.     UIS.InputChanged:Connect(function(input)
  83.         if input == dragInput and dragging then
  84.             update(input)
  85.         end
  86.     end)
  87.  
  88.     local RoomClearedButton = Instance.new("TextButton")
  89.     RoomClearedButton.Name = "RoomClearedButton"
  90.     RoomClearedButton.Text = "Give IQ"
  91.     RoomClearedButton.Font = Enum.Font.Code
  92.     RoomClearedButton.TextSize = 18
  93.     RoomClearedButton.TextColor3 = Color3.fromRGB(0, 255, 0)
  94.     RoomClearedButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  95.     RoomClearedButton.Size = UDim2.new(0.8, 0, 0, 50)
  96.     RoomClearedButton.Position = UDim2.new(0.1, 0, 0.1, 0)
  97.     RoomClearedButton.Parent = ContentFrame
  98.  
  99.     local ButtonCorner = Instance.new("UICorner")
  100.     ButtonCorner.CornerRadius = UDim.new(0, 10)
  101.     ButtonCorner.Parent = RoomClearedButton
  102.  
  103.     RoomClearedButton.MouseButton1Click:Connect(function()
  104.         game:GetService("ReplicatedStorage"):WaitForChild("Remotes"):WaitForChild("RoomCleared"):FireServer()
  105.     end)
  106.  
  107.     local ThankYouLabel = Instance.new("TextLabel")
  108.     ThankYouLabel.Name = "ThankYouLabel"
  109.     ThankYouLabel.Text = "Thank you for using my script!"
  110.     ThankYouLabel.Font = Enum.Font.Code
  111.     ThankYouLabel.TextSize = 16
  112.     ThankYouLabel.TextColor3 = Color3.fromRGB(0, 255, 0)
  113.     ThankYouLabel.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  114.     ThankYouLabel.Size = UDim2.new(0.8, 0, 0, 30)
  115.     ThankYouLabel.Position = UDim2.new(0.1, 0, 0.6, 0)
  116.     ThankYouLabel.TextScaled = true
  117.     ThankYouLabel.BackgroundTransparency = 1
  118.     ThankYouLabel.Parent = ContentFrame
  119.  
  120.     local ArrowButton = Instance.new("TextButton")
  121.     ArrowButton.Name = "ArrowButton"
  122.     ArrowButton.Text = collapsed and "↓" or "↑"
  123.     ArrowButton.Font = Enum.Font.Code
  124.     ArrowButton.TextSize = 18
  125.     ArrowButton.TextColor3 = Color3.fromRGB(0, 255, 0)
  126.     ArrowButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  127.     ArrowButton.Size = UDim2.new(0, 30, 0, 30)
  128.     ArrowButton.Position = UDim2.new(1, -35, 0, 10)
  129.     ArrowButton.Parent = MainFrame
  130.  
  131.     local ArrowCorner = Instance.new("UICorner")
  132.     ArrowCorner.CornerRadius = UDim.new(0, 10)
  133.     ArrowCorner.Parent = ArrowButton
  134.  
  135.     ArrowButton.MouseButton1Click:Connect(function()
  136.         if collapsed then
  137.             MainFrame:TweenSize(UDim2.new(0, 300, 0, 200), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true, function()
  138.                 ContentFrame.Visible = true
  139.             end)
  140.             ArrowButton.Text = "↑"
  141.         else
  142.             ContentFrame.Visible = false
  143.             MainFrame:TweenSize(UDim2.new(0, 300, 0, 50), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3)
  144.             ArrowButton.Text = "↓"
  145.         end
  146.         collapsed = not collapsed
  147.     end)
  148. end
  149.  
  150. createGUI()
  151. Player.CharacterAdded:Connect(createGUI)
  152.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement