Advertisement
Steamhesaproblox

Roblox Remotevent Script

May 15th, 2025 (edited)
497
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RBScript 4.58 KB | Gaming | 0 0
  1. local player = game.Players.LocalPlayer
  2. local UserInputService = game:GetService("UserInputService")
  3.  
  4. local gui = Instance.new("ScreenGui")
  5. gui.Name = "RemoteEventTriggerGui"
  6. gui.Parent = player:WaitForChild("PlayerGui")
  7. gui.ResetOnSpawn = false
  8.  
  9. -- Ana frame
  10. local frame = Instance.new("Frame")
  11. frame.Size = UDim2.new(0, 300, 0, 400)
  12. frame.Position = UDim2.new(0, 20, 0, 50)
  13. frame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  14. frame.BorderSizePixel = 0
  15. frame.Parent = gui
  16.  
  17. -- Başlık çubuğu (drag bölgesi)
  18. local titleBar = Instance.new("Frame")
  19. titleBar.Size = UDim2.new(1, 0, 0, 30)
  20. titleBar.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  21. titleBar.Parent = frame
  22.  
  23. -- Başlık yazısı
  24. local title = Instance.new("TextLabel")
  25. title.Size = UDim2.new(1, -50, 1, 0)
  26. title.BackgroundTransparency = 1
  27. title.TextColor3 = Color3.fromRGB(255, 255, 255)
  28. title.Font = Enum.Font.SourceSansBold
  29. title.TextSize = 20
  30. title.Text = "ReplicatedStorage RemoteEvent'leri"
  31. title.TextXAlignment = Enum.TextXAlignment.Left
  32. title.Position = UDim2.new(0, 10, 0, 0)
  33. title.Parent = titleBar
  34.  
  35. -- Kapat butonu
  36. local closeButton = Instance.new("TextButton")
  37. closeButton.Size = UDim2.new(0, 40, 1, 0)
  38. closeButton.Position = UDim2.new(1, -40, 0, 0)
  39. closeButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
  40. closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  41. closeButton.Font = Enum.Font.SourceSansBold
  42. closeButton.TextSize = 24
  43. closeButton.Text = "X"
  44. closeButton.Parent = titleBar
  45.  
  46. -- Açma butonu (GUI kapandığında gösterilecek)
  47. local openButton = Instance.new("TextButton")
  48. openButton.Size = UDim2.new(0, 100, 0, 30)
  49. openButton.Position = UDim2.new(0, 20, 0, 50)
  50. openButton.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  51. openButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  52. openButton.Font = Enum.Font.SourceSansBold
  53. openButton.TextSize = 18
  54. openButton.Text = "GUI Aç"
  55. openButton.Visible = false
  56. openButton.Parent = gui
  57.  
  58. -- ScrollFrame
  59. local scrollingFrame = Instance.new("ScrollingFrame")
  60. scrollingFrame.Size = UDim2.new(1, 0, 1, -30)
  61. scrollingFrame.Position = UDim2.new(0, 0, 0, 30)
  62. scrollingFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
  63. scrollingFrame.ScrollBarThickness = 8
  64. scrollingFrame.BackgroundTransparency = 1
  65. scrollingFrame.Parent = frame
  66.  
  67. local layout = Instance.new("UIListLayout")
  68. layout.Parent = scrollingFrame
  69. layout.SortOrder = Enum.SortOrder.LayoutOrder
  70. layout.Padding = UDim.new(0, 5)
  71.  
  72. -- Butonları ekle
  73. for _, remote in ipairs(game:GetService("ReplicatedStorage"):GetDescendants()) do
  74.     if remote:IsA("RemoteEvent") then
  75.         local button = Instance.new("TextButton")
  76.         button.Size = UDim2.new(1, -10, 0, 30)
  77.         button.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  78.         button.TextColor3 = Color3.fromRGB(255, 255, 255)
  79.         button.Font = Enum.Font.SourceSans
  80.         button.TextSize = 18
  81.         button.Text = remote.Name
  82.         button.Parent = scrollingFrame
  83.  
  84.         button.MouseButton1Click:Connect(function()
  85.             print("🔥 FireServer tetiklendi: "..remote:GetFullName())
  86.             pcall(function()
  87.                 remote:FireServer()
  88.             end)
  89.         end)
  90.     end
  91. end
  92.  
  93. local function updateCanvasSize()
  94.     scrollingFrame.CanvasSize = UDim2.new(0, 0, 0, layout.AbsoluteContentSize.Y + 10)
  95. end
  96.  
  97. layout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(updateCanvasSize)
  98. updateCanvasSize()
  99.  
  100. -- Drag işlemi
  101. local dragging, dragInput, dragStart, startPos
  102.  
  103. titleBar.InputBegan:Connect(function(input)
  104.     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  105.         dragging = true
  106.         dragStart = input.Position
  107.         startPos = frame.Position
  108.  
  109.         input.Changed:Connect(function()
  110.             if input.UserInputState == Enum.UserInputState.End then
  111.                 dragging = false
  112.             end
  113.         end)
  114.     end
  115. end)
  116.  
  117. titleBar.InputChanged:Connect(function(input)
  118.     if input.UserInputType == Enum.UserInputType.MouseMovement then
  119.         dragInput = input
  120.     end
  121. end)
  122.  
  123. UserInputService.InputChanged:Connect(function(input)
  124.     if dragging and input == dragInput then
  125.         local delta = input.Position - dragStart
  126.         frame.Position = UDim2.new(
  127.             startPos.X.Scale,
  128.             startPos.X.Offset + delta.X,
  129.             startPos.Y.Scale,
  130.             startPos.Y.Offset + delta.Y
  131.         )
  132.     end
  133. end)
  134.  
  135. -- Kapat butonu
  136. closeButton.MouseButton1Click:Connect(function()
  137.     frame.Visible = false
  138.     openButton.Visible = true
  139. end)
  140.  
  141. -- Aç butonu
  142. openButton.MouseButton1Click:Connect(function()
  143.     frame.Visible = true
  144.     openButton.Visible = false
  145. end)
  146.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement
OSZAR »