Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game.ReplicatedStorage.TriggerCam.OnClientEvent:Connect(function()
- local player = game.Players.LocalPlayer
- local shop = player.PlayerGui.Shop
- local camera = workspace.CurrentCamera
- local mainshop = workspace.Shop
- local item = shop.Item
- local buy = shop.Frame.Buy
- local shadow = buy.Shadow
- if shop.Closed.Value == false then
- if shop.Open.Value == false then
- shop.Open.Value = true
- shop.Frame:TweenPosition(UDim2.new(0,0,0,0),"Out","Quint",1,true)
- shop.Item.Value = 1
- camera.CameraType = Enum.CameraType.Scriptable
- camera.CameraSubject = mainshop.Cam1
- camera.CFrame = mainshop.Cam1.CFrame
- shop.Frame.TextLabel.Text = mainshop:FindFirstChild("Part"..shop.Item.Value).ItemName.Value
- shop.Frame.Buy.Text = mainshop:FindFirstChild("Part"..shop.Item.Value).ItemPrice.Value
- game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,false)
- if player.Backpack:FindFirstChild(workspace.Shop:FindFirstChild("Part"..item.Value).ItemName.Value) ~= nil then
- buy.Text = "Bought"
- buy.BackgroundColor3 = Color3.new(0.7,0.7,0.7)
- shadow.BackgroundColor3 = Color3.new(0.5,0.5,0.5)
- else
- buy.Text = workspace.Shop:FindFirstChild("Part"..item.Value).ItemPrice.Value
- buy.BackgroundColor3 = Color3.fromRGB(85,255,127)
- buy.BackgroundColor3 = Color3.fromRGB(70, 212, 104)
- end
- end
- end
- end)
Advertisement