-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathfunctions.lua
56 lines (53 loc) · 1.38 KB
/
functions.lua
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
55
56
function GetPlayerLookPos(Player)
local World = Player:GetWorld()
local Start = Player:GetEyePosition()
local End = Start + Player:GetLookVector() * 150
local HitCoords = nil
local Callbacks =
{
OnNextBlock = function(BlockPos, BlockType)
if BlockType ~= E_BLOCK_AIR then
HitCoords = BlockPos
return true
end
end
}
cLineBlockTracer:Trace(World, Callbacks, Start, End)
return HitCoords
end
function IsEnchantable()
if HeldItemType >= 256 and HeldItemType <= 259 then
return true
elseif HeldItemType >= 267 and HeldItemType <= 279 then
return true
elseif HeldItemType >= 283 and HeldItemType <= 286 then
return true
elseif HeldItemType >= 290 and HeldItemType <= 294 then
return true
elseif HeldItemType >= 298 and HeldItemType <= 317 then
return true
elseif HeldItemType >= 290 and HeldItemType <= 294 then
return true
elseif HeldItemType == 346 or HeldItemType == 359 or HeldItemType == 261 then
return true
end
end
function GetAverageNum(Table)
local Sum = 0
for i,Num in ipairs(Table) do
Sum = Sum + Num
end
return (Sum / #Table)
end
function CheckPlayer(Player)
if UsersINI:GetValue(Player:GetUUID(), "Jailed") == "true" then
Jailed[Player:GetUUID()] = true
else
Jailed[Player:GetUUID()] = false
end
if UsersINI:GetValue(Player:GetUUID(), "Muted") == "true" then
Muted[Player:GetUUID()] = true
else
Muted[Player:GetUUID()] = false
end
end