Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local UserInputService = game:GetService("UserInputService")
- local gui = Instance.new("ScreenGui")
- gui.Name = "RemoteEventTriggerGui"
- gui.Parent = player:WaitForChild("PlayerGui")
- gui.ResetOnSpawn = false
- -- Ana frame
- local frame = Instance.new("Frame")
- frame.Size = UDim2.new(0, 300, 0, 400)
- frame.Position = UDim2.new(0, 20, 0, 50)
- frame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- frame.BorderSizePixel = 0
- frame.Parent = gui
- -- Başlık çubuğu (drag bölgesi)
- local titleBar = Instance.new("Frame")
- titleBar.Size = UDim2.new(1, 0, 0, 30)
- titleBar.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- titleBar.Parent = frame
- -- Başlık yazısı
- local title = Instance.new("TextLabel")
- title.Size = UDim2.new(1, -50, 1, 0)
- title.BackgroundTransparency = 1
- title.TextColor3 = Color3.fromRGB(255, 255, 255)
- title.Font = Enum.Font.SourceSansBold
- title.TextSize = 20
- title.Text = "ReplicatedStorage RemoteEvent'leri"
- title.TextXAlignment = Enum.TextXAlignment.Left
- title.Position = UDim2.new(0, 10, 0, 0)
- title.Parent = titleBar
- -- Kapat butonu
- local closeButton = Instance.new("TextButton")
- closeButton.Size = UDim2.new(0, 40, 1, 0)
- closeButton.Position = UDim2.new(1, -40, 0, 0)
- closeButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
- closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- closeButton.Font = Enum.Font.SourceSansBold
- closeButton.TextSize = 24
- closeButton.Text = "X"
- closeButton.Parent = titleBar
- -- Açma butonu (GUI kapandığında gösterilecek)
- local openButton = Instance.new("TextButton")
- openButton.Size = UDim2.new(0, 100, 0, 30)
- openButton.Position = UDim2.new(0, 20, 0, 50)
- openButton.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- openButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- openButton.Font = Enum.Font.SourceSansBold
- openButton.TextSize = 18
- openButton.Text = "GUI Aç"
- openButton.Visible = false
- openButton.Parent = gui
- -- ScrollFrame
- local scrollingFrame = Instance.new("ScrollingFrame")
- scrollingFrame.Size = UDim2.new(1, 0, 1, -30)
- scrollingFrame.Position = UDim2.new(0, 0, 0, 30)
- scrollingFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
- scrollingFrame.ScrollBarThickness = 8
- scrollingFrame.BackgroundTransparency = 1
- scrollingFrame.Parent = frame
- local layout = Instance.new("UIListLayout")
- layout.Parent = scrollingFrame
- layout.SortOrder = Enum.SortOrder.LayoutOrder
- layout.Padding = UDim.new(0, 5)
- -- Butonları ekle
- for _, remote in ipairs(game:GetService("ReplicatedStorage"):GetDescendants()) do
- if remote:IsA("RemoteEvent") then
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(1, -10, 0, 30)
- button.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- button.TextColor3 = Color3.fromRGB(255, 255, 255)
- button.Font = Enum.Font.SourceSans
- button.TextSize = 18
- button.Text = remote.Name
- button.Parent = scrollingFrame
- button.MouseButton1Click:Connect(function()
- print("🔥 FireServer tetiklendi: "..remote:GetFullName())
- pcall(function()
- remote:FireServer()
- end)
- end)
- end
- end
- local function updateCanvasSize()
- scrollingFrame.CanvasSize = UDim2.new(0, 0, 0, layout.AbsoluteContentSize.Y + 10)
- end
- layout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(updateCanvasSize)
- updateCanvasSize()
- -- Drag işlemi
- local dragging, dragInput, dragStart, startPos
- titleBar.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = true
- dragStart = input.Position
- startPos = frame.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- titleBar.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement then
- dragInput = input
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if dragging and input == dragInput then
- local delta = input.Position - dragStart
- frame.Position = UDim2.new(
- startPos.X.Scale,
- startPos.X.Offset + delta.X,
- startPos.Y.Scale,
- startPos.Y.Offset + delta.Y
- )
- end
- end)
- -- Kapat butonu
- closeButton.MouseButton1Click:Connect(function()
- frame.Visible = false
- openButton.Visible = true
- end)
- -- Aç butonu
- openButton.MouseButton1Click:Connect(function()
- frame.Visible = true
- openButton.Visible = false
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement