Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ScreenGui = Instance.new("ScreenGui")
- local Main = Instance.new("Frame")
- local Buy = Instance.new("TextButton")
- local Quan = Instance.new("TextBox")
- local Item = Instance.new("TextBox")
- local Frame = Instance.new("Frame")
- local Close = Instance.new("TextButton")
- ScreenGui.Parent = game.CoreGui
- Main.Name = "Main"
- Main.Parent = ScreenGui
- Main.BackgroundColor3 = Color3.new(0.0745098, 0.772549, 0.772549)
- Main.BorderSizePixel = 0
- Main.Position = UDim2.new(0.39054966, 0, 0.204301074, 0)
- Main.Size = UDim2.new(0, 226, 0, 219)
- Main.Active = true
- Main.Draggable = true
- Buy.Name = "Buy"
- Buy.Parent = Main
- Buy.BackgroundColor3 = Color3.new(0.92549, 0, 0.0117647)
- Buy.BorderColor3 = Color3.new(0, 0, 0)
- Buy.BorderSizePixel = 3
- Buy.Position = UDim2.new(0.0663716868, 0, 0.753424644, 0)
- Buy.Size = UDim2.new(0, 195, 0, 45)
- Buy.Font = Enum.Font.Bodoni
- Buy.Text = "Buy Item"
- Buy.TextColor3 = Color3.new(0, 0, 0)
- Buy.TextScaled = true
- Buy.TextSize = 14
- Buy.TextWrapped = true
- Quan.Name = "Quan"
- Quan.Parent = Main
- Quan.BackgroundColor3 = Color3.new(0.145098, 0.619608, 0.603922)
- Quan.BorderSizePixel = 3
- Quan.Position = UDim2.new(0.292035401, 0, 0.219178081, 0)
- Quan.Size = UDim2.new(0, 94, 0, 42)
- Quan.Font = Enum.Font.SourceSans
- Quan.PlaceholderText = "Quantity Here"
- Quan.Text = "1"
- Quan.TextColor3 = Color3.new(0, 0, 0)
- Quan.TextScaled = true
- Quan.TextSize = 14
- Quan.TextWrapped = true
- Item.Name = "Item"
- Item.Parent = Main
- Item.BackgroundColor3 = Color3.new(0.145098, 0.619608, 0.603922)
- Item.BorderSizePixel = 3
- Item.Position = UDim2.new(0.18141593, 0, 0.493150711, 0)
- Item.Size = UDim2.new(0, 144, 0, 42)
- Item.Font = Enum.Font.SourceSans
- Item.PlaceholderText = "Item Name Here"
- Item.Text = ""
- Item.TextColor3 = Color3.new(0, 0, 0)
- Item.TextScaled = true
- Item.TextSize = 14
- Item.TextWrapped = true
- Frame.Parent = Main
- Frame.BackgroundColor3 = Color3.new(0.113725, 0.227451, 0.85098)
- Frame.BorderSizePixel = 0
- Frame.Position = UDim2.new(0, -6, 0, 0)
- Frame.Size = UDim2.new(0, 237, 0, 37)
- Close.Name = "Close"
- Close.Parent = Frame
- Close.BackgroundColor3 = Color3.new(1, 0, 0)
- Close.BorderSizePixel = 0
- Close.Position = UDim2.new(0, 194, 0, 0)
- Close.Size = UDim2.new(0, 43, 0, 37)
- Close.Font = Enum.Font.GothamBold
- Close.Text = "X"
- Close.TextColor3 = Color3.new(0, 0, 0)
- Close.TextScaled = true
- Close.TextSize = 14
- Close.TextWrapped = true
- -- Scripts:
- function Sound11()
- local s = Instance.new("Sound")
- s.Name = "Sound"
- s.SoundId = "rbxassetid://408524543"
- s.Volume = 2
- s.archivable = false
- s.Parent = game.Workspace
- s:play()
- end
- function Sound22()
- local Song1 = Instance.new("Sound")
- Song1.Name = "Song1"
- Song1.SoundId = "rbxassetid://452267918"
- Song1.Volume = 2
- Song1.archivable = false
- Song1.Parent = game.Workspace
- Song1:play()
- end
- Buy.MouseEnter:connect(function()
- Sound11()
- Buy.TextColor3 = Color3.new(0.92549, 0, 0.0117647)
- Buy.BackgroundColor3 = Color3.new(0, 0, 0)
- Buy.BorderColor3 = Color3.new(0.92549, 0, 0.0117647)
- end)
- Buy.MouseLeave:Connect(function()
- Buy.TextColor3 = Color3.new(0, 0, 0)
- Buy.BackgroundColor3 = Color3.new(0.92549, 0, 0.0117647)
- Buy.BorderColor3 = Color3.new(0, 0, 0)
- end)
- Close.MouseEnter:connect(function()
- Sound11()
- Close.BackgroundColor3 = Color3.new(0, 0, 0)
- Close.TextColor3 = Color3.new(1, 0, 0)
- end)
- Close.MouseLeave:Connect(function()
- Close.BackgroundColor3 = Color3.new(1, 0, 0)
- Close.TextColor3 = Color3.new(0, 0, 0)
- end)
- function Tlprt(XP,YP,ZP)
- -- Config How Many Blocks It Will Tp You Untill The Final Destination:
- local XTpEvery = 25
- local ZTpEvery = 25
- local YTpEvery = 25
- --Time to Tp Every:
- local Timer = 0.035
- --Script:
- local pos = game:GetService('Players').LocalPlayer.Character.HumanoidRootPart
- if pos.Position.X < XP then
- for x = pos.Position.X,XP,XTpEvery do
- game.Players.LocalPlayer.Character:MoveTo(Vector3.new(x,pos.Position.Y,pos.Position.Z))
- local part = Instance.new("Part", workspace)
- part.Anchored = true
- part.Size = Vector3.new(10,0.1,10)
- part.Material = "Glass"
- part.BrickColor = BrickColor.Random()
- part.Transparency = 0.7
- part.Position = game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(0,-3.05,0)
- wait(Timer)
- part.Destroy(part)
- end
- else
- for x = pos.Position.X,XP,-XTpEvery do
- game.Players.LocalPlayer.Character:MoveTo(Vector3.new(x,pos.Position.Y,pos.Position.Z))
- local part = Instance.new("Part", workspace)
- part.Anchored = true
- part.Size = Vector3.new(10,0.1,10)
- part.Material = "Glass"
- part.BrickColor = BrickColor.Random()
- part.Transparency = 0.7
- part.Position = game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(0,-3.05,0)
- wait(Timer)
- part.Destroy(part)
- end
- end
- if pos.Position.Z < ZP then
- for z = pos.Position.Z,ZP,ZTpEvery do
- game.Players.LocalPlayer.Character:MoveTo(Vector3.new(pos.Position.X,pos.Position.Y,z))
- local part = Instance.new("Part", workspace)
- part.Anchored = true
- part.Size = Vector3.new(10,0.1,10)
- part.Material = "Glass"
- part.BrickColor = BrickColor.Random()
- part.Transparency = 0.7
- part.Position = game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(0,-3.05,0)
- wait(Timer)
- part.Destroy(part)
- end
- else
- for z = pos.Position.Z,ZP,-ZTpEvery do
- game.Players.LocalPlayer.Character:MoveTo(Vector3.new(pos.Position.X,pos.Position.Y,z))
- local part = Instance.new("Part", workspace)
- part.Anchored = true
- part.Size = Vector3.new(10,0.1,10)
- part.Material = "Glass"
- part.BrickColor = BrickColor.Random()
- part.Transparency = 0.7
- part.Position = game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(0,-3.05,0)
- wait(Timer)
- part.Destroy(part)
- end
- end
- if pos.Position.Y < YP then
- for High = pos.Position.Y,YP,YTpEvery do
- game.Players.LocalPlayer.Character:MoveTo(Vector3.new(pos.Position.X ,High ,pos.Position.Z))
- local part = Instance.new("Part", workspace)
- part.Anchored = true
- part.Size = Vector3.new(10,0.1,10)
- part.Material = "Glass"
- part.BrickColor = BrickColor.Random()
- part.Transparency = 0.7
- part.Position = game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(0,-3.05,0)
- wait(Timer)
- part.Destroy(part)
- end
- else
- for High = pos.Position.Y,YP,-YTpEvery do
- game.Players.LocalPlayer.Character:MoveTo(Vector3.new(pos.Position.X ,High ,pos.Position.Z))
- local part = Instance.new("Part", workspace)
- part.Anchored = true
- part.Size = Vector3.new(10,0.1,10)
- part.Material = "Glass"
- part.BrickColor = BrickColor.Random()
- part.Transparency = 0.7
- part.Position = game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position + Vector3.new(0,-3.05,0)
- wait(Timer)
- part.Destroy(part)
- end
- end
- game.Players.LocalPlayer.Character:MoveTo(Vector3.new(XP,YP,ZP))
- end
- Close.MouseButton1Down:connect(function()
- Sound22()
- Main.Visible = false
- end)
- Buy.MouseButton1Down:connect(function()
- Sound22()
- local Item = Item.Text
- local Quant = Quan.Text
- local Base
- for i, v in pairs(game.Workspace.Properties:GetChildren()) do
- if v.Owner.Value == game.Players.LocalPlayer then
- Base = v.OriginSquare
- end
- end
- if not game.ReplicatedStorage:FindFirstChild("Part") then
- local a = Instance.new("Part",game.ReplicatedStorage)
- game.Workspace.PlayerModels.ChildAdded:connect(function(v)
- local BaseC
- for i, v in pairs(game.Workspace.Properties:GetChildren()) do
- if v.Owner.Value == game.Players.LocalPlayer then
- BaseC = v.OriginSquare.CFrame + Vector3.new(0,5,0)
- end
- end
- if v:FindFirstChild("Owner") and v.Owner.Value == game.Players.LocalPlayer then
- if string.find(v.Name, "Purchased by "..game.Players.LocalPlayer.Name) then
- game.ReplicatedStorage.Interaction.ClientIsDragging:FireServer(v.PrimaryPart)
- game.ReplicatedStorage.Interaction.ClientRequestOwnership:FireServer(v.PrimaryPart)
- wait()
- v.PrimaryPart.CFrame = BaseC
- wait()
- game.ReplicatedStorage.Interaction.ClientIsDragging:FireServer(v.PrimaryPart)
- game.ReplicatedStorage.Interaction.ClientRequestOwnership:FireServer(v.PrimaryPart)
- end
- end
- end)
- end
- if game.Workspace.Stores:FindFirstChild("ShopItems") then
- for i,v in pairs(game.Workspace.Stores:GetDescendants()) do
- if v.Parent.Name == "ShopItems" then
- if v.Name == "Sawmill4L" then
- v.Parent.Name = "WoodRUs_"
- elseif v.Name == "Pickup1" then
- v.Parent.Name = "CarStore_"
- elseif v.Name == "LightBulb" then
- v.Parent.Name = "FurnitureStore_"
- elseif v.Name == "GateXOR" then
- v.Parent.Name = "LogicStore_"
- elseif v.Name == "CanOfWorms" then
- v.Parent.Name = "ShackShop_"
- elseif v.Name == "Painting8" then
- v.Parent.Name = "FineArt_"
- end
- end
- end
- end
- function Drag(It)
- game.ReplicatedStorage.Interaction.ClientIsDragging:FireServer(It)
- end
- local Cframe
- for i,v in pairs(game.Workspace.Stores:GetChildren()) do
- if v:FindFirstChild(Item) then
- if v.Name == "WoodRUs_" then
- for i=1,Quant do
- Cframe = game.Workspace.Stores.WoodRUs.Counter
- Tlprt(v[Item].Main.Position.X + 3 ,v[Item].Main.Position.Y ,v[Item].Main.Position.Z + 3)
- Drag(v[Item])
- v[Item].Main.CFrame = Cframe.CFrame
- wait(0.1)
- Tlprt(v[Item].Main.Position.X + 3 ,v[Item].Main.Position.Y ,v[Item].Main.Position.Z + 3)
- wait(0.4)
- local A_1 =
- {
- ["Character"] = game:GetService("Workspace").Stores.WoodRUs.Thom,
- ["Name"] = "Thom",
- ["ID"] = 11,
- ["Dialog"] = game:GetService("Workspace").Stores.WoodRUs.Thom.Dialog
- }
- local A_2 = "ConfirmPurchase"
- local Event = game:GetService("ReplicatedStorage").NPCDialog.PlayerChatted
- Event:InvokeServer(A_1, A_2)
- wait(0.1)
- end
- break
- elseif v.Name == "CarStore_" then
- Cframe = game.Workspace.Stores.CarStore.Counter
- for i=1,Quant do
- Tlprt(v[Item].Main.Position.X + 3 ,v[Item].Main.Position.Y ,v[Item].Main.Position.Z + 3)
- Drag(v[Item])
- v[Item].Main.CFrame = Cframe.CFrame
- wait(0.1)
- Tlprt(v[Item].Main.Position.X + 3 ,v[Item].Main.Position.Y ,v[Item].Main.Position.Z + 3)
- wait(0.4)
- local A_1 =
- {
- ["Character"] = game:GetService("Workspace").Stores.CarStore.Jenny,
- ["Name"] = "Jenny",
- ["ID"] = 12,
- ["Dialog"] = game:GetService("Workspace").Stores.CarStore.Jenny.Dialog
- }
- local A_2 = "ConfirmPurchase"
- local Event = game:GetService("ReplicatedStorage").NPCDialog.PlayerChatted
- Event:InvokeServer(A_1, A_2)
- wait(0.1)
- end
- break
- elseif v.Name == "FurnitureStore_" then
- Cframe = game.Workspace.Stores.FurnitureStore.Counter
- for i=1,Quant do
- Tlprt(v[Item].Main.Position.X + 3 ,v[Item].Main.Position.Y ,v[Item].Main.Position.Z + 3)
- Drag(v[Item])
- v[Item].Main.CFrame = Cframe.CFrame
- wait(0.1)
- Tlprt(v[Item].Main.Position.X + 3 ,v[Item].Main.Position.Y ,v[Item].Main.Position.Z + 3)
- wait(0.4)
- local A_1 =
- {
- ["Character"] = game:GetService("Workspace").Stores.FurnitureStore.Corey,
- ["Name"] = "Corey",
- ["ID"] = 10,
- ["Dialog"] = game:GetService("Workspace").Stores.FurnitureStore.Corey.Dialog
- }
- local A_2 = "ConfirmPurchase"
- local Event = game:GetService("ReplicatedStorage").NPCDialog.PlayerChatted
- Event:InvokeServer(A_1, A_2)
- wait(0.1)
- end
- break
- elseif v.Name == "LogicStore_" then
- Cframe = game.Workspace.Stores.LogicStore.Counter
- for i=1,Quant do
- Tlprt(v[Item].Main.Position.X + 3 ,v[Item].Main.Position.Y ,v[Item].Main.Position.Z + 3)
- Drag(v[Item])
- v[Item].Main.CFrame = Cframe.CFrame
- wait(0.1)
- Tlprt(v[Item].Main.Position.X + 3 ,v[Item].Main.Position.Y ,v[Item].Main.Position.Z + 3)
- wait(0.4)
- local A_1 =
- {
- ["Character"] = game:GetService("Workspace").Stores.LogicStore.Lincoln,
- ["Name"] = "Lincoln",
- ["ID"] = 15,
- ["Dialog"] = game:GetService("Workspace").Stores.LogicStore.Lincoln.Dialog
- }
- local A_2 = "ConfirmPurchase"
- local Event = game:GetService("ReplicatedStorage").NPCDialog.PlayerChatted
- Event:InvokeServer(A_1, A_2)
- wait(0.1)
- end
- break
- elseif v.Name == "ShackShop_" then
- Cframe = game.Workspace.Stores.ShackShop.Counter
- for i=1,Quant do
- Tlprt(v[Item].Main.Position.X + 3 ,v[Item].Main.Position.Y ,v[Item].Main.Position.Z + 3)
- Drag(v[Item])
- v[Item].Main.CFrame = Cframe.CFrame
- wait(0.1)
- Tlprt(v[Item].Main.Position.X + 3 ,v[Item].Main.Position.Y ,v[Item].Main.Position.Z + 3)
- wait(0.4)
- local A_1 =
- {
- ["Character"] = game:GetService("Workspace").Stores.ShackShop.Bob,
- ["Name"] = "Bob",
- ["ID"] = 13,
- ["Dialog"] = game:GetService("Workspace").Stores.ShackShop.Bob.Dialog
- }
- local A_2 = "ConfirmPurchase"
- local Event = game:GetService("ReplicatedStorage").NPCDialog.PlayerChatted
- Event:InvokeServer(A_1, A_2)
- wait(0.1)
- end
- break
- elseif v.Name == "FineArt_" then
- Cframe = game.Workspace.Stores.FineArt.Counter
- for i=1,Quant do
- Tlprt(v[Item].Main.Position.X + 3 ,v[Item].Main.Position.Y ,v[Item].Main.Position.Z + 3)
- Drag(v[Item])
- v[Item].Main.CFrame = Cframe.CFrame
- wait(0.1)
- Tlprt(v[Item].Main.Position.X + 3 ,v[Item].Main.Position.Y ,v[Item].Main.Position.Z + 3)
- wait(0.4)
- local A_1 =
- {
- ["Character"] = game:GetService("Workspace").Stores.FineArt.Timothy,
- ["Name"] = "Timothy",
- ["ID"] = 14,
- ["Dialog"] = game:GetService("Workspace").Stores.FineArt.Timothy.Dialog
- }
- local A_2 = "ConfirmPurchase"
- local Event = game:GetService("ReplicatedStorage").NPCDialog.PlayerChatted
- Event:InvokeServer(A_1, A_2)
- wait(0.1)
- end
- break
- end
- end
- end
- Tlprt(Base.Position.X, Base.Position.Y, Base.Position.Z)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement