local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local Player = Players.LocalPlayer local PlayerGui = Player:WaitForChild("PlayerGui") --// TEACHERS local TeacherPaths = { function() return workspace:FindFirstChild("Literature Teacher") end, function() return workspace:FindFirstChild("Chemistry Teacher") end, function() local highschool = workspace:FindFirstChild("Highschool") local room = highschool and highschool:FindFirstChild("IssRoom") return room and room:FindFirstChild("ISS Teacher") end, function() return workspace:FindFirstChild("Math Teacher") end } --// GUI local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "TeacherSafetyGUI" ScreenGui.ResetOnSpawn = false ScreenGui.DisplayOrder = 100 ScreenGui.Parent = PlayerGui local Frame = Instance.new("Frame") Frame.Name = "Main" Frame.Size = UDim2.fromOffset(260, 205) Frame.Position = UDim2.new(0.5, -130, 0.5, -102) Frame.BackgroundColor3 = Color3.fromRGB(25, 25, 30) Frame.BorderSizePixel = 0 Frame.Parent = ScreenGui local Corner = Instance.new("UICorner") Corner.CornerRadius = UDim.new(0, 9) Corner.Parent = Frame --// GAME STATUS local GameStatusLabel = Instance.new("TextLabel") GameStatusLabel.Name = "GameStatus" GameStatusLabel.Position = UDim2.fromOffset(10, 7) GameStatusLabel.Size = UDim2.new(1, -20, 0, 30) GameStatusLabel.BackgroundTransparency = 1 GameStatusLabel.Text = "Loading game status..." GameStatusLabel.TextColor3 = Color3.fromRGB(255, 210, 100) GameStatusLabel.Font = Enum.Font.GothamBold GameStatusLabel.TextSize = 13 GameStatusLabel.TextWrapped = true GameStatusLabel.Parent = Frame --// TEACHER SAFETY local Title = Instance.new("TextLabel") Title.Position = UDim2.fromOffset(0, 37) Title.Size = UDim2.new(1, 0, 0, 22) Title.BackgroundTransparency = 1 Title.Text = "TEACHER SAFETY" Title.TextColor3 = Color3.fromRGB(220, 220, 220) Title.Font = Enum.Font.GothamBold Title.TextSize = 13 Title.Parent = Frame local TeacherLabel = Instance.new("TextLabel") TeacherLabel.Position = UDim2.fromOffset(10, 59) TeacherLabel.Size = UDim2.new(1, -20, 0, 20) TeacherLabel.BackgroundTransparency = 1 TeacherLabel.Text = "Searching..." TeacherLabel.TextColor3 = Color3.fromRGB(170, 170, 180) TeacherLabel.Font = Enum.Font.Gotham TeacherLabel.TextSize = 12 TeacherLabel.Parent = Frame local Percentage = Instance.new("TextLabel") Percentage.Position = UDim2.fromOffset(0, 79) Percentage.Size = UDim2.new(1, 0, 0, 42) Percentage.BackgroundTransparency = 1 Percentage.Text = "--%" Percentage.TextColor3 = Color3.fromRGB(255, 255, 255) Percentage.Font = Enum.Font.GothamBold Percentage.TextSize = 30 Percentage.Parent = Frame --// ANSWERS DISPLAY local AnswersLabel = Instance.new("TextLabel") AnswersLabel.Name = "AnswersText" AnswersLabel.Position = UDim2.fromOffset(10, 127) AnswersLabel.Size = UDim2.new(1, -20, 0, 70) AnswersLabel.BackgroundTransparency = 1 AnswersLabel.Text = "Answers: Waiting..." AnswersLabel.TextColor3 = Color3.fromRGB(100, 200, 255) AnswersLabel.Font = Enum.Font.Gotham AnswersLabel.TextSize = 12 AnswersLabel.TextWrapped = true AnswersLabel.TextXAlignment = Enum.TextXAlignment.Left AnswersLabel.TextYAlignment = Enum.TextYAlignment.Top AnswersLabel.Parent = Frame --// DRAGGING local dragging = false local dragStart local startPosition Frame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPosition = Frame.Position end end) UserInputService.InputChanged:Connect(function(input) if dragging and ( input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch ) then local delta = input.Position - dragStart Frame.Position = UDim2.new( startPosition.X.Scale, startPosition.X.Offset + delta.X, startPosition.Y.Scale, startPosition.Y.Offset + delta.Y ) end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = false end end) --// TEACHER DETECTION local ClosestTeacher = nil local ClosestHead = nil local function GetHead(teacher) if not teacher then return nil end return teacher:FindFirstChild("Head", true) end -- Find closest teacher every 5 seconds task.spawn(function() while ScreenGui.Parent do local Character = Player.Character local Root = Character and Character:FindFirstChild("HumanoidRootPart") local BestDistance = math.huge local BestTeacher = nil local BestHead = nil if Root then for _, GetTeacher in ipairs(TeacherPaths) do local Teacher = GetTeacher() local Head = GetHead(Teacher) if Teacher and Head and Head:IsA("BasePart") then local Distance = ( Root.Position - Head.Position ).Magnitude if Distance < BestDistance then BestDistance = Distance BestTeacher = Teacher BestHead = Head end end end end ClosestTeacher = BestTeacher ClosestHead = BestHead if BestTeacher then TeacherLabel.Text = BestTeacher.Name else TeacherLabel.Text = "No teacher found" end task.wait(5) end end) --// FAST SAFETY CALCULATION RunService.RenderStepped:Connect(function() local Character = Player.Character local Root = Character and Character:FindFirstChild("HumanoidRootPart") if not Root or not ClosestHead or not ClosestHead.Parent then Percentage.Text = "--%" Percentage.TextColor3 = Color3.fromRGB(170, 170, 180) return end local Look = ClosestHead.CFrame.LookVector local HeadDirection = Vector3.new( Look.X, 0, Look.Z ) local Difference = Root.Position - ClosestHead.Position local PlayerDirection = Vector3.new( Difference.X, 0, Difference.Z ) if HeadDirection.Magnitude < 0.001 or PlayerDirection.Magnitude < 0.001 then return end HeadDirection = HeadDirection.Unit PlayerDirection = PlayerDirection.Unit local Dot = HeadDirection:Dot(PlayerDirection) local Safety = math.clamp( (1 - Dot) * 50, 0, 100 ) Safety = math.floor(Safety + 0.5) Percentage.Text = Safety .. "%" if Safety <= 30 then Percentage.TextColor3 = Color3.fromRGB(255, 75, 75) elseif Safety <= 70 then Percentage.TextColor3 = Color3.fromRGB(255, 190, 65) else Percentage.TextColor3 = Color3.fromRGB(75, 230, 130) end end) --// PHONE ANSWERS DETECTION local LastAnswersText = "Waiting..." task.spawn(function() while ScreenGui.Parent do local Character = Player.Character if Character then local Phone = Character:FindFirstChild("Phone1", true) if Phone then local PhoneObject = Phone:FindFirstChild("Phone", true) if PhoneObject then local Screen = PhoneObject:FindFirstChild("Screen", true) if Screen then local SurfaceGui = Screen:FindFirstChild("SurfaceGui") if SurfaceGui then local MainFrame = SurfaceGui:FindFirstChild("Frame") if MainFrame then local Answers = MainFrame:FindFirstChild("AnswersText") if Answers and ( Answers:IsA("TextLabel") or Answers:IsA("TextBox") ) then LastAnswersText = Answers.Text end end end end end end end AnswersLabel.Text = "Answers:\n" .. LastAnswersText task.wait(0.1) end end) --// GAME STATUS DETECTION local LastGameStatus = "Loading..." task.spawn(function() while ScreenGui.Parent do local MenuGui = PlayerGui:FindFirstChild("MenuGui") if MenuGui then local Backdrop = MenuGui:FindFirstChild("Backdrop") if Backdrop then local MainCanvasGroup = Backdrop:FindFirstChild("MainCanvasGroup") if MainCanvasGroup then local MenuButtonsFrame = MainCanvasGroup:FindFirstChild("MenuButtonsFrame") if MenuButtonsFrame then local Status = MenuButtonsFrame:FindFirstChild("GameStatusLabel") if Status and ( Status:IsA("TextLabel") or Status:IsA("TextButton") or Status:IsA("TextBox") ) then LastGameStatus = Status.Text end end end end end GameStatusLabel.Text = LastGameStatus task.wait(0.1) end end)