--============================================================= -- OKAZ LEGACY v1.0 -- Fling Things and People -- Simple build. Two tabs. Nothing to learn. -- RightShift = show/hide --============================================================= local Players = game:GetService("Players") local UIS = game:GetService("UserInputService") local RunService = game:GetService("RunService") local WS = game:GetService("Workspace") local LP = Players.LocalPlayer local PG = LP:WaitForChild("PlayerGui") local CAM = WS.CurrentCamera if PG:FindFirstChild("OkazLegacy") then PG.OkazLegacy:Destroy() end -- how hard you throw. 350 is the safe limit for this game. local power = 350 local lift = 0.25 local autoFling = true local aura = false local held = nil -- small helper so the GUI code stays short local function new(class, props, parent) local o = Instance.new(class) for k, v in pairs(props or {}) do o[k] = v end o.Parent = parent return o end local function getRoot(plr) local c = plr and plr.Character local h = c and c:FindFirstChildOfClass("Humanoid") local r = c and c:FindFirstChild("HumanoidRootPart") if h and r and h.Health > 0 then return r end end -- pushes a part away from the camera local function push(part, force, up, dir) if not part or not part.Parent then return end dir = dir or CAM.CFrame.LookVector local bv = new("BodyVelocity", { MaxForce = Vector3.new(1e6, 1e6, 1e6), Velocity = dir * force + Vector3.new(0, force * up, 0) }, part) task.delay(0.12, function() if bv then bv:Destroy() end end) end -- the game creates a "GrabParts" model while you hold something. -- WeldConstraint.Part1 is the real object. We catch it on release. WS.ChildAdded:Connect(function(model) if model.Name ~= "GrabParts" then return end task.wait(0.05) local gp = model:FindFirstChild("GrabPart") local weld = gp and gp:FindFirstChildOfClass("WeldConstraint") local target = weld and weld.Part1 if not target then return end held = target model:GetPropertyChangedSignal("Parent"):Connect(function() if model.Parent then return end if autoFling and target.Parent then push(target, power, lift) end held = nil end) end) -- aura: fling whatever is near you task.spawn(function() while true do task.wait(0.3) if aura then local r = getRoot(LP) if r then local params = OverlapParams.new() params.FilterType = Enum.RaycastFilterType.Exclude params.FilterDescendantsInstances = { LP.Character } for _, p in ipairs(WS:GetPartBoundsInRadius(r.Position, 30, params)) do if p:IsA("BasePart") and not p.Anchored and p ~= held then push(p, power * 0.5, 0.4, (p.Position - r.Position).Unit) end end end end end end) --=========================== GUI ============================= local gui = new("ScreenGui", { Name = "OkazLegacy", IgnoreGuiInset = true, ResetOnSpawn = false, DisplayOrder = 999, ZIndexBehavior = Enum.ZIndexBehavior.Sibling }, PG) local main = new("Frame", { Size = UDim2.new(0, 280, 0, 340), Position = UDim2.new(0.5, -140, 0.5, -170), BackgroundColor3 = Color3.fromRGB(24, 24, 28), BorderSizePixel = 0 }, gui) new("UIStroke", { Color = Color3.fromRGB(80, 80, 96) }, main) local header = new("Frame", { Size = UDim2.new(1, 0, 0, 30), BackgroundColor3 = Color3.fromRGB(36, 36, 42), BorderSizePixel = 0 }, main) new("TextLabel", { Size = UDim2.new(1, -60, 1, 0), Position = UDim2.new(0, 10, 0, 0), BackgroundTransparency = 1, Font = Enum.Font.GothamBold, TextSize = 12, TextColor3 = Color3.fromRGB(235, 235, 240), TextXAlignment = Enum.TextXAlignment.Left, Text = "OKAZ LEGACY" }, header) new("TextLabel", { Size = UDim2.new(0, 46, 1, 0), Position = UDim2.new(1, -50, 0, 0), BackgroundTransparency = 1, Font = Enum.Font.Code, TextSize = 9, TextColor3 = Color3.fromRGB(140, 140, 155), TextXAlignment = Enum.TextXAlignment.Right, Text = "v1.0" }, header) local body = new("Frame", { Size = UDim2.new(1, -16, 1, -76), Position = UDim2.new(0, 8, 0, 36), BackgroundTransparency = 1 }, main) -- tab buttons local tabs = {} local pages = {} local function makeTab(name, order) local btn = new("TextButton", { Size = UDim2.new(0.5, -2, 0, 20), Position = UDim2.new(order * 0.5, order * 2, 0, 0), BackgroundColor3 = Color3.fromRGB(36, 36, 42), AutoButtonColor = false, Font = Enum.Font.GothamBold, TextSize = 10, TextColor3 = Color3.fromRGB(150, 150, 165), Text = name, BorderSizePixel = 0 }, main) new("UIStroke", { Color = Color3.fromRGB(70, 70, 84) }, btn) local p = new("ScrollingFrame", { Size = UDim2.new(1, 0, 1, -24), Position = UDim2.new(0, 0, 0, 24), BackgroundTransparency = 1, ScrollBarThickness = 4, AutomaticCanvasSize = Enum.AutomaticSize.Y, CanvasSize = UDim2.new(0, 0, 0, 0), Visible = false }, body) new("UIListLayout", { Padding = UDim.new(0, 6) }, p) tabs[name] = btn pages[name] = p btn.MouseButton1Click:Connect(function() for n, pg in pairs(pages) do pg.Visible = (n == name) end for n, b in pairs(tabs) do b.BackgroundColor3 = (n == name) and Color3.fromRGB(60, 60, 70) or Color3.fromRGB(36, 36, 42) b.TextColor3 = (n == name) and Color3.fromRGB(235, 235, 240) or Color3.fromRGB(150, 150, 165) end end) return p end local function label(parent, text) new("TextLabel", { Size = UDim2.new(1, 0, 0, 14), BackgroundTransparency = 1, Font = Enum.Font.Gotham, TextSize = 10, TextColor3 = Color3.fromRGB(150, 150, 165), TextXAlignment = Enum.TextXAlignment.Left, Text = text }, parent) end local function toggle(parent, text, def, callback) local row = new("Frame", { Size = UDim2.new(1, 0, 0, 22), BackgroundTransparency = 1 }, parent) new("TextLabel", { Size = UDim2.new(1, -26, 1, 0), BackgroundTransparency = 1, Font = Enum.Font.Gotham, TextSize = 11, TextColor3 = Color3.fromRGB(225, 225, 232), TextXAlignment = Enum.TextXAlignment.Left, Text = text }, row) local on = def local box = new("TextButton", { Size = UDim2.new(0, 14, 0, 14), Position = UDim2.new(1, -14, 0.5, -7), BackgroundColor3 = on and Color3.fromRGB(60, 190, 120) or Color3.fromRGB(45, 45, 52), AutoButtonColor = false, Text = "", BorderSizePixel = 0 }, row) new("UIStroke", { Color = Color3.fromRGB(80, 80, 96) }, box) box.MouseButton1Click:Connect(function() on = not on box.BackgroundColor3 = on and Color3.fromRGB(60, 190, 120) or Color3.fromRGB(45, 45, 52) callback(on) end) end local function slider(parent, text, min, max, def, callback) local row = new("Frame", { Size = UDim2.new(1, 0, 0, 30), BackgroundTransparency = 1 }, parent) local lbl = new("TextLabel", { Size = UDim2.new(1, -50, 0, 14), BackgroundTransparency = 1, Font = Enum.Font.Gotham, TextSize = 10, TextColor3 = Color3.fromRGB(150, 150, 165), TextXAlignment = Enum.TextXAlignment.Left, Text = text }, row) local val = new("TextLabel", { Size = UDim2.new(0, 50, 0, 14), Position = UDim2.new(1, -50, 0, 0), BackgroundTransparency = 1, Font = Enum.Font.Code, TextSize = 10, TextColor3 = Color3.fromRGB(90, 160, 255), TextXAlignment = Enum.TextXAlignment.Right, Text = tostring(def) }, row) local track = new("Frame", { Size = UDim2.new(1, 0, 0, 4), Position = UDim2.new(0, 0, 0, 18), BackgroundColor3 = Color3.fromRGB(45, 45, 52), BorderSizePixel = 0 }, row) local fill = new("Frame", { Size = UDim2.new((def - min) / (max - min), 0, 1, 0), BackgroundColor3 = Color3.fromRGB(90, 160, 255), BorderSizePixel = 0 }, track) local drag = false local function set(x) x = math.clamp(x, 0, 1) fill.Size = UDim2.new(x, 0, 1, 0) local v = math.floor(min + (max - min) * x + 0.5) val.Text = tostring(v) callback(v) end track.InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 then drag = true set((i.Position.X - track.AbsolutePosition.X) / track.AbsoluteSize.X) end end) UIS.InputChanged:Connect(function(i) if drag and i.UserInputType == Enum.UserInputType.MouseMovement then set((i.Position.X - track.AbsolutePosition.X) / track.AbsoluteSize.X) end end) UIS.InputEnded:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 then drag = false end end) end -- FLING tab local pFling = makeTab("Fling", 0) label(pFling, "Throw power (350 = safe)") slider(pFling, "Power", 50, 2000, power, function(v) power = v end) label(pFling, "Upward angle") slider(pFling, "Lift", 0, 1, 0.25, function(v) lift = v end) toggle(pFling, "Auto fling on release", true, function(v) autoFling = v end) toggle(pFling, "Aura (fling nearby)", false, function(v) aura = v end) new("TextLabel", { Size = UDim2.new(1, 0, 0, 40), BackgroundTransparency = 1, Font = Enum.Font.Gotham, TextSize = 9, TextColor3 = Color3.fromRGB(130, 130, 145), TextWrapped = true, TextXAlignment = Enum.TextXAlignment.Left, Text = "Grab an object like normal. The script throws it for you when you let go." }, pFling) -- PLAYERS tab local pPlr = makeTab("Players", 1) local list = new("Frame", { Size = UDim2.new(1, 0, 0, 190), BackgroundColor3 = Color3.fromRGB(20, 20, 24), BorderSizePixel = 0 }, pPlr) new("UIListLayout", { Padding = UDim.new(0, 2) }, list) new("UIPadding", { PaddingTop = UDim.new(0, 4), PaddingLeft = UDim.new(0, 4), PaddingRight = UDim.new(0, 4) }, list) local function refresh() for _, c in ipairs(list:GetChildren()) do if c:IsA("Frame") then c:Destroy() end end for _, plr in ipairs(Players:GetPlayers()) do if plr ~= LP then local row = new("Frame", { Size = UDim2.new(1, -8, 0, 24), BackgroundColor3 = Color3.fromRGB(38, 38, 44), BorderSizePixel = 0 }, list) new("TextLabel", { Size = UDim2.new(1, -50, 1, 0), Position = UDim2.new(0, 6, 0, 0), BackgroundTransparency = 1, Font = Enum.Font.Gotham, TextSize = 11, TextColor3 = Color3.fromRGB(230, 230, 236), TextXAlignment = Enum.TextXAlignment.Left, TextTruncate = Enum.TextTruncate.AtEnd, Text = plr.Name }, row) local b = new("TextButton", { Size = UDim2.new(0, 40, 0, 18), Position = UDim2.new(1, -44, 0.5, -9), BackgroundColor3 = Color3.fromRGB(60, 130, 220), AutoButtonColor = false, Font = Enum.Font.GothamBold, TextSize = 9, TextColor3 = Color3.fromRGB(255, 255, 255), Text = "FLING", BorderSizePixel = 0 }, row) b.MouseButton1Click:Connect(function() local r = getRoot(plr) if r then push(r, power, 0.5) end end) end end end refresh() Players.PlayerAdded:Connect(function() task.wait(1); refresh() end) Players.PlayerRemoving:Connect(function() task.wait(0.2); refresh() end) -- footer local foot = new("TextButton", { Size = UDim2.new(1, -16, 0, 24), Position = UDim2.new(0, 8, 1, -30), BackgroundColor3 = Color3.fromRGB(50, 50, 58), AutoButtonColor = false, Font = Enum.Font.GothamBold, TextSize = 10, TextColor3 = Color3.fromRGB(235, 235, 240), Text = "RIGHT SHIFT TO HIDE", BorderSizePixel = 0 }, main) foot.MouseButton1Click:Connect(function() main.Visible = not main.Visible end) UIS.InputBegan:Connect(function(i, gp) if not gp and i.KeyCode == Enum.KeyCode.RightShift then main.Visible = not main.Visible end end) -- drag local drag, start, origin header.InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 then drag = true; start = i.Position origin = Vector2.new(main.Position.X.Offset, main.Position.Y.Offset) end end) UIS.InputChanged:Connect(function(i) if drag and i.UserInputType == Enum.UserInputType.MouseMovement then local d = i.Position - start main.Position = UDim2.new(0.5, origin.X + d.X, 0.5, origin.Y + d.Y) end end) UIS.InputEnded:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 then drag = false end end) tabs.Fling.MouseButton1Click()