Advertisement
scriptingtales

Roblox Random Date Generator

Sep 23rd, 2022
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.92 KB | None | 0 0
  1. -- Gui to Lua
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5.  
  6. local Frame = Instance.new("Frame")
  7. local UICorner = Instance.new("UICorner")
  8. local Generator = Instance.new("TextButton")
  9. local UICorner_2 = Instance.new("UICorner")
  10. local FrameLabel = Instance.new("TextLabel")
  11. local UICorner_3 = Instance.new("UICorner")
  12. local Month = Instance.new("TextLabel")
  13. local UICorner_4 = Instance.new("UICorner")
  14. local Day = Instance.new("TextLabel")
  15. local UICorner_5 = Instance.new("UICorner")
  16. local Year = Instance.new("TextLabel")
  17. local UICorner_6 = Instance.new("UICorner")
  18. local Comma = Instance.new("TextLabel")
  19. local UICorner_7 = Instance.new("UICorner")
  20. local Slash = Instance.new("TextLabel")
  21. local UICorner_8 = Instance.new("UICorner")
  22. local Slash_2 = Instance.new("TextLabel")
  23. local UICorner_9 = Instance.new("UICorner")
  24. local YearNAL = Instance.new("TextLabel")
  25. local UICorner_10 = Instance.new("UICorner")
  26. local DayNAL = Instance.new("TextLabel")
  27. local UICorner_11 = Instance.new("UICorner")
  28. local MonthNal = Instance.new("TextLabel")
  29. local UICorner_12 = Instance.new("UICorner")
  30. local CloseButton = Instance.new("TextButton")
  31. local UICorner_13 = Instance.new("UICorner")
  32.  
  33. --Properties:
  34.  
  35. Frame.Parent = game.StarterGui.DateRandomizer
  36. Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  37. Frame.Position = UDim2.new(0.200826436, 0, 0.16236341, 0)
  38. Frame.Size = UDim2.new(0, 724, 0, 502)
  39.  
  40. UICorner.Parent = Frame
  41.  
  42. Generator.Name = "Generator"
  43. Generator.Parent = Frame
  44. Generator.BackgroundColor3 = Color3.fromRGB(136, 136, 136)
  45. Generator.Position = UDim2.new(0.33011049, 0, 0.665338635, 0)
  46. Generator.Size = UDim2.new(0, 245, 0, 54)
  47. Generator.Font = Enum.Font.SourceSansLight
  48. Generator.Text = "Generate Random Date"
  49. Generator.TextColor3 = Color3.fromRGB(255, 255, 255)
  50. Generator.TextScaled = true
  51. Generator.TextSize = 14.000
  52. Generator.TextWrapped = true
  53.  
  54. UICorner_2.Parent = Generator
  55.  
  56. FrameLabel.Name = "FrameLabel"
  57. FrameLabel.Parent = Frame
  58. FrameLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  59. FrameLabel.Position = UDim2.new(0.12016575, 0, 0, 0)
  60. FrameLabel.Size = UDim2.new(0, 547, 0, 74)
  61. FrameLabel.Font = Enum.Font.SourceSansLight
  62. FrameLabel.Text = "Random Date Generator"
  63. FrameLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  64. FrameLabel.TextScaled = true
  65. FrameLabel.TextSize = 14.000
  66. FrameLabel.TextWrapped = true
  67.  
  68. UICorner_3.Parent = FrameLabel
  69.  
  70. Month.Name = "Month"
  71. Month.Parent = Frame
  72. Month.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  73. Month.Position = UDim2.new(0.190607741, 0, 0.245019913, 0)
  74. Month.Size = UDim2.new(0, 150, 0, 74)
  75. Month.Font = Enum.Font.SourceSansLight
  76. Month.Text = "1"
  77. Month.TextColor3 = Color3.fromRGB(0, 0, 0)
  78. Month.TextScaled = true
  79. Month.TextSize = 14.000
  80. Month.TextWrapped = true
  81.  
  82. UICorner_4.Parent = Month
  83.  
  84. Day.Name = "Day"
  85. Day.Parent = Frame
  86. Day.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  87. Day.Position = UDim2.new(0.436464101, 0, 0.247011945, 0)
  88. Day.Size = UDim2.new(0, 90, 0, 74)
  89. Day.Font = Enum.Font.SourceSansLight
  90. Day.Text = "24"
  91. Day.TextColor3 = Color3.fromRGB(0, 0, 0)
  92. Day.TextScaled = true
  93. Day.TextSize = 14.000
  94. Day.TextWrapped = true
  95.  
  96. UICorner_5.Parent = Day
  97.  
  98. Year.Name = "Year"
  99. Year.Parent = Frame
  100. Year.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  101. Year.Position = UDim2.new(0.613259614, 0, 0.245019898, 0)
  102. Year.Size = UDim2.new(0, 164, 0, 74)
  103. Year.Font = Enum.Font.SourceSansLight
  104. Year.Text = "2009"
  105. Year.TextColor3 = Color3.fromRGB(0, 0, 0)
  106. Year.TextScaled = true
  107. Year.TextSize = 14.000
  108. Year.TextWrapped = true
  109.  
  110. UICorner_6.Parent = Year
  111.  
  112. Comma.Name = "Comma"
  113. Comma.Parent = Frame
  114. Comma.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  115. Comma.Position = UDim2.new(0.555248618, 0, 0.430278867, 0)
  116. Comma.Size = UDim2.new(0, 16, 0, 74)
  117. Comma.Font = Enum.Font.SourceSansLight
  118. Comma.Text = ","
  119. Comma.TextColor3 = Color3.fromRGB(0, 0, 0)
  120. Comma.TextScaled = true
  121. Comma.TextSize = 14.000
  122. Comma.TextWrapped = true
  123.  
  124. UICorner_7.Parent = Comma
  125.  
  126. Slash.Name = "Slash"
  127. Slash.Parent = Frame
  128. Slash.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  129. Slash.Position = UDim2.new(0.569060743, 0, 0.245019928, 0)
  130. Slash.Size = UDim2.new(0, 32, 0, 74)
  131. Slash.Font = Enum.Font.SourceSansLight
  132. Slash.Text = "/"
  133. Slash.TextColor3 = Color3.fromRGB(0, 0, 0)
  134. Slash.TextScaled = true
  135. Slash.TextSize = 14.000
  136. Slash.TextWrapped = true
  137.  
  138. UICorner_8.Parent = Slash
  139.  
  140. Slash_2.Name = "Slash"
  141. Slash_2.Parent = Frame
  142. Slash_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  143. Slash_2.Position = UDim2.new(0.361878484, 0, 0.245019928, 0)
  144. Slash_2.Size = UDim2.new(0, 32, 0, 74)
  145. Slash_2.Font = Enum.Font.SourceSansLight
  146. Slash_2.Text = "/"
  147. Slash_2.TextColor3 = Color3.fromRGB(0, 0, 0)
  148. Slash_2.TextScaled = true
  149. Slash_2.TextSize = 14.000
  150. Slash_2.TextWrapped = true
  151.  
  152. UICorner_9.Parent = Slash_2
  153.  
  154. YearNAL.Name = "YearNAL"
  155. YearNAL.Parent = Frame
  156. YearNAL.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  157. YearNAL.Position = UDim2.new(0.584254146, 0, 0.426294804, 0)
  158. YearNAL.Size = UDim2.new(0, 164, 0, 74)
  159. YearNAL.Font = Enum.Font.SourceSansLight
  160. YearNAL.Text = "2009"
  161. YearNAL.TextColor3 = Color3.fromRGB(0, 0, 0)
  162. YearNAL.TextScaled = true
  163. YearNAL.TextSize = 14.000
  164. YearNAL.TextWrapped = true
  165.  
  166. UICorner_10.Parent = YearNAL
  167.  
  168. DayNAL.Name = "DayNAL"
  169. DayNAL.Parent = Frame
  170. DayNAL.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  171. DayNAL.Position = UDim2.new(0.43784532, 0, 0.430278897, 0)
  172. DayNAL.Size = UDim2.new(0, 90, 0, 74)
  173. DayNAL.Font = Enum.Font.SourceSansLight
  174. DayNAL.Text = "24"
  175. DayNAL.TextColor3 = Color3.fromRGB(0, 0, 0)
  176. DayNAL.TextScaled = true
  177. DayNAL.TextSize = 14.000
  178. DayNAL.TextWrapped = true
  179.  
  180. UICorner_11.Parent = DayNAL
  181.  
  182. MonthNal.Name = "MonthNal"
  183. MonthNal.Parent = Frame
  184. MonthNal.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  185. MonthNal.Position = UDim2.new(0.220994473, 0, 0.430278897, 0)
  186. MonthNal.Size = UDim2.new(0, 150, 0, 74)
  187. MonthNal.Font = Enum.Font.SourceSansLight
  188. MonthNal.Text = "Jan"
  189. MonthNal.TextColor3 = Color3.fromRGB(0, 0, 0)
  190. MonthNal.TextScaled = true
  191. MonthNal.TextSize = 14.000
  192. MonthNal.TextWrapped = true
  193.  
  194. UICorner_12.Parent = MonthNal
  195.  
  196. CloseButton.Name = "CloseButton"
  197. CloseButton.Parent = Frame
  198. CloseButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  199. CloseButton.Position = UDim2.new(0.897790074, 0, 0, 0)
  200. CloseButton.Size = UDim2.new(0, 74, 0, 74)
  201. CloseButton.Font = Enum.Font.SourceSansLight
  202. CloseButton.Text = "X"
  203. CloseButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  204. CloseButton.TextScaled = true
  205. CloseButton.TextSize = 14.000
  206. CloseButton.TextWrapped = true
  207.  
  208. UICorner_13.Parent = CloseButton
  209.  
  210. -- Scripts:
  211.  
  212. local function NQIYVD_fake_script() -- Generator.Script
  213. local script = Instance.new('LocalScript', Generator)
  214.  
  215. script.Parent.MouseButton1Click:Connect(function()
  216.  
  217.  
  218. local MonthRandomizer = math.random(1, 12)
  219.  
  220. local DayRandomizer = math.random(1, 31)
  221.  
  222.  
  223. local DayFEBrandomizer = math.random(1, 28)
  224. local DayFEBLEAPrandomizer = math.random(1, 29)
  225.  
  226.  
  227. local YearRandomizer = math.random(1600, 2100)
  228.  
  229.  
  230.  
  231. local MonthText = script.Parent.Parent.Month.Text
  232.  
  233. local DayText = script.Parent.Parent.Day.Text
  234.  
  235. local YearText = script.Parent.Parent.Year.Text
  236.  
  237.  
  238.  
  239. local January = 1
  240. local February = 2
  241. local March = 3
  242. local April = 4
  243. local May = 5
  244. local June = 6
  245. local July = 7
  246. local August = 8
  247. local September = 9
  248. local October = 10
  249. local November = 11
  250. local December = 12
  251.  
  252. script.Parent.Parent.Day.Text = DayRandomizer
  253.  
  254. script.Parent.Parent.Month.Text = MonthRandomizer
  255.  
  256. script.Parent.Parent.Year.Text = YearRandomizer
  257.  
  258. -------------------- SEPARATOR ---------------------
  259.  
  260.  
  261. script.Parent.Parent.DayNAL.Text = DayRandomizer
  262.  
  263. script.Parent.Parent.MonthNal.Text = MonthRandomizer
  264.  
  265. script.Parent.Parent.YearNAL.Text = YearRandomizer
  266.  
  267.  
  268.  
  269.  
  270. local JanuaryTEXT = "Jan"
  271. local FebruaryTEXT = "Feb"
  272. local MarchTEXT = "Mar"
  273. local AprilTEXT = "Apr"
  274. local MayTEXT = "May"
  275. local JuneTEXT = "Jun"
  276. local JulyTEXT = "Jul"
  277. local AugustTEXT = "Aug"
  278. local SeptemberTEXT = "Sept"
  279. local OctoberTEXT = "Oct"
  280. local NovemberTEXT = "Nov"
  281. local DecemberTEXT = "Dec"
  282.  
  283.  
  284.  
  285.  
  286. if MonthRandomizer == 1 then
  287. script.Parent.Parent.MonthNal.Text = JanuaryTEXT
  288. end
  289.  
  290. if MonthRandomizer == 2 then
  291. script.Parent.Parent.MonthNal.Text = FebruaryTEXT
  292.  
  293. if MonthText == FebruaryTEXT then
  294. DayText = DayFEBrandomizer
  295. end
  296. end
  297.  
  298. if MonthRandomizer == 3 then
  299. script.Parent.Parent.MonthNal.Text = MarchTEXT
  300. end
  301.  
  302. if MonthRandomizer == 4 then
  303. script.Parent.Parent.MonthNal.Text = AprilTEXT
  304. end
  305.  
  306. if MonthRandomizer == 5 then
  307. script.Parent.Parent.MonthNal.Text = MayTEXT
  308. end
  309.  
  310. if MonthRandomizer == 6 then
  311. script.Parent.Parent.MonthNal.Text = JuneTEXT
  312. end
  313.  
  314. if MonthRandomizer == 7 then
  315. script.Parent.Parent.MonthNal.Text = JulyTEXT
  316. end
  317.  
  318. if MonthRandomizer == 8 then
  319. script.Parent.Parent.MonthNal.Text = AugustTEXT
  320. end
  321.  
  322. if MonthRandomizer == 9 then
  323. script.Parent.Parent.MonthNal.Text = SeptemberTEXT
  324. end
  325.  
  326. if MonthRandomizer == 10 then
  327. script.Parent.Parent.MonthNal.Text = OctoberTEXT
  328. end
  329.  
  330. if MonthRandomizer == 11 then
  331. script.Parent.Parent.MonthNal.Text = NovemberTEXT
  332. end
  333.  
  334. if MonthRandomizer == 12 then
  335. script.Parent.Parent.MonthNal.Text = DecemberTEXT
  336. end
  337. end)
  338. end
  339. coroutine.wrap(NQIYVD_fake_script)()
  340. local function AMBD_fake_script() -- Frame.Dragify
  341. local script = Instance.new('LocalScript', Frame)
  342.  
  343. local Frame = script.Parent
  344.  
  345. Frame.Active = true
  346. Frame.Selectable = true
  347. Frame.Draggable = true
  348. end
  349. coroutine.wrap(AMBD_fake_script)()
  350. local function SZUQP_fake_script() -- CloseButton.CloseScript
  351. local script = Instance.new('LocalScript', CloseButton)
  352.  
  353. local Frame = script.Parent.Parent
  354.  
  355. script.Parent.MouseButton1Click:Connect(function()
  356. Frame.Visible = false
  357. script.Parent.Parent.Parent.OpenButton.Visible = true
  358. end)
  359. end
  360. coroutine.wrap(SZUQP_fake_script)()
  361.  
  362.  
  363. -- Gui to Lua
  364. -- Version: 3.2
  365.  
  366. -- Instances:
  367.  
  368. local OpenButton = Instance.new("TextButton")
  369. local UICorner = Instance.new("UICorner")
  370.  
  371. --Properties:
  372.  
  373. OpenButton.Name = "OpenButton"
  374. OpenButton.Parent = game.StarterGui.DateRandomizer
  375. OpenButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  376. OpenButton.Position = UDim2.new(-0.000630140305, 0, 0.452094853, 0)
  377. OpenButton.Size = UDim2.new(0, 164, 0, 47)
  378. OpenButton.Visible = false
  379. OpenButton.Font = Enum.Font.SourceSansLight
  380. OpenButton.Text = "Open"
  381. OpenButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  382. OpenButton.TextScaled = true
  383. OpenButton.TextSize = 14.000
  384. OpenButton.TextWrapped = true
  385.  
  386. UICorner.Parent = OpenButton
  387.  
  388. -- Scripts:
  389.  
  390. local function UWWQQ_fake_script() -- OpenButton.OpenScript
  391. local script = Instance.new('LocalScript', OpenButton)
  392.  
  393. local Frame = script.Parent.Parent.Frame
  394.  
  395. script.Parent.MouseButton1Click:Connect(function()
  396. Frame.Visible = true
  397. script.Parent.Visible = false
  398. end)
  399. end
  400. coroutine.wrap(UWWQQ_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement