Algarnr

New all rap battle game script

Jun 5th, 2025
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local UserInputService = game:GetService("UserInputService")
  2. local playerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  3.  
  4. -- Create ScreenGui
  5. local screenGui = Instance.new("ScreenGui")
  6. screenGui.Name = "MyCustomGUI"
  7. screenGui.ResetOnSpawn = false
  8. screenGui.Parent = playerGui
  9.  
  10. -- Create Frame (do this first!)
  11. local frame = Instance.new("Frame")
  12. frame.Size = UDim2.new(0.4, 0, 0.2, 0)
  13. frame.Position = UDim2.new(0.3, 0, 0.4, 0)
  14. frame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  15. frame.BorderSizePixel = 0
  16. frame.Parent = screenGui
  17.  
  18. -- Draggable logic using the frame
  19. local dragging = false
  20. local dragInput
  21. local dragStart
  22. local startPos
  23.  
  24. local function update(input)
  25.     local delta = input.Position - dragStart
  26.     frame.Position = UDim2.new(
  27.         startPos.X.Scale, startPos.X.Offset + delta.X,
  28.         startPos.Y.Scale, startPos.Y.Offset + delta.Y
  29.     )
  30. end
  31.  
  32. frame.InputBegan:Connect(function(input)
  33.     if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  34.         dragging = true
  35.         dragStart = input.Position
  36.         startPos = frame.Position
  37.  
  38.         input.Changed:Connect(function()
  39.             if input.UserInputState == Enum.UserInputState.End then
  40.                 dragging = false
  41.             end
  42.         end)
  43.     end
  44. end)
  45.  
  46. frame.InputChanged:Connect(function(input)
  47.     if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  48.         dragInput = input
  49.     end
  50. end)
  51.  
  52. UserInputService.InputChanged:Connect(function(input)
  53.     if input == dragInput and dragging then
  54.         update(input)
  55.     end
  56. end)
  57.  
  58. -- Create credit label first
  59. local creditLabel = Instance.new("TextLabel")
  60. creditLabel.Size = UDim2.new(0, 180, 0, 20)  -- small width and height
  61. creditLabel.Position = UDim2.new(0.3, 0, 0.33, 0)  -- just above your main frame (which is at 0.4 Y)
  62. creditLabel.BackgroundTransparency = 1  -- transparent background
  63. creditLabel.Text = "Credit to COREX HUB OFFICIAL"
  64. creditLabel.TextColor3 = Color3.fromRGB(200, 200, 200)  -- light gray color
  65. creditLabel.Font = Enum.Font.Gotham
  66. creditLabel.TextSize = 14
  67. creditLabel.TextXAlignment = Enum.TextXAlignment.Left
  68. creditLabel.Parent = screenGui
  69.  
  70. -- Then create toggle button and connect event
  71. local toggleButton = Instance.new("TextButton")
  72. toggleButton.Size = UDim2.new(0, 100, 0, 30)
  73. toggleButton.Position = UDim2.new(0, 10, 0, 10) -- top-left corner
  74. toggleButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  75. toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  76. toggleButton.Font = Enum.Font.GothamBold
  77. toggleButton.TextSize = 18
  78. toggleButton.Text = "Toggle GUI"
  79. toggleButton.Parent = screenGui
  80.  
  81. toggleButton.MouseButton1Click:Connect(function()
  82.     frame.Visible = not frame.Visible
  83.     creditLabel.Visible = frame.Visible
  84. end)
  85.  
  86. -- Create Button inside the frame
  87. local button = Instance.new("TextButton")
  88. button.Size = UDim2.new(1, 0, 1, 0)
  89. button.Position = UDim2.new(0, 0, 0, 0)
  90. button.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  91. button.TextColor3 = Color3.fromRGB(255, 255, 255)
  92. button.Font = Enum.Font.GothamBold
  93. button.TextScaled = true
  94. button.TextWrapped = true
  95. button.Text = "Copy Rap 🔥🔥"
  96. button.Parent = frame
  97.  
  98. -- 🔥 Raps List
  99. local raps = {
  100.     "This dude is short as hell, he went to stages the crowd couldn't even tell.",
  101.     "You are shorter than Kevin Hart, you are shorter than the memory of an old fart.",
  102.     "Now I'm a kind boy, yo face though brought nobody joy.",
  103.     "Everybody know my rhymes are hot, yo short butt could fit in a shoe slot."
  104. }
  105.  
  106. local index = 1 -- Start at rap 1
  107.  
  108. button.MouseButton1Click:Connect(function()
  109.     -- Get the current rap
  110.     local rap = raps[index]
  111.  
  112.     -- ✅ Copy to clipboard (only works in executors like Synapse, Fluxus, etc.)
  113.     setclipboard(rap)
  114.  
  115.     -- 🔢 Show confirmation
  116.     button.Text = "✅ Copied Rap " .. index .. "/4:\n\"" .. rap .. "\""
  117.  
  118.     -- ➡ Move to next rap (loop back to 1 after 4)
  119.     index = index + 1
  120.     if index > #raps then
  121.         index = 1
  122.     end
  123.  
  124.     -- ⏳ Reset text after 3 seconds
  125.     task.delay(3, function()
  126.         button.Text = "Copy Rap 🔥🔥"
  127.     end)
  128. end)
  129.  
  130.  
Tags: #roblox
Advertisement
Add Comment
Please, Sign In to add comment