local link = "http://donate.smithtainment.com/store.php?page=packages&id=13" local WindowTitle = "Donations" -- Title of the window local scale = 0.9 -- Scaling of the window (1 = the entire screen) local ActiveOnly = true -- Opens up during round only local KillsOnly = true -- Opens up after player kills only local cooldown = 600 -- Number of seconds for the box cooldown if SERVER then if GetConVar( "gamemode" ):GetString() == "terrortown" then util.AddNetworkString( "GucciYTDeathWindowNet" ) hook.Add( "DoPlayerDeath", "GucciYTDeathWindowPopup", function( ply, attacker ) if ActiveOnly and GetRoundState() ~= ROUND_ACTIVE then return end if KillsOnly and ( not ( IsValid( attacker ) and attacker:IsPlayer() ) ) then return end if not ply.death_yt_window_cooldown then ply.death_yt_window_cooldown = 0 end if CurTime() > ply.death_yt_window_cooldown then net.Start( "GucciYTDeathWindowNet" ) net.Send( ply ) ply.death_yt_window_cooldown = CurTime() + cooldown end end ) end else net.Receive( "GucciYTDeathWindowNet", function() local frame = vgui.Create( "DFrame" ) frame:SetSize( ScrW() * scale, ScrH() * scale ) frame:SetTitle( WindowTitle ) frame:Center() frame:MakePopup() local html = vgui.Create( "DHTML" , frame ) html:Dock( FILL ) html:OpenURL( link ) end ) end