BazirRemote - Create remote functions/events!

Introduction
Hello, I’m @BazirGames. I wanted to share this module I made for client, server, script communication. This module will create RemoteFunction, RemoteEvent, BindableEvent, and BindableFunction so you don’t have to.

sources:
BazirRemote

Why use BazirRemote?

  • Easy to use
  • Improves your workflow
  • Spend less time creating RemoteFunction, RemoteEvent, BindableEvent, and BindableFunction

Setup
image
Capture2

API

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local BazirRemote = require(ReplicatedStorage.BazirRemote)
local Remote = BazirRemote.new("Stats.Coins") --or BazirRemote.new({"Stats", "Coins"})
	
Remote:Fire(...)
Remote:Invoke(...)
	
Remote.Event:Connect(function(player)
	
end)
	
Remote.OnInvoke = function(...)
	
end

	--client
		Remote:FireServer(...)
		Remote:InvokeServer(...)

		Remote.OnClientEvent:Connect(function(...)
			
		end)

		Remote.OnClientInvoke = function(...)
			
		end

	--server
		Remote:FireClient(player, ...)
		Remote:InvokeClient(player, ...)
		Remote:FireAllClients(...)

		Remote.OnServerEvent:Connect(function(player, ...)
			
		end)

		Remote.OnServerInvoke = function(player, ...)
			
		end

Examples
1

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local BazirRemote = require(ReplicatedStorage.BazirRemote) -- require the module 
--client
	local Remote = BazirRemote.new("player.respawn")
	Remote:FireServer()

--server
	local Remote = BazirRemote.new("player.respawn")

	Remote.OnServerEvent:Connect(function(player)
		player:LoadCharacter()
	end)

2

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local BazirRemote = require(ReplicatedStorage.BazirRemote) -- require the module 
--client
		local Remote = BazirRemote.new("data")
		delay(5, function()
			local ReturnData = Remote:InvokeServer()
			if ReturnData then
				print("Coins: " .. ReturnData.Coins)
				print("Gems: " .. ReturnData.Gems)
			else
				warn("InvokeServer data failed")
			end
		end)


	--server
		local Remote = BazirRemote.new("data")

		Remote.OnServerInvoke = function(player, ...)
			return {
				Coins = 30,
				Gems = 15
			}
		end

3

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local BazirRemote = require(ReplicatedStorage.BazirRemote) -- require the module 
--client or server
--script 1:
		local Remote = BazirRemote.new("client.print")

		Remote.OnEvent:Connect(function(...)
			print(...)
		end)

--script 2:
		local Remote = BazirRemote.new("client.print")

		delay(15, function()
			Remote:Fire("This is printed on script 1 :)")
		end)

Get it here!

13 Likes

That’s really helpful, I use Knit Framework which has this built in but awesome work!
How does it organise the Events when they’re created (In RS).

3 Likes

Why should I use this module? From an unbiased view, your module is completely useless and just simply creates remote events and bindables, that’s all there’s to it. It’s stated that it “Improves your workflow” and “Spend less time creating RemoteFunction, RemoteEvent, BindableEvent, and BindableFunction”. How exactly?

It won’t be frustrating to just write 2 lines of code to create and name remotes.

1 Like

I think your confused. I made this module for me and simply wanted to share it with everyone else.
If you don’t understand module here is the api

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local BazirRemote = require(ReplicatedStorage.BazirRemote)
local Remote = BazirRemote.new("Stats.Coins") --or BazirRemote.new({"Stats", "Coins"})
	
Remote:Fire(...)
Remote:Invoke(...)
	
Remote.Event:Connect(function(player)
	
end)
	
Remote.OnInvoke = function(...)
	
end

	--client
		Remote:FireServer(...)
		Remote:InvokeServer(...)

		Remote.OnClientEvent:Connect(function(...)
			
		end)

		Remote.OnClientInvoke = function(...)
			
		end

	--server
		Remote:FireClient(player, ...)
		Remote:InvokeClient(player, ...)
		Remote:FireAllClients(...)

		Remote.OnServerEvent:Connect(function(player, ...)
			
		end)

		Remote.OnServerInvoke = function(player, ...)
			
		end
1 Like

I think your confused. I made this module for me and simply wanted to share it with everyone else.
If you don’t understand module here is the api

No. What is the point of this module? You ignored everything what I had said on that post.

It tells you what it does up there. I’m not forcing you to use it. Idc if you don’t use it.

2 Likes

I also hate when people try to find meaning. Like, I made this for fun, and just wanted to post this, but not for you to be mean about it.

3 Likes

This looks cool! I am going to use this because I am too lazy to create Remote Events/Remote Functions when I reuse my scripts.

1 Like