Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local delToollocal
- function FindFirstDeliveryTool()
- local children = workspace:GetChildren()
- for i = 1, #children do
- local v = children[i]
- if
- v.ClassName == "Tool" and v.Name:match("^%u%d$") and ffc(v, "House") and ffc(v, "Handle") and
- ffc(v, "Order") and
- v.Order.Value:match("%a")
- then
- if ffc(v.Handle, "X10") then
- return v
- end
- t = v
- end
- end
- return t
- end
- local function getHousePart(address)
- local houses = workspace.Houses:GetChildren()
- for i = 1, #houses do
- local h = houses[i]
- if
- ffc(h, "Address") and h.Address.Value == address and ffc(h, "Upgrades") and h.Upgrades:GetChildren()[1] and
- ffc(h.Upgrades:GetChildren()[1], "GivePizza")
- then
- return h.Upgrades:GetChildren()[1].GivePizza
- end
- end
- end
- local delTouched = false
- local function forgetDeliveryTool()
- if delTool then
- if delTool.Parent == player.Backpack then
- delTool.Parent = character
- end
- if delTool.Parent == character then
- wait(0.1)
- delTool.Parent = workspace
- wait(0.1)
- end
- end
- delTool = nil
- delTouched = false
- if ffc(character, "RightHand") and ffc(character.RightHand, "RightGrip") then
- character.RightHand.RightGrip:Destroy()
- end
- end
- local function onCharacterAdded(char)
- if not char then
- return
- end
- character = char
- root = character:WaitForChild("HumanoidRootPart")
- character:WaitForChild("Humanoid"):GetPropertyChangedSignal("WalkSpeed"):Connect(
- function()
- if delTool then
- character.Humanoid.WalkSpeed = 16
- end
- end
- )
- end
- onCharacterAdded(player.Character or player.CharacterAdded:Wait())
- player.CharacterAdded:Connect(onCharacterAdded)
- local function simTouch(part)
- local oldcc = part.CanCollide
- local oldcf = part.CFrame
- part.CanCollide = false
- part.CFrame =
- root.CFramedelay(
- 0.01,
- function()
- part.CFrame = oldcf
- part.CanCollide = oldcc
- end
- )
- end
- while gui.Parent do
- wait(0.3)
- local hum = character:FindFirstChild("Humanoid")
- if hum and hum.Sit then
- hum.Jump = true
- end
- if doCashier then
- local c = FindFirstCustomer()
- if c then
- local dialog = c.Head.Dialog.Correct.ResponseDialog or ""
- local rootMoved = false
- if (root.Position - Vector3.new(46.34, 3.80, 82.02)).magnitude > 9 then
- rootMoved = true
- root.CFrame = CFrame.new(46.34, 3.80, 82.02)
- wait(.1)
- end
- local order = "MountainDew"
- if dialog:sub(-8) == "instead." then
- dialog = dialog:sub(-30)
- end
- if dialog:find("pepperoni", 1, true) then
- order = "PepperoniPizza"
- elseif dialog:find("sausage", 1, true) then
- order = "SausagePizza"
- elseif dialog:find("cheese", 1, true) then
- order = "CheesePizza"
- endnetwork:FireServer("OrderComplete", c, order, workspace.Register3)
- if rootMoved then
- wait(.1)
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement