Advertisement
BobMe

CookieClickerS

Jul 4th, 2020 (edited)
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.27 KB | None | 0 0
  1. -- Farewell infortality
  2. -- Revamp by ImFrostic, Version 2.81
  3.  
  4. local function giveNonMain(player)
  5. local CookieRequest = Instance.new("ScreenGui")
  6. local aImageLabel = Instance.new("ImageLabel")
  7. local aTextLabel = Instance.new("TextLabel")
  8. local aImageLabel_2 = Instance.new("ImageLabel")
  9. local aImageLabel_3 = Instance.new("ImageLabel")
  10. local aImageLabel_4 = Instance.new("ImageLabel")
  11. local aImageLabel_5 = Instance.new("ImageLabel")
  12. local aBackground = Instance.new("ImageLabel")
  13. local aBackground_2 = Instance.new("ImageLabel")
  14. local aTextLabel_2 = Instance.new("TextLabel")
  15. local aYes = Instance.new("TextButton")
  16. local aNo = Instance.new("TextButton")
  17.  
  18. -- Properties
  19.  
  20. CookieRequest.Name = "CookieRequest"
  21. CookieRequest.Parent = player.PlayerGui
  22. CookieRequest.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  23.  
  24. aImageLabel.Parent = CookieRequest
  25. aImageLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  26. aImageLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  27. aImageLabel.BorderColor3 = Color3.new(0.117647, 0.282353, 0.529412)
  28. aImageLabel.BorderSizePixel = 10
  29. aImageLabel.Position = UDim2.new(0.5, 0, 0.5, 0)
  30. aImageLabel.Size = UDim2.new(0.5, 0, 0.5, 0)
  31. aImageLabel.Image = "http://www.roblox.com/asset/?id=5285419495"
  32. aImageLabel.ScaleType = Enum.ScaleType.Tile
  33. aImageLabel.TileSize = UDim2.new(0.400000006, 0, 1, 0)
  34.  
  35. aTextLabel.Parent = aImageLabel
  36. aTextLabel.AnchorPoint = Vector2.new(0.5, 0)
  37. aTextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  38. aTextLabel.BackgroundTransparency = 1
  39. aTextLabel.Position = UDim2.new(0.5, 0, 0.0250000004, 0)
  40. aTextLabel.Size = UDim2.new(1, 0, 0.100000001, 0)
  41. aTextLabel.Font = Enum.Font.SourceSans
  42. aTextLabel.Text = "Cookie Clicker"
  43. aTextLabel.TextColor3 = Color3.new(1, 1, 1)
  44. aTextLabel.TextScaled = true
  45. aTextLabel.TextSize = 14
  46. aTextLabel.TextWrapped = true
  47.  
  48. aImageLabel_2.Parent = aTextLabel
  49. aImageLabel_2.AnchorPoint = Vector2.new(1, 1)
  50. aImageLabel_2.BackgroundColor3 = Color3.new(1, 1, 1)
  51. aImageLabel_2.BackgroundTransparency = 1
  52. aImageLabel_2.BorderSizePixel = 0
  53. aImageLabel_2.Position = UDim2.new(0.5, 0, 0.00999999978, 0)
  54. aImageLabel_2.Rotation = 180
  55. aImageLabel_2.Size = UDim2.new(0.5, 0, 0.0599999987, 0)
  56. aImageLabel_2.Image = "http://www.roblox.com/asset/?id=5285832934"
  57. aImageLabel_2.ImageTransparency = 0.5
  58.  
  59. aImageLabel_3.Parent = aTextLabel
  60. aImageLabel_3.AnchorPoint = Vector2.new(1, 1)
  61. aImageLabel_3.BackgroundColor3 = Color3.new(1, 1, 1)
  62. aImageLabel_3.BackgroundTransparency = 1
  63. aImageLabel_3.BorderSizePixel = 0
  64. aImageLabel_3.Position = UDim2.new(1, 0, 0.00999999978, 0)
  65. aImageLabel_3.Size = UDim2.new(0.5, 0, 0.0599999987, 0)
  66. aImageLabel_3.Image = "http://www.roblox.com/asset/?id=5285832934"
  67. aImageLabel_3.ImageTransparency = 0.5
  68.  
  69. aImageLabel_4.Parent = aTextLabel
  70. aImageLabel_4.AnchorPoint = Vector2.new(1, 0)
  71. aImageLabel_4.BackgroundColor3 = Color3.new(1, 1, 1)
  72. aImageLabel_4.BackgroundTransparency = 1
  73. aImageLabel_4.BorderSizePixel = 0
  74. aImageLabel_4.Position = UDim2.new(1, 0, 0.99000001, 0)
  75. aImageLabel_4.Size = UDim2.new(0.5, 0, 0.0599999987, 0)
  76. aImageLabel_4.Image = "http://www.roblox.com/asset/?id=5285832934"
  77. aImageLabel_4.ImageTransparency = 0.5
  78.  
  79. aImageLabel_5.Parent = aTextLabel
  80. aImageLabel_5.AnchorPoint = Vector2.new(1, 0)
  81. aImageLabel_5.BackgroundColor3 = Color3.new(1, 1, 1)
  82. aImageLabel_5.BackgroundTransparency = 1
  83. aImageLabel_5.BorderSizePixel = 0
  84. aImageLabel_5.Position = UDim2.new(0.5, 0, 0.99000001, 0)
  85. aImageLabel_5.Rotation = 180
  86. aImageLabel_5.Size = UDim2.new(0.5, 0, 0.0599999987, 0)
  87. aImageLabel_5.Image = "http://www.roblox.com/asset/?id=5285832934"
  88. aImageLabel_5.ImageTransparency = 0.5
  89.  
  90. aBackground.Name = "Background"
  91. aBackground.Parent = aImageLabel
  92. aBackground.AnchorPoint = Vector2.new(0, 1)
  93. aBackground.BackgroundColor3 = Color3.new(1, 1, 1)
  94. aBackground.BackgroundTransparency = 1
  95. aBackground.BorderSizePixel = 0
  96. aBackground.Position = UDim2.new(0, 0, 1, 0)
  97. aBackground.Size = UDim2.new(1, 0, 0.600000024, 0)
  98. aBackground.ZIndex = 0
  99. aBackground.Image = "http://www.roblox.com/asset/?id=5285431491"
  100. aBackground.ImageTransparency = 0.5
  101.  
  102. aBackground_2.Name = "Background"
  103. aBackground_2.Parent = aImageLabel
  104. aBackground_2.BackgroundColor3 = Color3.new(1, 1, 1)
  105. aBackground_2.BackgroundTransparency = 1
  106. aBackground_2.BorderSizePixel = 0
  107. aBackground_2.Rotation = 180
  108. aBackground_2.Size = UDim2.new(1, 0, 0.400000006, 0)
  109. aBackground_2.ZIndex = 0
  110. aBackground_2.Image = "http://www.roblox.com/asset/?id=5285431491"
  111. aBackground_2.ImageTransparency = 0.5
  112.  
  113. aTextLabel_2.Parent = aImageLabel
  114. aTextLabel_2.BackgroundColor3 = Color3.new(1, 1, 1)
  115. aTextLabel_2.BackgroundTransparency = 1
  116. aTextLabel_2.Name = "Question"
  117. aTextLabel_2.Position = UDim2.new(0, 0, 0.150000006, 0)
  118. aTextLabel_2.Size = UDim2.new(1, 0, 0.5, 0)
  119. aTextLabel_2.Font = Enum.Font.SourceSans
  120. aTextLabel_2.Text = "Memo1332 has invited you to play Cookie Clicker. Would you like to play?"
  121. aTextLabel_2.TextColor3 = Color3.new(1, 1, 1)
  122. aTextLabel_2.TextScaled = true
  123. aTextLabel_2.TextSize = 14
  124. aTextLabel_2.TextWrapped = true
  125.  
  126. aYes.Name = "Yes"
  127. aYes.Parent = aImageLabel
  128. aYes.AnchorPoint = Vector2.new(1, 0.5)
  129. aYes.BackgroundColor3 = Color3.new(0, 0.701961, 0.0196078)
  130. aYes.BorderSizePixel = 0
  131. aYes.Position = UDim2.new(0.449999988, 0, 0.850000024, 0)
  132. aYes.Size = UDim2.new(0.300000012, 0, 0.150000006, 0)
  133. aYes.Font = Enum.Font.SourceSans
  134. aYes.Text = "Yes"
  135. aYes.TextColor3 = Color3.new(1, 1, 1)
  136. aYes.TextScaled = true
  137. aYes.TextSize = 14
  138. aYes.TextWrapped = true
  139.  
  140. aNo.Name = "No"
  141. aNo.Parent = aImageLabel
  142. aNo.AnchorPoint = Vector2.new(0, 0.5)
  143. aNo.BackgroundColor3 = Color3.new(0.701961, 0, 0.00784314)
  144. aNo.BorderSizePixel = 0
  145. aNo.Position = UDim2.new(0.550000012, 0, 0.850000024, 0)
  146. aNo.Size = UDim2.new(0.300000012, 0, 0.150000006, 0)
  147. aNo.Font = Enum.Font.SourceSans
  148. aNo.Text = "No"
  149. aNo.TextColor3 = Color3.new(1, 1, 1)
  150. aNo.TextScaled = true
  151. aNo.TextSize = 14
  152. aNo.TextWrapped = true
  153. local bonk = nil
  154. aYes.MouseButon1Click:Connect(function()
  155. bonk = true
  156. end)
  157. aNo.MouseButon1Click:Connect(function()
  158. bonk = false
  159. end)
  160. repeat wait() until bonk ~= nil
  161. CookieRequest:Destroy()
  162. if bonk then
  163. local g = Instance.new("ScreenGui",player.PlayerGui)
  164. g.ResetOnSpawn = false
  165. NLS(game:GetService("HttpService"):GetAsync("https://pastebin.com/raw/Qq3i7nMp"),g)
  166. end
  167. end
  168.  
  169.  
  170. --script time
  171.  
  172. local player = owner
  173. wait(.1)
  174.  
  175. local function findPlayer(plrname)
  176. for i,v in pairs(game.Players:GetPlayers()) do
  177. if string.lower(string.sub(v.Name,1,#plrname)) == string.lower(plrname) then
  178. return v
  179. end
  180. end
  181. return nil
  182. end
  183.  
  184. owner.Chatted:Connect(function(msg)
  185. local split = string.split(string.lower(msg),"/")
  186. if split[1] == "cookie" then
  187. local pl = findPlayer(split[2])
  188. if pl ~= nil then
  189. giveNonMain(pl)
  190. end
  191. end
  192. end)
  193.  
  194. function timetoString(seconds)
  195. local minutes = 0
  196. local hours = 0
  197. local days = 0
  198. local years = 0
  199. while seconds >= 60 do
  200. minutes = minutes + 1
  201. seconds = seconds - 60
  202. end
  203. while minutes >= 60 do
  204. hours = hours + 1
  205. minutes = minutes - 60
  206. end
  207. while hours >= 24 do
  208. days = days + 1
  209. hours = hours - 24
  210. end
  211. while days >= 365 do
  212. years = years + 1
  213. days = days - 365
  214. end
  215. local str = ""
  216. if years > 0 then
  217. str = str..years.." years, "
  218. end
  219. if days > 0 then
  220. str = str..days.." days, "
  221. end
  222. if hours > 0 then
  223. if hours == 1 then
  224. str = str..hours.." hour, "
  225. else
  226. str = str..hours.." hours, "
  227. end
  228. end
  229. if minutes > 0 then
  230. if minutes == 1 then
  231. str = str..minutes.." minute, "
  232. else
  233. str = str..minutes.." minutes, "
  234. end
  235. end
  236. if seconds > 0 then
  237. str = str..seconds.." seconds, "
  238. end
  239. str = string.sub(str,1,#str-2).." ago"
  240. return str
  241. end
  242.  
  243. function findplayer(playername)
  244. for i,v in pairs(game.Players:GetChildren()) do
  245. local nam = v.Name
  246. if string.sub(nam,1,#playername):lower() == playername:lower() then
  247. return v
  248. end
  249. end
  250. return nil
  251. end
  252.  
  253. for i,v in pairs(game.Players:GetChildren()) do
  254. if v:FindFirstChild("CookieEvent") ~= nil then
  255. v:FindFirstChild("CookieEvent"):Destroy()
  256. end
  257. end
  258.  
  259. local function getItem(int,str)
  260. for i,v in pairs(int:GetChildren()) do
  261. if v.Name == str then
  262. return v
  263. end
  264. end
  265. return nil
  266. end
  267.  
  268. local remote = player:FindFirstChild("CookieEvent")
  269. if remote == nil then
  270. remote = Instance.new("RemoteFunction",player)
  271. end
  272. remote.Name = "CookieEvent"
  273.  
  274. function yeet(plr,str)
  275. if str == "begin" then
  276. local cook = Instance.new("ScreenGui")
  277. cook.Name = "Cookie"
  278. cook.Parent = plr.PlayerGui
  279. local val = Instance.new("StringValue",cook)
  280. val.Name = "CookieStats"
  281. val.Value = "0/0"
  282. local val2 = Instance.new("StringValue",cook)
  283. val2.Name = "OwnerName"
  284. val2.Value = tostring(player)
  285. return
  286. elseif str == "update" then
  287. local tab = {}
  288. for i,v in pairs(game.Players:GetChildren()) do
  289. if v.PlayerGui:FindFirstChild("Cookie") ~= nil and v.Name ~= plr.Name then
  290. local b = v.PlayerGui:FindFirstChild("Cookie"):FindFirstChild("CookieStats")
  291. table.insert(tab,v.Name.."-"..b.Value)
  292. end
  293. end
  294. return tab
  295. elseif str == "close" then
  296. plr.PlayerGui:FindFirstChild("Cookie"):Destroy()
  297. return
  298. else
  299. plr.PlayerGui:FindFirstChild("Cookie").CookieStats.Value = str
  300. return
  301. end
  302. end
  303.  
  304. remote.OnServerInvoke = yeet
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement