Advertisement
TheDEV21

ME ONLY

Feb 15th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.58 KB | None | 0 0
  1. --[[
  2. FrizzleBurgers Shop Client
  3. --]]
  4.  
  5. --[[
  6. Config.Items stuff;
  7. ["Gamepass Name"] = the name of the pass
  8. Id = id to the gamepass/devproduct
  9. ImageID = the id to the image you want on the gui
  10. Description = short description about the gamepass
  11. Type = the type of pass, the types are as follows:
  12. Type = "Gamepass" -- for gamepasses
  13. Type = "Dev" -- for dev products--740923972
  14.  
  15. --]]
  16.  
  17. local Items = {
  18. ["Segway"] = {Id = 5903571, ImageID = 797944649, Description = "This gamepass gives you a Segway to have a fast and an easy way to cruise around the restaurant!", Type = "Gamepass"},
  19. ["Red Balloon"] = {Id = 5903630, ImageID = 797945232, Description = "Who said that you cant fly? ", Type = "Gamepass"},
  20. ["Selfie Stick"] = {Id = 5903640, ImageID = 797945738, Description = "It's SELFIE time!", Type = "Gamepass"},
  21. ["Premium Lounge"] = {Id = 5903571, ImageID = 797946075, Description = "A nice place to hang out with friends and have a calm relaxing lunch with a floor that possibly has the best view!", Type = "Gamepass"},
  22.  
  23. };
  24.  
  25. local Main = script.Parent
  26. local Open = script.Parent.Parent:WaitForChild("Open")
  27. local List = Main:WaitForChild("List")
  28. local Close = Main:WaitForChild("Close")
  29.  
  30. local RemoteKey = "Steak_84783247239472389473859478975890437257894378574358275785347890543798053478905347890527859437583445375-7823751345247543897395943758430672685764-34765-6-47869854-635463453-654-63-6464-646-4___)89087897897-54-354=35435-34=6-35=-5654-t=yh-tf=vh-gf=dhv-=t-=-vhy=w-y6-5=yu3-6=u65-3=uv-6=u-v=63u=-65-=3vu56u=-6=-vu356=-uv3=-vu6=-5v3uvu=-6=-v=-vu6=-vu-=uv=-vuvu-v=u-3=vu=-3vu5=-ty-=v=t-ryu=-evy=-tgf=v-hgt=-rvhtrvhgfhdvfhgfh bn nbnghfdhngjnjgfdhghghdhhgfhfghb67 u657b56-37=65b7-=653-b7=-b7=7b-=b37=-b7=-7-=7b-=b7-=b75-=b7-=b=b7-3=-b=-hn=-=ghh-n=gh- =h bgfj bkfjbkj bfghk ghfdg h y5jht5h6yi5h4 tuhtu rh hi uh rh i u h tirdghh jkrghklj rh kgh y569y894827895657y6877lfg'l#lhlt"
  31. local Remote = game:GetService("ReplicatedStorage"):WaitForChild("ShopParser\a\n\a")
  32.  
  33. function addEffect(obj)
  34. local RS = game:GetService("RunService").RenderStepped
  35. -- for _,v in pairs(obj:children()) do
  36. obj.MouseButton1Down:connect(function(X, Y)
  37. -- if not obj:FindFirstChild('circle') then
  38. local C = Instance.new('ImageLabel', obj)
  39. C.BackgroundTransparency = 1
  40. C.Position = UDim2.new(0, X - 0, 0, Y - 35) - UDim2.new(0, obj.AbsolutePosition.X, 0, obj.AbsolutePosition.Y)
  41. C.Size = UDim2.new(0, 0, 0, 0)
  42. C.ZIndex = obj.ZIndex
  43. C.Image = 'rbxassetid://200182847'
  44. C.ImageColor3 = Color3.new(255/255, 255/255, 255/255)
  45. C.Name = 'circle'
  46. C:TweenSizeAndPosition(UDim2.new(0, 500, 0, 500), C.Position - UDim2.new(0, 250, 0, 250), "Out", "Quart", 2.5)
  47. for i = 0, 0.9, 0.03 do
  48. C.ImageTransparency = i
  49. RS:wait()
  50. end
  51. C:destroy()
  52. -- end
  53. end)
  54. -- end
  55. end
  56.  
  57. function tweent(element,starta,enda,length)
  58. coroutine.resume(coroutine.create(function()
  59. local startTime = time()
  60. local lastTextTrans = element.TextTransparency
  61.  
  62. while time() - startTime < length do
  63. if element.TextTransparency == lastTextTrans then
  64. element.TextTransparency = ((enda - starta) * ((time() - startTime)/length)) + starta
  65. else
  66. break
  67. end
  68. lastTextTrans = element.TextTransparency
  69. wait(.01)
  70. end
  71. element.TextTransparency = enda
  72. return true
  73. end))
  74. end
  75. function tweenb(element,starta,enda,length)
  76. coroutine.resume(coroutine.create(function()
  77. local startTime = time()
  78. local lastTextTrans = element.BackgroundTransparency
  79.  
  80. while time() - startTime < length do
  81. if element.BackgroundTransparency == lastTextTrans then
  82. element.BackgroundTransparency = ((enda - starta) * ((time() - startTime)/length)) + starta
  83. else
  84. break
  85. end
  86. lastTextTrans = element.BackgroundTransparency
  87. wait(.01)
  88. end
  89. element.BackgroundTransparency = enda
  90. return true
  91. end))
  92. end
  93.  
  94.  
  95. function loadItems()
  96. for name,index in pairs(Items) do
  97. local price
  98. local image
  99. local pass = index.Id
  100. local mps = game:GetService("MarketplaceService")
  101. price = mps:GetProductInfo(pass).PriceInRobux
  102. image = mps:GetProductInfo(pass).IconImageAssetId
  103. if index.Type == "Dev" then
  104. Create(name, index.Id, index.Description, index.ImageID, index.Price, index.Type)
  105. else
  106. Create(name, index.Id, index.Description, index.ImageID, price, index.Type)
  107. end
  108. wait()
  109. end
  110. end-- buy = 0.3, image = 0, desc = text, name = text
  111.  
  112. local y = 5
  113. function Create(name, id, desc, imgID, price, typ)
  114. local aa = Main:WaitForChild("itm"):Clone()
  115. local Buy = aa:WaitForChild("Buy");addEffect(Buy)
  116. local Image = aa:WaitForChild("Image")
  117. local Desc = aa:WaitForChild("Desc")
  118. local Name = aa:WaitForChild("Name")
  119. local Price = aa:WaitForChild("Price")
  120. Image.Image = "rbxassetid://"..tostring(imgID)
  121. aa.Name = name
  122. Name.Text = name
  123. Desc.Text = desc
  124. Price.Text = "R$ "..tostring(price)
  125. Buy.MouseButton1Down:connect(function()
  126. local plr = game:GetService("Players").LocalPlayer
  127. local p = game:GetService("MarketplaceService")
  128. if typ == "Dev" then
  129. p:PromptProductPurchase(plr, id)
  130. Remote:InvokeServer(RemoteKey, "CheckForUserPurchased", tostring(id))
  131. elseif typ == "Gamepass" then
  132. p:PromptPurchase(plr, id)
  133. Remote:InvokeServer(RemoteKey, "CheckForUserPurchased", tostring(id))
  134. end
  135. end)
  136. aa.Visible = true
  137. aa.Position = UDim2.new(0, 0, 0, y)
  138. aa.Parent = List
  139. tweenb(aa, 1, 0, 0.7)
  140. tweenb(Image, 1, 0, 0.7)
  141. tweent(Price, 1, 0, 0.7)
  142. tweent(Desc, 1, 0, 0.7)
  143. tweenb(Buy, 1, 0, 0.7)
  144. tweent(Name, 1, 0, 0.7)
  145. y = y + 125
  146. List.CanvasSize = List.CanvasSize + UDim2.new(0, 0, 0, 125)
  147. wait(.1)
  148. end
  149.  
  150. loadItems()
  151.  
  152. local isOpen = false
  153. Open.MouseButton1Down:connect(function()
  154. if not isOpen then
  155. isOpen = true
  156. Open:TweenPosition(UDim2.new(-0.5, 0, 0, 600), "In", "Quint", 0.5 , true)
  157. Main:TweenPosition(UDim2.new(0, 5, 0.3, 0), "Out", "Quint", 0.5, true)
  158. else
  159. return;
  160. end
  161. end)
  162.  
  163. Close.MouseButton1Down:connect(function()
  164. isOpen = false
  165. Main:TweenPosition(UDim2.new(-1, 0, 0.3, 0), "In", "Quint", 0.5, true)
  166. Open:TweenPosition(UDim2.new(0, 5, 0, 600), "Out", "Quint", 0.5, true)
  167. end)
  168. addEffect(Close);
  169. addEffect(Open);
  170. --Remote.OnClientInvoke = function(p, ...)
  171. -- local Data = {...}
  172. -- if Data[1] == RemoteKey then
  173. -- if Data[2] == "PromptUserWithPurchasedUI" then
  174. -- local gui = script["ProductPurchased"]:Clone()
  175. -- gui["Client"].Disabled = false
  176. -- gui.Parent = game:GetService("Players").LocalPlayer.PlayerGui
  177. -- end
  178. -- elseif Data[1] ~= RemoteKey then
  179. -- Remote:InvokeServer(RemoteKey, "BanUserForInvalidDataSentThroughRemote", game:GetService("Players").LocalPlayer)
  180. -- end
  181. --end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement