Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local StarterGui = game:GetService("StarterGui")
- local Player = game.Players.LocalPlayer
- local PlayerGui = Player:WaitForChild("PlayerGui")
- local lastPosition = UDim2.new(0.5, -150, 0.5, -100)
- local collapsed = false
- local function createGUI()
- if PlayerGui:FindFirstChild("MatrixGUI") then
- PlayerGui.MatrixGUI:Destroy()
- end
- local ScreenGUI = Instance.new("ScreenGui")
- ScreenGUI.Name = "MatrixGUI"
- ScreenGUI.ResetOnSpawn = false
- ScreenGUI.Parent = PlayerGui
- local MainFrame = Instance.new("Frame")
- MainFrame.Name = "MainFrame"
- MainFrame.Size = collapsed and UDim2.new(0, 300, 0, 50) or UDim2.new(0, 300, 0, 200)
- MainFrame.Position = lastPosition
- MainFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- MainFrame.BorderSizePixel = 0
- MainFrame.Parent = ScreenGUI
- local UICorner = Instance.new("UICorner")
- UICorner.CornerRadius = UDim.new(0, 10)
- UICorner.Parent = MainFrame
- local ContentFrame = Instance.new("Frame")
- ContentFrame.Name = "ContentFrame"
- ContentFrame.Size = UDim2.new(1, 0, 1, -50)
- ContentFrame.Position = UDim2.new(0, 0, 0, 50)
- ContentFrame.BackgroundTransparency = 1
- ContentFrame.Visible = not collapsed
- ContentFrame.Parent = MainFrame
- local Title = Instance.new("TextLabel")
- Title.Name = "Title"
- Title.Text = "Brainrot IQ Giver"
- Title.Font = Enum.Font.Code
- Title.TextSize = 20
- Title.TextColor3 = Color3.fromRGB(0, 255, 0)
- Title.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- Title.Size = UDim2.new(1, 0, 0, 50)
- Title.Parent = MainFrame
- local UIS = game:GetService("UserInputService")
- local dragging, dragInput, dragStart, startPos
- local function update(input)
- local delta = input.Position - dragStart
- MainFrame.Position = UDim2.new(
- startPos.X.Scale,
- startPos.X.Offset + delta.X,
- startPos.Y.Scale,
- startPos.Y.Offset + delta.Y
- )
- end
- Title.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- dragging = true
- dragStart = input.Position
- startPos = MainFrame.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- lastPosition = MainFrame.Position
- end
- end)
- end
- end)
- Title.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
- dragInput = input
- end
- end)
- UIS.InputChanged:Connect(function(input)
- if input == dragInput and dragging then
- update(input)
- end
- end)
- local RoomClearedButton = Instance.new("TextButton")
- RoomClearedButton.Name = "RoomClearedButton"
- RoomClearedButton.Text = "Give IQ"
- RoomClearedButton.Font = Enum.Font.Code
- RoomClearedButton.TextSize = 18
- RoomClearedButton.TextColor3 = Color3.fromRGB(0, 255, 0)
- RoomClearedButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- RoomClearedButton.Size = UDim2.new(0.8, 0, 0, 50)
- RoomClearedButton.Position = UDim2.new(0.1, 0, 0.1, 0)
- RoomClearedButton.Parent = ContentFrame
- local ButtonCorner = Instance.new("UICorner")
- ButtonCorner.CornerRadius = UDim.new(0, 10)
- ButtonCorner.Parent = RoomClearedButton
- RoomClearedButton.MouseButton1Click:Connect(function()
- game:GetService("ReplicatedStorage"):WaitForChild("Remotes"):WaitForChild("RoomCleared"):FireServer()
- end)
- local ThankYouLabel = Instance.new("TextLabel")
- ThankYouLabel.Name = "ThankYouLabel"
- ThankYouLabel.Text = "Thank you for using my script!"
- ThankYouLabel.Font = Enum.Font.Code
- ThankYouLabel.TextSize = 16
- ThankYouLabel.TextColor3 = Color3.fromRGB(0, 255, 0)
- ThankYouLabel.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- ThankYouLabel.Size = UDim2.new(0.8, 0, 0, 30)
- ThankYouLabel.Position = UDim2.new(0.1, 0, 0.6, 0)
- ThankYouLabel.TextScaled = true
- ThankYouLabel.BackgroundTransparency = 1
- ThankYouLabel.Parent = ContentFrame
- local ArrowButton = Instance.new("TextButton")
- ArrowButton.Name = "ArrowButton"
- ArrowButton.Text = collapsed and "↓" or "↑"
- ArrowButton.Font = Enum.Font.Code
- ArrowButton.TextSize = 18
- ArrowButton.TextColor3 = Color3.fromRGB(0, 255, 0)
- ArrowButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- ArrowButton.Size = UDim2.new(0, 30, 0, 30)
- ArrowButton.Position = UDim2.new(1, -35, 0, 10)
- ArrowButton.Parent = MainFrame
- local ArrowCorner = Instance.new("UICorner")
- ArrowCorner.CornerRadius = UDim.new(0, 10)
- ArrowCorner.Parent = ArrowButton
- ArrowButton.MouseButton1Click:Connect(function()
- if collapsed then
- MainFrame:TweenSize(UDim2.new(0, 300, 0, 200), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3, true, function()
- ContentFrame.Visible = true
- end)
- ArrowButton.Text = "↑"
- else
- ContentFrame.Visible = false
- MainFrame:TweenSize(UDim2.new(0, 300, 0, 50), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.3)
- ArrowButton.Text = "↓"
- end
- collapsed = not collapsed
- end)
- end
- createGUI()
- Player.CharacterAdded:Connect(createGUI)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement