Advertisement
PurpleDragonUntitled

Key final

Apr 30th, 2025
9
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.28 KB | None | 0 0
  1. -- if you're here , feel free to grab the key from the bottom , you could've just done the system that would've helped me out but i
  2. -- guess you don't support begginer creators
  3.  
  4.  
  5. local TweenService = game:GetService("TweenService")
  6. local Lighting = game:GetService("Lighting")
  7. local TeleportService = game:GetService("TeleportService")
  8. local player = game.Players.LocalPlayer
  9. local gui = Instance.new("ScreenGui")
  10. gui.Name = "KeySystemGui"
  11. gui.Parent = player:WaitForChild("PlayerGui")
  12.  
  13. -- Create Blur Effect for the Environment
  14. local blurEffect = Instance.new("BlurEffect")
  15. blurEffect.Size = 10 -- Initial blur intensity
  16. blurEffect.Parent = Lighting
  17.  
  18. -- Create Sparkling Particle Effect
  19. local sparkle = Instance.new("ParticleEmitter")
  20. sparkle.Texture = "rbxassetid://152293501" -- Sparkle texture
  21. sparkle.Size = NumberSequence.new(1, 3)
  22. sparkle.Rate = 50 -- Amount of sparkles
  23. sparkle.Lifetime = NumberRange.new(2, 4)
  24. sparkle.Parent = game.Workspace.Terrain -- Attaches to the world
  25.  
  26. -- Create main frame (Centered on all devices)
  27. local frame = Instance.new("Frame")
  28. frame.Size = UDim2.new(0.35, 0, 0.3, 0) -- Clean size
  29. frame.AnchorPoint = Vector2.new(0.5, 0.5) -- Centers properly
  30. frame.Position = UDim2.new(0.5, 0, -0.5, 0) -- Start hidden above
  31. frame.BackgroundColor3 = Color3.fromRGB(25, 25, 25) -- Black
  32. frame.BorderSizePixel = 2
  33. frame.BorderColor3 = Color3.fromRGB(255, 255, 255) -- White outline
  34. frame.Active = true -- Enables dragging
  35. frame.Draggable = true -- Allow UI to be moved
  36. frame.Parent = gui
  37.  
  38. -- Add a UI Corner for rounded edges
  39. local uiCorner = Instance.new("UICorner")
  40. uiCorner.CornerRadius = UDim.new(0, 10)
  41. uiCorner.Parent = frame
  42.  
  43. -- Create title label
  44. local titleLabel = Instance.new("TextLabel")
  45. titleLabel.Text = "Untitled's Key System"
  46. titleLabel.Size = UDim2.new(1, 0, 0.2, 0)
  47. titleLabel.BackgroundTransparency = 1
  48. titleLabel.TextScaled = true
  49. titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
  50. titleLabel.Font = Enum.Font.GothamBold
  51. titleLabel.Parent = frame
  52.  
  53. -- Create TextBox for input
  54. local keyInput = Instance.new("TextBox")
  55. keyInput.PlaceholderText = "Enter key here..."
  56. keyInput.Size = UDim2.new(0.9, 0, 0.2, 0)
  57. keyInput.Position = UDim2.new(0.05, 0, 0.3, 0)
  58. keyInput.TextScaled = true
  59. keyInput.BackgroundColor3 = Color3.fromRGB(40, 40, 40) -- Dark Gray
  60. keyInput.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
  61. keyInput.Font = Enum.Font.Gotham
  62. keyInput.Parent = frame
  63.  
  64. -- Create "Get Key" button
  65. local getKeyButton = Instance.new("TextButton")
  66. getKeyButton.Text = "Get Key"
  67. getKeyButton.Size = UDim2.new(0.45, 0, 0.2, 0)
  68. getKeyButton.Position = UDim2.new(0.05, 0, 0.55, 0)
  69. getKeyButton.BackgroundColor3 = Color3.fromRGB(60, 60, 60) -- Darker gray
  70. getKeyButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  71. getKeyButton.Font = Enum.Font.GothamBold
  72. getKeyButton.Parent = frame
  73.  
  74. -- Create "Check Key" button
  75. local checkKeyButton = Instance.new("TextButton")
  76. checkKeyButton.Text = "Check Key"
  77. checkKeyButton.Size = UDim2.new(0.45, 0, 0.2, 0)
  78. checkKeyButton.Position = UDim2.new(0.5, 0, 0.55, 0)
  79. checkKeyButton.BackgroundColor3 = Color3.fromRGB(60, 60, 60) -- Darker gray
  80. checkKeyButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  81. checkKeyButton.Font = Enum.Font.GothamBold
  82. checkKeyButton.Parent = frame
  83.  
  84. local correctKey = "Dyanosaur"
  85. local keyLink = "https://work.ink/1Zqy/ewf5oxtb" -- Updated link
  86.  
  87. -- Create sounds for correct/wrong key
  88. local correctSound = Instance.new("Sound")
  89. correctSound.SoundId = "rbxassetid://124793974135748"
  90. correctSound.Parent = frame
  91.  
  92. local wrongSound = Instance.new("Sound")
  93. wrongSound.SoundId = "rbxassetid://14428739841"
  94. wrongSound.Parent = frame
  95.  
  96. -- Function to slide down the frame smoothly
  97. local function slideDown()
  98. local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Quint, Enum.EasingDirection.Out)
  99. local tween = TweenService:Create(frame, tweenInfo, {Position = UDim2.new(0.5, 0, 0.5, 0)}) -- Moves to center
  100. tween:Play()
  101. end
  102.  
  103. -- Execute animation (UI slides down)
  104. slideDown()
  105.  
  106. -- Function to copy the key link to clipboard
  107. getKeyButton.MouseButton1Click:Connect(function()
  108. setclipboard(keyLink) -- Copies the updated link to clipboard
  109. getKeyButton.Text = "Key Link Copied!"
  110. end)
  111.  
  112. -- Function to check the key, execute script, play sounds, and remove effects
  113. checkKeyButton.MouseButton1Click:Connect(function()
  114. local userKey = keyInput.Text
  115. if userKey == "." then
  116. blurEffect:Destroy() -- Remove blur effect
  117. sparkle:Destroy() -- Remove sparkle effect
  118. gui:Destroy() -- Unload the GUI
  119. elseif userKey == correctKey then
  120. correctSound:Play() -- Play correct sound
  121. checkKeyButton.Text = "Success!"
  122. checkKeyButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0) -- Green
  123. wait(1)
  124. blurEffect:Destroy() -- Remove blur effect
  125. sparkle:Destroy() -- Remove sparkle effect
  126. gui:Destroy()
  127. loadstring(game:HttpGet('https://pastebin.com/raw/u2RUMrwt'))() -- Execute script
  128. else
  129. wrongSound:Play() -- Play wrong key sound
  130. checkKeyButton.Text = "Invalid! Rejoining..."
  131. checkKeyButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) -- Red
  132. wait(2)
  133. TeleportService:Teleport(game.PlaceId, player) -- Rejoins the game
  134. end
  135. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement