The purpose of this community service is to carry out legal socialization to students at SMK PSM 2 Takeran in order to prevent and handle online gambling cases among teenagers. Methods used This research uses counseling or workshop methods as a form of educational intervention in socializing the dangers of online gambling among students. In this activity, the definition, dangers, legal basis, things that can prevent the practice of online gambling are conveyed. The results showed that SMK PSM 2 Takeran has implemented various legal socialization activities to increase students' understanding of the legal consequences of online gambling practices. Nevertheless, some challenges were found in the implementation of legal socialization, such as limited resources and lack of support from related parties. The legal repercussions that teenagers may face include criminal penalties, fines, and long-term consequences related to criminal records. Therefore, this study highlights the important role of schools in conveying information about online gambling-related laws to adolescents, as well as emphasizing the need for greater support from schools, government and other relevant institutions to increase the effectiveness of prevention efforts. The implications of this study include the development of more effective legal socialization strategies, as well as the need for collaborative efforts between various parties to address the problem of online gambling among adolescents.