Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.16 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local char = player.Character
  3. local camera = workspace.CurrentCamera
  4. local mainShop = workspace:WaitForChild("ShopFolder")
  5. local shop = player.PlayerGui.ToolShop
  6. local item = shop.Item
  7. local buy = shop.shopFrame.BuyButton
  8. local buyShadow = buy.Shadow
  9. local shopOpenButton = script.Parent.Parent.FirstShopGui.ShopButton
  10. local backpackButton = script.Parent.Parent.FirstShopGui.BackPackShopButton
  11.  
  12. shopOpenButton.MouseButton1Click:Connect(function()
  13.     if shop.Closed.Value == true then
  14.         if shop.Open.Value == false then
  15.             shop.Open.Value = true
  16.             shop.Closed.Value = false
  17.             for i = 1,0,-0.1 do
  18.                 script.Parent.blackBG.BackgroundTransparency = i
  19.                 wait(0.05)
  20.             end
  21.             wait(1)
  22.             shopOpenButton.Position = UDim2.new(0,0,1.7,0)
  23.             backpackButton.Position = UDim2.new(0,0,1.7,0)
  24.             shop.shopFrame:TweenPosition(UDim2.new(0,0,0,0), 'Out', 'Back', 1, true)
  25.             shop.Item.Value = 1
  26.             camera.CameraType = "Scriptable"
  27.             camera.CameraSubject = mainShop.Cam1
  28.             camera.CFrame = mainShop.Cam1.CFrame
  29.             for i = 0,1,0.05 do
  30.                 script.Parent.blackBG.BackgroundTransparency = i
  31.                 wait(0.05)
  32.             end
  33.         end
  34.     end
  35. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement