67 шайба
делает шайбу 67 инжект в матче
local k = "ball67Render"
local n = "puck"
local function clr()
local t = _G[k]
if not t then return end
if t.f then
Runtime:removeEventListener("enterFrame", t.f)
end
if t.t and t.t.removeSelf then
t.t:removeSelf()
end
_G[k] = nil
end
local function scan(o)
if not o then return nil end
if o.name == n then return o end
if o.numChildren then
for i = 1, o.numChildren do
local r = scan(o[i])
if r then return r end
end
end
return nil
end
local function getBall()
if Cheats and Cheats.ball and Cheats.ball.removeSelf then
return Cheats.ball
end
return scan(display.currentStage)
end
clr()
local b = getBall()
if not b then
print("ball not found")
return
end
local label = display.newText({
text = "67",
x = b.x,
y = b.y,
font = native.systemFontBold,
fontSize = 40
})
label:setFillColor(1, 0.85, 0.2)
b.alpha = 0
local function f()
local entry = _G[k]
if not entry then return end
local lbl = entry.t
if not lbl or not lbl.removeSelf then
clr()
return
end
local ball = getBall()
if not ball then
clr()
return
end
lbl.x = ball.x
lbl.y = ball.y
lbl.rotation = ball.rotation or 0
ball.alpha = 0
end
_G[k] = { t = label, f = f }
Runtime:addEventListener("enterFrame", f)
print("шайба 67")