Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- Made by Scootakip
- --- Put this in a localscript inside of the TextButton which should be inside of a ScreenGui inside of StarterGui
- local button = script.Parent
- local car = game.Lighting.Car
- local player = game.Players.LocalPlayer.Character
- local cars = game.Players.LocalPlayer.leaderstats.Car
- button.Text = "Get Car"
- function GetCar()
- if cars.Value == 0 then
- button.Text = "Remove Car"
- a = car:clone()
- a.Parent = game.Workspace
- a:MakeJoints()
- a:MoveTo(player.Torso.Position + Vector3.new(0,0,10))
- cars.Value = 1
- elseif cars.Value == 1 then
- button.Text = "Get Car"
- a:Destroy()
- cars.Value = 0
- end
- end
- script.Parent.MouseButton1Click:connect(GetCar)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement