Advertisement
Hasli4

RBLX. TimerStop

May 15th, 2025
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.80 KB | None | 0 0
  1. local function Round(n, decimals)
  2.     decimals = decimals or 0
  3.     return math.floor(n * 10^decimals) / 10^decimals
  4. end
  5. local function check_finish( x_part )
  6.     if x_part:IsA("VehicleSeat") == true then
  7. workspace.Finish.Transparency = 1
  8.     workspace.Finish.Transparency = 1
  9.         workspace.Start.Transparency = 0
  10.         local timer = game.ServerStorage:FindFirstChild("RaseTimer")
  11.         print("Гонка закончилась", timer.Value)
  12.         local raceTimeResult = tick() - timer.Value
  13.  
  14.         raceTimeResult = Round(raceTimeResult, 2)
  15.         print(raceTimeResult, "секунд прошло")
  16.         script.Disabled = true
  17.         workspace.Finish:FindFirstChildOfClass("Script").Disabled = true
  18.         wait(3)
  19.         workspace.Start:FindFirstChildOfClass("Script").Disabled = false
  20.     end
  21. end
  22. script.Parent.Touched:Connect(check_finish)
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement