-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModBasic.lua
More file actions
54 lines (49 loc) · 1.15 KB
/
ModBasic.lua
File metadata and controls
54 lines (49 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
local mod = {}
-- Function to kick a player
local function kick(player, reason)
if typeof(player) == "Instance" then
if player:IsA("Player") then
print("Player Kicked:", player)
player:Kick(reason)
else
print(player, "is not a Player Object.")
end
else
print(player, "is not a Instance.")
end
end
-- Function to freeze a player's character
local function freeze(player)
if typeof(player) == "Instance" then
if player:IsA("Player") then
local character = player.Character
if character then
character:WaitForChild("HumanoidRootPart").Anchored = true
end
else
print(player, "is not a Player Object.")
end
else
print(player, "is not a Instance.")
end
end
-- Function to unfreeze a player's character
local function unfreeze(player)
if typeof(player) == "Instance" then
if player:IsA("Player") then
local character = player.Character
if character then
character:WaitForChild("HumanoidRootPart").Anchored = false
end
else
print(player, "is not a Player Object.")
end
else
print(player, "is not a Instance.")
end
end
-- Expose functions
mod.kick = kick
mod.freeze = freeze
mod.unfreeze = unfreeze
return mod