Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wait(2)
- local finish = workspace.Focus1.CFrame
- camera = workspace.CurrentCamera
- local timed = script.Pos.Value
- local player = game.Players.LocalPlayer
- local char = nil
- finished = nil
- local Back = script.Parent.ScreenGui.Backward
- local For = script.Parent.ScreenGui.Forward
- local itemN = script.Parent.ScreenGui.ItemName
- local itemC = script.Parent.ScreenGui.ItemCost
- local Shop = script.Parent.ScreenGui.ShopButton
- local Pur = script.Parent.ScreenGui.PurchaseButton
- local Debounce = false
- local function movie()
- finished = workspace:FindFirstChild("Focus1")
- timed = 1
- itemN.Text = finished.Item.Value
- itemC.Text = "$"..finished.Cost.Value
- camera.CFrame = finished.CFrame
- game:GetService("RunService").RenderStepped:Wait()
- end
- Pur.MouseButton1Down:connect(function()
- finished = workspace:FindFirstChild("Focus"..timed)
- local cash = player.leaderstats.Cash
- char = player.Character
- local Tools = char:FindFirstChild("tool")
- if cash.Value >= finished.Cost.Value then
- if Tools then
- char.tool:Destroy()
- cash.Value = cash.Value - finished.Cost.Value
- local item = game.ReplicatedStorage:FindFirstChild(finished.Item.Value):Clone()
- item.Name = "tool"
- item.Parent = player.StarterGear
- item.Parent = player.Backpack
- else
- player.Backpack.tool:Destroy()
- cash.Value = cash.Value - finished.Cost.Value
- local item = game.ReplicatedStorage:FindFirstChild(finished.Item.Value):Clone()
- item.Name = "tool"
- item.Parent = player.StarterGear
- item.Parent = player.Backpack
- end
- end
- end)
- Shop.MouseButton1Click:connect(function()
- char = player.Character
- if Debounce == false then
- camera.CameraType = "Scriptable"
- Back.Visible = true
- For.Visible = true
- itemC.Visible = true
- itemN.Visible = true
- Pur.Visible = true
- Debounce = true
- movie()
- else
- game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
- camera.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
- game.Workspace.CurrentCamera.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
- game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.HumanoidRootPart
- wait(1)
- Back.Visible = false
- For.Visible = false
- itemC.Visible = false
- itemN.Visible = false
- Pur.Visible = false
- camera.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
- game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
- camera.CameraType = Enum.CameraType.Custom
- Debounce = false
- game.Players.LocalPlayer.Character.Humanoid.Health = 0
- end
- end)
- For.MouseButton1Down:connect(function()
- timed = timed + 1
- if timed == 5 then
- timed = 1
- end
- finished = workspace:FindFirstChild("Focus"..timed)
- itemN.Text = finished.Item.Value
- itemC.Text = "$"..finished.Cost.Value
- for i = 0,1,0.001 do
- camera.CameraType = Enum.CameraType.Custom
- camera.CFrame = camera.CFrame:lerp(finished.CFrame,i)
- wait(0.01)
- end
- end)
- Back.MouseButton1Down:connect(function()
- timed = timed - 1
- if timed == 0 then
- timed = 4
- end
- finished = workspace:FindFirstChild("Focus"..timed)
- itemN.Text = finished.Item.Value
- itemC.Text = "$"..finished.Cost.Value
- for i = 0,1,0.001 do
- camera.CameraType = Enum.CameraType.Custom
- camera.CFrame = camera.CFrame:lerp(finished.CFrame,i)
- wait(0.01)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement