ModBasic is a simple module script for managing player actions in a game. It provides functions to kick, freeze, and unfreeze players. These functions can be used to control player behavior within the game environment.
Kicks a player from the game with a specified reason.
Parameters:player (Instance): The player to be kicked. Should be a Player object.reason (string): The reason why the player is being kicked.local mod = require(game.ServerScriptService.ModBasic)
local playerToKick = game.Players.LocalPlayer
local kickReason = "Inappropriate behavior"
mod.kick(playerToKick, kickReason)
Freezes a player's character in place by anchoring their HumanoidRootPart.
player (Instance): The player whose character will be frozen. Should be a Player object.local mod = require(game.ServerScriptService.ModBasic)
local playerToFreeze = game.Players.LocalPlayer
mod.freeze(playerToFreeze)
Unfreezes a player's character by unanchoring their HumanoidRootPart.
player (Instance): The player whose character will be unfrozen. Should be a Player object.local mod = require(game.ServerScriptService.ModBasic)
local playerToUnfreeze = game.Players.LocalPlayer
mod.unfreeze(playerToUnfreeze)
ServerScriptService or ReplicatedStorage in your game.local mod = require(game.ServerScriptService.ModBasic)
kick, freeze, unfreeze) as needed.Each function checks whether the input player is a valid Player instance. If the input is not a Player object or is not an instance, an error message will be printed in the output:
Player, the function will print: "player is not a Player Object."Instance, the function will print: "player is not an Instance."local mod = require(game.ServerScriptService.ModBasic)
local function handlePlayerActions(player)
-- Kick the player with a reason
mod.kick(player, "Rule violation")
-- Freeze the player
mod.freeze(player)
-- Unfreeze the player after some time
wait(5)
mod.unfreeze(player)
end
SkunkPlatform ➜ DiamondPlatform
We're excited to announce that SkunkPlatform will soon be renamed to DiamondPlatform! Expect a fresh new look and improved features.