Advertisement
s0ulz_

free admin

Nov 17th, 2024
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.08 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local screenGui = Instance.new("ScreenGui")
  3. local notificationFrame = Instance.new("Frame")
  4. local titleLabel = Instance.new("TextLabel")
  5. local yesButton = Instance.new("TextButton")
  6. local noButton = Instance.new("TextButton")
  7.  
  8. -- GUI Setup
  9. screenGui.Parent = player:WaitForChild("PlayerGui")
  10.  
  11. notificationFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  12. notificationFrame.Size = UDim2.new(0.5, 0, 0.3, 0)
  13. notificationFrame.Position = UDim2.new(0.25, 0, 0.35, 0)
  14. notificationFrame.Parent = screenGui
  15. notificationFrame.Active = true
  16. notificationFrame.Draggable = true
  17.  
  18. titleLabel.Text = "Do you want admin?"
  19. titleLabel.BackgroundTransparency = 1
  20. titleLabel.TextColor3 = Color3.fromRGB(0, 255, 0)
  21. titleLabel.Size = UDim2.new(1, 0, 0.35, 0)
  22. titleLabel.Font = Enum.Font.SourceSansBold
  23. titleLabel.TextSize = 24
  24. titleLabel.Parent = notificationFrame
  25.  
  26. yesButton.Text = "Yes"
  27. yesButton.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  28. yesButton.TextColor3 = Color3.fromRGB(0, 255, 0)
  29. yesButton.Size = UDim2.new(0.4, 0, 0.25, 0)
  30. yesButton.Position = UDim2.new(0.1, 0, 0.5, 0)
  31. yesButton.TextSize = 20
  32. yesButton.Parent = notificationFrame
  33.  
  34. noButton.Text = "No"
  35. noButton.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  36. noButton.TextColor3 = Color3.fromRGB(0, 255, 0)
  37. noButton.Size = UDim2.new(0.4, 0, 0.25, 0)
  38. noButton.Position = UDim2.new(0.5, 0, 0.5, 0)
  39. noButton.TextSize = 20
  40. noButton.Parent = notificationFrame
  41.  
  42. -- Drag Functionality
  43. local function dragify(frame)
  44.     local dragging, dragInput, startPos
  45.  
  46.     local function update(input)
  47.         local delta = input.Position - startPos
  48.         frame.Position = UDim2.new(frame.Position.X.Scale, frame.Position.X.Offset + delta.X,
  49.                                    frame.Position.Y.Scale, frame.Position.Y.Offset + delta.Y)
  50.     end
  51.    
  52.     frame.InputBegan:Connect(function(input)
  53.         if input.UserInputType == Enum.UserInputType.MouseButton1 then
  54.             dragging = true
  55.             startPos = input.Position
  56.            
  57.             input.Changed:Connect(function()
  58.                 if input.UserInputState == Enum.UserInputState.End then
  59.                     dragging = false
  60.                 end
  61.             end)
  62.         end
  63.     end)
  64.    
  65.     frame.InputChanged:Connect(function(input)
  66.         if input.UserInputType == Enum.UserInputType.MouseMovement then
  67.             if dragging then
  68.                 update(input)
  69.             end
  70.         end
  71.     end)
  72. end
  73.  
  74. dragify(notificationFrame)
  75.  
  76. -- Button Functionality
  77. yesButton.MouseButton1Click:Connect(function()
  78.     local success, err = pcall(function()
  79.         loadstring(game:HttpGet("https://raw.githubusercontent.com/FilteringEnabled/NamelessAdmin/main/Source"))()
  80.     end)
  81.     if success then
  82.         titleLabel.Text = "You have got admin!"
  83.         wait(2)
  84.         notificationFrame:Destroy()
  85.     else
  86.         titleLabel.Text = "Error occurred: " .. err
  87.     end
  88. end)
  89.  
  90. noButton.MouseButton1Click:Connect(function()
  91.     titleLabel.Text = "You chose not to get admin."
  92.     wait(2)
  93.     notificationFrame:Destroy()
  94. end)
  95.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement