Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local point = 0;
- local function getpos()
- local parts = workspace.Stages:GetDescendants()
- local nearest = nil;
- local closest = 0;
- for i,v in pairs(parts) do
- if v.Name:sub(1, 1) == "P" and v:IsA("BasePart") then
- if closest < (root.Position - v.Position).Magnitude then
- nearest = v
- closest = (root.Position - v.Position).Magnitude
- end
- end
- end
- return nearest.Name:gsub("%D+", "")
- end
- local plr = game:GetService("Players").LocalPlayer
- local root = plr.Character.HumanoidRootPart
- local rs = game:GetService("ReplicatedStorage")
- local ws = game:GetService("Workspace")
- local ui = plr.PlayerGui.FNFGame
- local handler = ui.FNFMain
- local playerKeys = ui.KeySyncP
- local remote = rs.Battle
- local currentMatch = rs:FindFirstChild(plr.Name, true) or ws:FindFirstChild(plr.Name, true)
- if currentMatch then
- currentMatch = currentMatch.Parent
- local key = getpos();
- local old = nil;
- local function func(...)
- local args = {...}
- if args[2]:find(key) then
- remote:FireServer(point, currentMatch)
- end
- return old(...)
- end
- old = hookfunc(getsenv(handler).Note,function(...)
- return func(...)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement