Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
444
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. local PartZone = workspace:WaitForChild("DoorZones"):WaitForChild("ZoneA")
  2. local Price = 5
  3. local player = script.Parent.Parent.Parent.Parent.Parent.Parent
  4.  
  5. script.Parent.MouseButton1Click:Connect(function()
  6. if player.leaderstats.Money.Value >= Price then
  7. player.leaderstats.Money.Value = player.leaderstats.Money.Value - Price
  8. PartZone:Destroy()
  9. player.Zone.Zones.Value = player.Zone.Zones.Value + 1
  10. script.Parent.Parent:TweenPosition(UDim2.new(0.5,0,1.5,0),Enum.EasingDirection.Out,Enum.EasingStyle.Back,1,true)
  11. wait(1)
  12. script.Parent.Parent.Parent:Destroy()
  13. end
  14. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement