local game = {}
local services = {}
services["PlayerService"] = {}
services["EventService"] = {}

services["EventService"].__index = game["EventService"]

local Instance = {}
game.Workspace = {}


function Instance.new(instance, parent)
    if instance == "Event" then
        return EventService.new()
    end
end

function game:GetService(service)
   if services[service] then
      return services[service]   
   else
       error("attempted to get a nil service")
       return nil
   end
end

function game:ConnectFunction(f1, f2)
    return function(...) 
        return f1(f2(...)) 
    end
end


EventService = game:GetService("EventService")

function EventService.new(name)
    local self = setmetatable({}, EventService)
    
    return self
end

function EventService.OnEventFire(...)
   return ...
end

function EventService:FireEvent(callback, ...)
    local a = game:ConnectFunction(EventService.OnEventFire, callback)
    a(...)
end

local Players = game:GetService("PlayerService")

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: