Advertisement
Rumanthan

Kaiser

Mar 24th, 2025
5
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.35 KB | None | 0 0
  1. local TweenService = game:GetService("TweenService")
  2. local UserInputService = game:GetService("UserInputService")
  3. local Players = game:GetService("Players")
  4. local player = Players.LocalPlayer
  5. local screenGui = Instance.new("ScreenGui")
  6. screenGui.Parent = player:WaitForChild("PlayerGui")
  7. screenGui.ResetOnSpawn = false
  8.  
  9. -- Correct Password
  10. local correctPassword = "MichealKaiser"
  11.  
  12. -- Key UI Frame
  13. local keyFrame = Instance.new("Frame")
  14. keyFrame.Size = UDim2.new(0.3, 0, 0.3, 0)
  15. keyFrame.Position = UDim2.new(0.35, 0, 0.35, 0)
  16. keyFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  17. keyFrame.BorderSizePixel = 0
  18. keyFrame.Parent = screenGui
  19.  
  20. local UICornerKey = Instance.new("UICorner", keyFrame)
  21. UICornerKey.CornerRadius = UDim.new(0.1, 0)
  22.  
  23. -- Key Input Box
  24. local keyInput = Instance.new("TextBox")
  25. keyInput.Size = UDim2.new(0.8, 0, 0.2, 0)
  26. keyInput.Position = UDim2.new(0.1, 0, 0.3, 0)
  27. keyInput.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  28. keyInput.TextColor3 = Color3.fromRGB(255, 255, 255)
  29. keyInput.Text = "Enter Key Here"
  30. keyInput.Font = Enum.Font.Garamond
  31. keyInput.TextScaled = true
  32. keyInput.Parent = keyFrame
  33.  
  34. local UICornerInput = Instance.new("UICorner", keyInput)
  35. UICornerInput.CornerRadius = UDim.new(0.2, 0)
  36.  
  37. -- Submit Button
  38. local submitButton = Instance.new("TextButton")
  39. submitButton.Size = UDim2.new(0.8, 0, 0.2, 0)
  40. submitButton.Position = UDim2.new(0.1, 0, 0.6, 0)
  41. submitButton.BackgroundColor3 = Color3.fromRGB(70, 130, 180)
  42. submitButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  43. submitButton.Text = "Unlock"
  44. submitButton.Font = Enum.Font.Garamond
  45. submitButton.TextScaled = true
  46. submitButton.Parent = keyFrame
  47.  
  48. local UICornerSubmit = Instance.new("UICorner", submitButton)
  49. UICornerSubmit.CornerRadius = UDim.new(0.2, 0)
  50.  
  51. -- Error Message
  52. local errorMessage = Instance.new("TextLabel")
  53. errorMessage.Size = UDim2.new(1, 0, 0.1, 0)
  54. errorMessage.Position = UDim2.new(0, 0, 0.85, 0)
  55. errorMessage.BackgroundTransparency = 1
  56. errorMessage.TextColor3 = Color3.fromRGB(255, 0, 0)
  57. errorMessage.TextScaled = true
  58. errorMessage.Font = Enum.Font.Garamond
  59. errorMessage.Text = ""
  60. errorMessage.Parent = keyFrame
  61.  
  62. -- Scrollable Main UI
  63. local mainFrame = Instance.new("Frame")
  64. mainFrame.Size = UDim2.new(0.4, 0, 0.5, 0)
  65. mainFrame.Position = UDim2.new(0.3, 0, 0.25, 0)
  66. mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  67. mainFrame.BorderSizePixel = 0
  68. mainFrame.Parent = screenGui
  69. mainFrame.ClipsDescendants = true
  70. mainFrame.Visible = false
  71.  
  72. local UICornerMain = Instance.new("UICorner", mainFrame)
  73. UICornerMain.CornerRadius = UDim.new(0.1, 0)
  74.  
  75. -- Scrolling Frame
  76. local scrollFrame = Instance.new("ScrollingFrame")
  77. scrollFrame.Size = UDim2.new(1, 0, 1, 0)
  78. scrollFrame.CanvasSize = UDim2.new(0, 0, 2, 0) -- Adjust this based on content
  79. scrollFrame.ScrollBarThickness = 5
  80. scrollFrame.BackgroundTransparency = 1
  81. scrollFrame.Parent = mainFrame
  82.  
  83. local UIListLayout = Instance.new("UIListLayout")
  84. UIListLayout.Parent = scrollFrame
  85. UIListLayout.Padding = UDim.new(0.02, 0)
  86. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  87.  
  88. -- Add UI Elements inside the scroll frame
  89. for i = 1, 10 do
  90. local optionButton = Instance.new("TextButton")
  91. optionButton.Size = UDim2.new(0.9, 0, 0.1, 0)
  92. optionButton.Position = UDim2.new(0.05, 0, 0, 0)
  93. optionButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  94. optionButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  95. optionButton.Font = Enum.Font.Garamond
  96. optionButton.Text = "Option " .. i
  97. optionButton.TextScaled = true
  98. optionButton.Parent = scrollFrame
  99.  
  100. local UICornerOption = Instance.new("UICorner", optionButton)
  101. UICornerOption.CornerRadius = UDim.new(0.2, 0)
  102. end
  103.  
  104. -- Close Button
  105. local closeButton = Instance.new("TextButton")
  106. closeButton.Size = UDim2.new(0.1, 0, 0.1, 0)
  107. closeButton.Position = UDim2.new(0.9, 0, 0, 0)
  108. closeButton.BackgroundColor3 = Color3.fromRGB(255, 50, 50)
  109. closeButton.Text = "X"
  110. closeButton.Font = Enum.Font.Garamond
  111. closeButton.TextScaled = true
  112. closeButton.Parent = mainFrame
  113.  
  114. -- Toggle Button
  115. local toggleButton = Instance.new("TextButton")
  116. toggleButton.Size = UDim2.new(0.07, 0, 0.07, 0)
  117. toggleButton.Position = UDim2.new(0.02, 0, 0.8, 0)
  118. toggleButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  119. toggleButton.BackgroundTransparency = 0.3
  120. toggleButton.BorderSizePixel = 1
  121. toggleButton.BorderColor3 = Color3.fromRGB(0, 0, 0)
  122. toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  123. toggleButton.Font = Enum.Font.Garamond
  124. toggleButton.Text = "Toggle UI"
  125. toggleButton.TextScaled = true
  126. toggleButton.Parent = screenGui
  127. toggleButton.Visible = false
  128.  
  129. local UICornerToggle = Instance.new("UICorner", toggleButton)
  130. UICornerToggle.CornerRadius = UDim.new(0.2, 0)
  131.  
  132. -- Key Check
  133. submitButton.MouseButton1Click:Connect(function()
  134. if keyInput.Text == correctPassword then
  135. keyFrame.Visible = false
  136. mainFrame.Visible = true
  137. else
  138. errorMessage.Text = "Incorrect Key!"
  139. wait(1)
  140. errorMessage.Text = ""
  141. end
  142. end)
  143.  
  144. -- Toggle UI Visibility
  145. toggleButton.MouseButton1Click:Connect(function()
  146. mainFrame.Visible = true
  147. toggleButton.Visible = false
  148. end)
  149.  
  150. -- Dragging Function (For UI Elements)
  151. local function makeDraggable(frame)
  152. local dragging
  153. local dragInput
  154. local dragStart
  155. local startPos
  156.  
  157. local function onInputBegan(input)
  158. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  159. dragging = true
  160. dragStart = input.Position
  161. startPos = frame.Position
  162.  
  163. input.Changed:Connect(function()
  164. if input.UserInputState == Enum.UserInputState.End then
  165. dragging = false
  166. end
  167. end)
  168. end
  169. end
  170.  
  171. local function onInputChanged(input)
  172. if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
  173. local delta = input.Position - dragStart
  174. frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  175. end
  176. end
  177.  
  178. frame.InputBegan:Connect(onInputBegan)
  179. UserInputService.InputChanged:Connect(onInputChanged)
  180. end
  181.  
  182. makeDraggable(mainFrame)
  183. makeDraggable(toggleButton)
  184. makeDraggable(keyFrame)
  185.  
  186. -- Close Animation
  187. closeButton.MouseButton1Click:Connect(function()
  188. mainFrame.Visible = false
  189. toggleButton.Visible = true
  190. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement