main.lua (4)
main.lua (4)
menu/rayfield'))()
Rayfield:Notify({
Title = "you exucute the script",
Content = "Notification Content",
Duration = 6.5,
Image = nil,
Actions = { -- Notification Buttons
Ignore = {
Name = "Okay!",
Callback = function()
print("The user tapped Okay!")
end
},
},
})
-- Functions
Balls.ChildAdded:Connect(function(Ball)
if not VerifyBall(Ball) then
return
end
Ball:GetPropertyChangedSignal("Position"):Connect(function()
if IsTarget() then -- No need to do the math if we're not being attacked.
local Distance = (Ball.Position -
workspace.CurrentCamera.Focus.Position).Magnitude
local Velocity = (OldPosition - Ball.Position).Magnitude -- Fix
for .Velocity not working. Yes I got the lowest possible grade in accuplacer math.
if (Distance / Velocity) <= 10 then -- Sorry for the magic number. This
just works. No, you don't get a slider for this because it's 2am.
Parry()
end
end
if (tick() - OldTick >= 1/60) then -- Don't want it to update too quickly
because my velocity implementation is aids. Yes, I tried Ball.Velocity. No, it
didn't work.
OldTick = tick()
OldPosition = Ball.Position
end
end)
end)
end,
})