1local player = game.Players.LocalPlayer2local safePos = Vector3.new(6.89, 29.31, 103.79)3local houses = workspace.Houses45local function getHighestHouse()6 local highest, highestNum = nil, 07 for _, house in houses:GetChildren() do8 local num = tonumber(house.Name:match("%d+"))9 if num and num > highestNum then10 highestNum = num11 highest = house12 end13 end14 return highest15end1617local knob = getHighestHouse().Door.Door.Knob18local prompt1920for _, child in knob:GetChildren() do21 if child:IsA("ProximityPrompt") and child.ObjectText == "Door" then22 child.HoldDuration = 023 child.MaxActivationDistance = math.huge24 child.RequiresLineOfSight = false25 prompt = child26 break27 end28end2930task.spawn(function()31 while true do32 local character = player.Character or player.CharacterAdded:Wait()33 local root = character:WaitForChild("HumanoidRootPart")3435 root.CFrame = CFrame.new(knob.Position)36 task.wait(0.05)37 fireproximityprompt(prompt)38 task.wait(0.2)3940 if player:GetAttribute("Gameing") then41 root.CFrame = CFrame.new(safePos)42 repeat task.wait(0.1) until not player:GetAttribute("Gameing")43 end4445 task.wait(0.1)46 end47end)
Comments · …
Loading comments…