Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- FrizzleBurgers Shop Client
- --]]
- --[[
- Config.Items stuff;
- ["Gamepass Name"] = the name of the pass
- Id = id to the gamepass/devproduct
- ImageID = the id to the image you want on the gui
- Description = short description about the gamepass
- Type = the type of pass, the types are as follows:
- Type = "Gamepass" -- for gamepasses
- Type = "Dev" -- for dev products--740923972
- --]]
- local Items = {
- ["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"},
- ["Red Balloon"] = {Id = 5903630, ImageID = 797945232, Description = "Who said that you cant fly? ", Type = "Gamepass"},
- ["Selfie Stick"] = {Id = 5903640, ImageID = 797945738, Description = "It's SELFIE time!", Type = "Gamepass"},
- ["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"},
- };
- local Main = script.Parent
- local Open = script.Parent.Parent:WaitForChild("Open")
- local List = Main:WaitForChild("List")
- local Close = Main:WaitForChild("Close")
- 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"
- local Remote = game:GetService("ReplicatedStorage"):WaitForChild("ShopParser\a\n\a")
- function addEffect(obj)
- local RS = game:GetService("RunService").RenderStepped
- -- for _,v in pairs(obj:children()) do
- obj.MouseButton1Down:connect(function(X, Y)
- -- if not obj:FindFirstChild('circle') then
- local C = Instance.new('ImageLabel', obj)
- C.BackgroundTransparency = 1
- C.Position = UDim2.new(0, X - 0, 0, Y - 35) - UDim2.new(0, obj.AbsolutePosition.X, 0, obj.AbsolutePosition.Y)
- C.Size = UDim2.new(0, 0, 0, 0)
- C.ZIndex = obj.ZIndex
- C.Image = 'rbxassetid://200182847'
- C.ImageColor3 = Color3.new(255/255, 255/255, 255/255)
- C.Name = 'circle'
- C:TweenSizeAndPosition(UDim2.new(0, 500, 0, 500), C.Position - UDim2.new(0, 250, 0, 250), "Out", "Quart", 2.5)
- for i = 0, 0.9, 0.03 do
- C.ImageTransparency = i
- RS:wait()
- end
- C:destroy()
- -- end
- end)
- -- end
- end
- function tweent(element,starta,enda,length)
- coroutine.resume(coroutine.create(function()
- local startTime = time()
- local lastTextTrans = element.TextTransparency
- while time() - startTime < length do
- if element.TextTransparency == lastTextTrans then
- element.TextTransparency = ((enda - starta) * ((time() - startTime)/length)) + starta
- else
- break
- end
- lastTextTrans = element.TextTransparency
- wait(.01)
- end
- element.TextTransparency = enda
- return true
- end))
- end
- function tweenb(element,starta,enda,length)
- coroutine.resume(coroutine.create(function()
- local startTime = time()
- local lastTextTrans = element.BackgroundTransparency
- while time() - startTime < length do
- if element.BackgroundTransparency == lastTextTrans then
- element.BackgroundTransparency = ((enda - starta) * ((time() - startTime)/length)) + starta
- else
- break
- end
- lastTextTrans = element.BackgroundTransparency
- wait(.01)
- end
- element.BackgroundTransparency = enda
- return true
- end))
- end
- function loadItems()
- for name,index in pairs(Items) do
- local price
- local image
- local pass = index.Id
- local mps = game:GetService("MarketplaceService")
- price = mps:GetProductInfo(pass).PriceInRobux
- image = mps:GetProductInfo(pass).IconImageAssetId
- if index.Type == "Dev" then
- Create(name, index.Id, index.Description, index.ImageID, index.Price, index.Type)
- else
- Create(name, index.Id, index.Description, index.ImageID, price, index.Type)
- end
- wait()
- end
- end-- buy = 0.3, image = 0, desc = text, name = text
- local y = 5
- function Create(name, id, desc, imgID, price, typ)
- local aa = Main:WaitForChild("itm"):Clone()
- local Buy = aa:WaitForChild("Buy");addEffect(Buy)
- local Image = aa:WaitForChild("Image")
- local Desc = aa:WaitForChild("Desc")
- local Name = aa:WaitForChild("Name")
- local Price = aa:WaitForChild("Price")
- Image.Image = "rbxassetid://"..tostring(imgID)
- aa.Name = name
- Name.Text = name
- Desc.Text = desc
- Price.Text = "R$ "..tostring(price)
- Buy.MouseButton1Down:connect(function()
- local plr = game:GetService("Players").LocalPlayer
- local p = game:GetService("MarketplaceService")
- if typ == "Dev" then
- p:PromptProductPurchase(plr, id)
- Remote:InvokeServer(RemoteKey, "CheckForUserPurchased", tostring(id))
- elseif typ == "Gamepass" then
- p:PromptPurchase(plr, id)
- Remote:InvokeServer(RemoteKey, "CheckForUserPurchased", tostring(id))
- end
- end)
- aa.Visible = true
- aa.Position = UDim2.new(0, 0, 0, y)
- aa.Parent = List
- tweenb(aa, 1, 0, 0.7)
- tweenb(Image, 1, 0, 0.7)
- tweent(Price, 1, 0, 0.7)
- tweent(Desc, 1, 0, 0.7)
- tweenb(Buy, 1, 0, 0.7)
- tweent(Name, 1, 0, 0.7)
- y = y + 125
- List.CanvasSize = List.CanvasSize + UDim2.new(0, 0, 0, 125)
- wait(.1)
- end
- loadItems()
- local isOpen = false
- Open.MouseButton1Down:connect(function()
- if not isOpen then
- isOpen = true
- Open:TweenPosition(UDim2.new(-0.5, 0, 0, 600), "In", "Quint", 0.5 , true)
- Main:TweenPosition(UDim2.new(0, 5, 0.3, 0), "Out", "Quint", 0.5, true)
- else
- return;
- end
- end)
- Close.MouseButton1Down:connect(function()
- isOpen = false
- Main:TweenPosition(UDim2.new(-1, 0, 0.3, 0), "In", "Quint", 0.5, true)
- Open:TweenPosition(UDim2.new(0, 5, 0, 600), "Out", "Quint", 0.5, true)
- end)
- addEffect(Close);
- addEffect(Open);
- --Remote.OnClientInvoke = function(p, ...)
- -- local Data = {...}
- -- if Data[1] == RemoteKey then
- -- if Data[2] == "PromptUserWithPurchasedUI" then
- -- local gui = script["ProductPurchased"]:Clone()
- -- gui["Client"].Disabled = false
- -- gui.Parent = game:GetService("Players").LocalPlayer.PlayerGui
- -- end
- -- elseif Data[1] ~= RemoteKey then
- -- Remote:InvokeServer(RemoteKey, "BanUserForInvalidDataSentThroughRemote", game:GetService("Players").LocalPlayer)
- -- end
- --end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement