-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlock
More file actions
20 lines (19 loc) · 716 Bytes
/
lock
File metadata and controls
20 lines (19 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
local mt = getrawmetatable(game)
local backupnamecall = mt.__namecall
local backupnewindex = mt.__newindex
local backupindex = mt.__index
setreadonly(mt, false)
local function ApplyPredictionFormula(SelectedPart)
return SelectedPart.CFrame + (SelectedPart.Velocity * 0.165)
end
local __index
__index = hookmetamethod(game, "__index", function(t, k)
if (t:IsA("Mouse") and (k == "Hit" or k == "Target")) then
local SelectedPart = getgenv().selectedpart
if (k == "Hit" or k == "Target") and getgenv().spinning then
local Hit = ApplyPredictionFormula(getgenv().selectedpart)
return (k == "Hit" and Hit or SelectedPart)
end
end
return __index(t, k)
end)