local SpoofedInstances = {} local OriginalInstance = Instance.new local OriginalToString = tostring if not hookmetamethod and hookfunction then getgenv().hookmetamethod = function(target, methodName, func) return hookfunction(getrawmetatable(target)[methodName], func) end end local NewInstanceHook NewInstanceHook = hookfunction(OriginalInstance, newcclosure(function(...) if checkcaller() then local newObj = NewInstanceHook(...) sethiddenproperty(newObj, "DefinesCapabilities", true) SpoofedInstances[newObj] = true return newObj end return NewInstanceHook(...) end)) local ToStringHook ToStringHook = hookfunction(OriginalToString, newcclosure(function(obj) if not checkcaller() then if SpoofedInstances[obj] then return end end return ToStringHook(obj) end)) local NamecallHook NamecallHook = hookmetamethod(game, "__namecall", newcclosure(function(self, ...) local method = getnamecallmethod():lower() if not checkcaller() then if SpoofedInstances[self] then return end if method:match("^findfirst") or method:match("^waitforchild") then local result = NamecallHook(self, ...) if result and SpoofedInstances[result] then return end end end return NamecallHook(self, ...) end)) local IndexHook IndexHook = hookmetamethod(game, "__index", newcclosure(function(self, key) if not checkcaller() then local value = IndexHook(self, key) if SpoofedInstances[self] and typeof(value) ~= "function" then return end end return IndexHook(self, key) end)) for _, threadItem in next, getreg() do local funcThread = type(threadItem) == "thread" and coroutine.status(threadItem) == "suspended" and debug.info(threadItem, 1, "f") local envCheck = funcThread and getfenv(funcThread) and typeof(getfenv(funcThread).script) == "Instance" if funcThread and envCheck then task.cancel(threadItem) end end for _, actorThread in next, getactorthreads() do run_on_thread(actorThread, [[ local RawMT = getrawmetatable(game) local OldIndex = RawMT.__index hookfunction(tostring, newcclosure(function(obj) if not checkcaller() then setthreadidentity(8) if OldIndex(obj, "DefinesCapabilities") == true then return end end return tostring(obj) end)) hookmetamethod(game, "__namecall", newcclosure(function(self, ...) local method = getnamecallmethod():lower() if not checkcaller() then setthreadidentity(8) if OldIndex(self, "DefinesCapabilities") == true then return end if method:match("^findfirst") or method:match("^waitforchild") then local result = self[method](self, ...) if result and OldIndex(result, "DefinesCapabilities") == true then return end end end return self[method](self, ...) end)) hookmetamethod(game, "__index", newcclosure(function(self, key) if not checkcaller() then setthreadidentity(8) if OldIndex(self, "DefinesCapabilities") == true and typeof(OldIndex(self, key)) ~= "function" then return end end return OldIndex(self, key) end)) ]]) end local sg=Instance.new("ScreenGui",game:GetService("CoreGui")) sg.Name="ClockUI" local fr=Instance.new("Frame",sg) fr.Size=UDim2.new(0,240,0,160) fr.Position=UDim2.new(0.5,-120,0.3,0) fr.BackgroundColor3=Color3.fromRGB(20,20,20) fr.BorderSizePixel=0 Instance.new("UICorner",fr).CornerRadius=UDim.new(0,10) local title=Instance.new("TextLabel",fr) title.Size=UDim2.new(1,0,0,25) title.Text="Timer" title.BackgroundTransparency=1 title.TextColor3=Color3.new(1,1,1) title.TextScaled=true local label=Instance.new("TextLabel",fr) label.Size=UDim2.new(1,0,0,40) label.Position=UDim2.new(0,0,0,25) label.BackgroundTransparency=1 label.TextColor3=Color3.fromRGB(0,255,150) label.TextScaled=true label.Text="0.00" local toggle=Instance.new("TextButton",fr) toggle.Size=UDim2.new(0.45,0,0,30) toggle.Position=UDim2.new(0.025,0,0,75) toggle.Text="Start" toggle.BackgroundColor3=Color3.fromRGB(50,150,50) toggle.TextScaled=true local reset=Instance.new("TextButton",fr) reset.Size=UDim2.new(0.45,0,0,30) reset.Position=UDim2.new(0.525,0,0,75) reset.Text="Reset" reset.BackgroundColor3=Color3.fromRGB(150,100,40) reset.TextScaled=true local delete=Instance.new("TextButton",fr) delete.Size=UDim2.new(0.9,0,0,30) delete.Position=UDim2.new(0.05,0,0,115) delete.Text="Delete" delete.BackgroundColor3=Color3.fromRGB(170,50,50) delete.TextScaled=true -- timer logic local running=false local t=0 task.spawn(function() local lastTick=tick() while true do task.wait(0.01) -- update every 0.01s if running then local now=tick() t += now - lastTick lastTick = now label.Text = string.format("%.2f", t) else lastTick = tick() end end end) toggle.MouseButton1Click:Connect(function() running=not running toggle.Text=running and "Pause" or "Resume" end) reset.MouseButton1Click:Connect(function() t=0 label.Text="0.00" end) delete.MouseButton1Click:Connect(function() sg:Destroy() end) -- draggable (PC + mobile) local drag=false local startPos local dragStart fr.InputBegan:Connect(function(i) if i.UserInputType==Enum.UserInputType.MouseButton1 or i.UserInputType==Enum.UserInputType.Touch then drag=true dragStart=i.Position startPos=fr.Position i.Changed:Connect(function() if i.UserInputState==Enum.UserInputState.End then drag=false end end) end end) fr.InputChanged:Connect(function(i) if drag and (i.UserInputType==Enum.UserInputType.MouseMovement or i.UserInputType==Enum.UserInputType.Touch) then local delta=i.Position-dragStart fr.Position=UDim2.new(startPos.X.Scale,startPos.X.Offset+delta.X,startPos.Y.Scale,startPos.Y.Offset+delta.Y) end end)