Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ps = game:GetService("Players")
- local rs = game:GetService("RunService")
- local uis = game:GetService("UserInputService")
- local cg = game:GetService("CoreGui")
- local hs = game:GetService("HttpService")
- local p = ps.LocalPlayer
- local m = p:GetMouse()
- -- State variables
- local tg = nil
- local at = false
- local hb = nil
- local pl = false
- local rc = false
- local pm = "LOOP" -- "LOOP", "ONCE", "1TB"
- local mm = "LOCAL" -- "LOCAL", "WORLD", "LOOK"
- local pd = false -- Prediction toggle
- local pdt = 0.12 -- Prediction lead time (sec)
- local op = Vector3.new(0, 0, 0)
- local or_ = Vector3.new(0, 0, 0)
- local pp = Vector3.new(0, 0, 0)
- local pr = Vector3.new(0, 0, 0)
- local pcf = nil -- Pre-attach CFrame for 1TB
- local kf = {}
- local cb = nil
- local th = nil
- local rth = nil
- local pv = {}
- local su = {}
- local hms = {} -- Persistent highlight memory (default false)
- local ca = "Normal" -- Current action for keyframe
- local atks = {} -- Active loaded animation tracks
- -- Replication simulation state
- local se = false
- local sl = 0.12
- local pi = 0.05
- local pt = 0
- local pq = {}
- local gm = nil
- local gps = {}
- local gcf = CFrame.new()
- -- Emote IDs
- local eids = {
- Dance1 = "rbxassetid://507771019",
- Dance2 = "rbxassetid://507776043",
- Dance3 = "rbxassetid://507777268",
- Laugh = "rbxassetid://507770818",
- Wave = "rbxassetid://507770239",
- Point = "rbxassetid://507770453",
- Cheer = "rbxassetid://507770677"
- }
- local function stopAnim()
- for _, trk in pairs(atks) do
- trk:Stop()
- end
- table.clear(atks)
- end
- local function playAct(act)
- local ch = p.Character
- if not ch then return end
- local hum = ch:FindFirstChildOfClass("Humanoid")
- if not hum then return end
- stopAnim()
- if act == "Sit" then
- hum.Sit = true
- elseif act == "PlatformStand" then
- hum.PlatformStand = true
- elseif act == "Normal" then
- hum.Sit = false
- hum.PlatformStand = false
- elseif eids[act] then
- hum.PlatformStand = false
- local anim = Instance.new("Animation")
- anim.AnimationId = eids[act]
- local trk = hum:LoadAnimation(anim)
- trk:Play()
- table.insert(atks, trk)
- end
- end
- -- Master UI Canvas
- local pg = p:FindFirstChildOfClass("PlayerGui")
- local gp = pg or cg
- local sg = Instance.new("ScreenGui")
- sg.Name = "LinearStudioUI"
- sg.ResetOnSpawn = false
- sg.Enabled = true
- sg.Parent = gp
- -- Color Theme
- local thm = {
- bg = Color3.fromRGB(13, 15, 20),
- card = Color3.fromRGB(19, 22, 30),
- sub = Color3.fromRGB(25, 29, 40),
- bdr = Color3.fromRGB(36, 42, 58),
- bdrAct = Color3.fromRGB(80, 88, 120),
- txt = Color3.fromRGB(240, 243, 250),
- mut = Color3.fromRGB(135, 142, 160),
- pri = Color3.fromRGB(99, 102, 241),
- priH = Color3.fromRGB(129, 140, 248),
- suc = Color3.fromRGB(16, 185, 129),
- dan = Color3.fromRGB(244, 63, 94),
- wrn = Color3.fromRGB(245, 158, 11)
- }
- -- Context Menu
- local cm = Instance.new("Frame")
- cm.Size = UDim2.new(0, 150, 0, 120)
- cm.BackgroundColor3 = thm.card
- cm.BorderSizePixel = 0
- cm.ZIndex = 120
- cm.Visible = false
- cm.Parent = sg
- Instance.new("UICorner", cm).CornerRadius = UDim.new(0, 6)
- local cms = Instance.new("UIStroke")
- cms.Color = thm.bdr
- cms.Thickness = 1
- cms.Parent = cm
- local cml = Instance.new("UIListLayout")
- cml.Padding = UDim.new(0, 2)
- cml.Parent = cm
- local cmp = Instance.new("UIPadding")
- cmp.PaddingTop = UDim.new(0, 4)
- cmp.PaddingBottom = UDim.new(0, 4)
- cmp.PaddingLeft = UDim.new(0, 4)
- cmp.PaddingRight = UDim.new(0, 4)
- cmp.Parent = cm
- local tki = nil
- local function ccb(txt, fn)
- local b = Instance.new("TextButton")
- b.Size = UDim2.new(1, 0, 0, 24)
- b.BackgroundTransparency = 1
- b.TextColor3 = thm.txt
- b.Font = Enum.Font.GothamMedium
- b.TextSize = 11
- b.Text = " " .. txt
- b.TextXAlignment = Enum.TextXAlignment.Left
- b.BorderSizePixel = 0
- b.ZIndex = 121
- b.Parent = cm
- Instance.new("UICorner", b).CornerRadius = UDim.new(0, 4)
- b.MouseEnter:Connect(function() b.BackgroundTransparency = 0.85 b.BackgroundColor3 = thm.pri end)
- b.MouseLeave:Connect(function() b.BackgroundTransparency = 1 end)
- b.MouseButton1Click:Connect(function()
- cm.Visible = false
- fn()
- end)
- end
- uis.InputBegan:Connect(function(inp)
- if inp.UserInputType == Enum.UserInputType.MouseButton1 and cm.Visible then
- local pos = inp.Position
- local cp = cm.AbsolutePosition
- local cs = cm.AbsoluteSize
- if pos.X < cp.X or pos.X > cp.X + cs.X or pos.Y < cp.Y or pos.Y > cp.Y + cs.Y then
- cm.Visible = false
- end
- end
- end)
- -- Main Application Window
- local mf = Instance.new("Frame")
- mf.Size = UDim2.new(0, 680, 0, 490)
- mf.Position = UDim2.new(0.5, -340, 0.5, -245)
- mf.BackgroundColor3 = thm.bg
- mf.BorderSizePixel = 0
- mf.Active = true
- mf.Parent = sg
- Instance.new("UICorner", mf).CornerRadius = UDim.new(0, 10)
- local mfs = Instance.new("UIStroke")
- mfs.Color = thm.bdr
- mfs.Thickness = 1.2
- mfs.Parent = mf
- -- Navigation Header
- local nb = Instance.new("Frame")
- nb.Size = UDim2.new(1, 0, 0, 42)
- nb.BackgroundColor3 = thm.card
- nb.BorderSizePixel = 0
- nb.Parent = mf
- Instance.new("UICorner", nb).CornerRadius = UDim.new(0, 10)
- local nbp = Instance.new("UIPadding")
- nbp.PaddingLeft = UDim.new(0, 14)
- nbp.PaddingRight = UDim.new(0, 14)
- nbp.Parent = nb
- local nbt = Instance.new("TextLabel")
- nbt.Size = UDim2.new(0, 200, 1, 0)
- nbt.Text = "WELD TEST STUDIO"
- nbt.TextColor3 = thm.txt
- nbt.Font = Enum.Font.GothamBold
- nbt.TextSize = 12
- nbt.TextXAlignment = Enum.TextXAlignment.Left
- nbt.BackgroundTransparency = 1
- nbt.Parent = nb
- local sbg = Instance.new("Frame")
- sbg.Size = UDim2.new(0, 80, 0, 20)
- sbg.Position = UDim2.new(1, -80, 0.5, -10)
- sbg.BackgroundColor3 = thm.sub
- sbg.BorderSizePixel = 0
- sbg.Parent = nb
- Instance.new("UICorner", sbg).CornerRadius = UDim.new(1, 0)
- local sbt = Instance.new("TextLabel")
- sbt.Size = UDim2.new(1, 0, 1, 0)
- sbt.Text = "IDLE"
- sbt.TextColor3 = thm.mut
- sbt.Font = Enum.Font.GothamBold
- sbt.TextSize = 9
- sbt.BackgroundTransparency = 1
- sbt.Parent = sbg
- -- Dragging Handler
- do
- local dg, ds, sp
- nb.InputBegan:Connect(function(inp)
- if inp.UserInputType == Enum.UserInputType.MouseButton1 then
- dg = true
- ds = inp.Position
- sp = mf.Position
- local mv, ed
- mv = uis.InputChanged:Connect(function(mi)
- if mi.UserInputType == Enum.UserInputType.MouseMovement then
- local dt_ = mi.Position - ds
- mf.Position = UDim2.new(sp.X.Scale, sp.X.Offset + dt_.X, sp.Y.Scale, sp.Y.Offset + dt_.Y)
- end
- end)
- ed = uis.InputEnded:Connect(function(ei)
- if ei.UserInputType == Enum.UserInputType.MouseButton1 then
- dg = false
- mv:Disconnect()
- ed:Disconnect()
- end
- end)
- end
- end)
- end
- -- Layout Columns
- local bc = Instance.new("Frame")
- bc.Size = UDim2.new(1, 0, 1, -42)
- bc.Position = UDim2.new(0, 0, 0, 42)
- bc.BackgroundTransparency = 1
- bc.Parent = mf
- local lc = Instance.new("Frame")
- lc.Size = UDim2.new(0, 310, 1, -16)
- lc.Position = UDim2.new(0, 10, 0, 8)
- lc.BackgroundColor3 = thm.card
- lc.BorderSizePixel = 0
- lc.Parent = bc
- Instance.new("UICorner", lc).CornerRadius = UDim.new(0, 8)
- local rc_ = Instance.new("Frame")
- rc_.Size = UDim2.new(1, -340, 1, -16)
- rc_.Position = UDim2.new(0, 330, 0, 8)
- rc_.BackgroundColor3 = thm.card
- rc_.BorderSizePixel = 0
- rc_.Parent = bc
- Instance.new("UICorner", rc_).CornerRadius = UDim.new(0, 8)
- ----------------------------------------------------
- -- LEFT COLUMN: TARGET & CONTROLS
- ----------------------------------------------------
- local tc = Instance.new("Frame")
- tc.Size = UDim2.new(1, -16, 0, 24)
- tc.Position = UDim2.new(0, 8, 0, 8)
- tc.BackgroundColor3 = thm.bg
- tc.BorderSizePixel = 0
- tc.Parent = lc
- Instance.new("UICorner", tc).CornerRadius = UDim.new(0, 4)
- local tl_ = Instance.new("TextLabel")
- tl_.Size = UDim2.new(1, -8, 1, 0)
- tl_.Position = UDim2.new(0, 6, 0, 0)
- tl_.Text = "Target: [None]"
- tl_.TextColor3 = thm.mut
- tl_.Font = Enum.Font.GothamMedium
- tl_.TextSize = 10
- tl_.TextXAlignment = Enum.TextXAlignment.Left
- tl_.BackgroundTransparency = 1
- tl_.Parent = tc
- local function csl(nm, yp, mn, mx, df, cbk)
- local rw = Instance.new("Frame")
- rw.Size = UDim2.new(1, -16, 0, 18)
- rw.Position = UDim2.new(0, 8, 0, yp)
- rw.BackgroundTransparency = 1
- rw.Parent = lc
- local lb = Instance.new("TextLabel")
- lb.Size = UDim2.new(0, 38, 1, 0)
- lb.Text = nm
- lb.TextColor3 = thm.mut
- lb.Font = Enum.Font.GothamBold
- lb.TextSize = 9
- lb.TextXAlignment = Enum.TextXAlignment.Left
- lb.BackgroundTransparency = 1
- lb.Parent = rw
- local tr = Instance.new("Frame")
- tr.Size = UDim2.new(0, 196, 0, 4)
- tr.Position = UDim2.new(0, 42, 0.5, -2)
- tr.BackgroundColor3 = thm.bdr
- tr.BorderSizePixel = 0
- tr.Parent = rw
- Instance.new("UICorner", tr).CornerRadius = UDim.new(1, 0)
- local fl = Instance.new("Frame")
- fl.Size = UDim2.new(0, 0, 1, 0)
- fl.BackgroundColor3 = thm.pri
- fl.BorderSizePixel = 0
- fl.Parent = tr
- Instance.new("UICorner", fl).CornerRadius = UDim.new(1, 0)
- local kb = Instance.new("Frame")
- kb.Size = UDim2.new(0, 10, 0, 10)
- kb.AnchorPoint = Vector2.new(0.5, 0.5)
- kb.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- kb.BorderSizePixel = 0
- kb.ZIndex = 3
- kb.Parent = tr
- Instance.new("UICorner", kb).CornerRadius = UDim.new(1, 0)
- local bx = Instance.new("TextBox")
- bx.Size = UDim2.new(0, 46, 0, 16)
- bx.Position = UDim2.new(1, -46, 0.5, -8)
- bx.Text = tostring(df)
- bx.TextColor3 = thm.txt
- bx.BackgroundColor3 = thm.bg
- bx.BorderSizePixel = 0
- bx.Font = Enum.Font.Gotham
- bx.TextSize = 9
- bx.ClearTextOnFocus = false
- bx.Parent = rw
- Instance.new("UICorner", bx).CornerRadius = UDim.new(0, 3)
- local cv = df
- local function sv(val, ub)
- val = math.clamp(val, mn, mx)
- cv = val
- local a = (val - mn) / (mx - mn)
- fl.Size = UDim2.new(a, 0, 1, 0)
- kb.Position = UDim2.new(a, 0, 0.5, 0)
- if ub then bx.Text = string.format("%.1f", val) end
- cbk(val)
- end
- local function inp(i)
- local a = math.clamp((i.Position.X - tr.AbsolutePosition.X) / tr.AbsoluteSize.X, 0, 1)
- sv(mn + a * (mx - mn), true)
- end
- tr.InputBegan:Connect(function(i)
- if i.UserInputType == Enum.UserInputType.MouseButton1 then
- inp(i)
- local mv, st
- mv = uis.InputChanged:Connect(function(mi)
- if mi.UserInputType == Enum.UserInputType.MouseMovement then inp(mi) end
- end)
- st = uis.InputEnded:Connect(function(ei)
- if ei.UserInputType == Enum.UserInputType.MouseButton1 then
- mv:Disconnect()
- st:Disconnect()
- end
- end)
- end
- end)
- bx.FocusLost:Connect(function()
- local num = tonumber(bx.Text)
- sv(num or cv, true)
- end)
- sv(df, true)
- su[nm] = sv
- end
- csl("Pos X", 36, -35, 35, 0, function(v) op = Vector3.new(v, op.Y, op.Z) end)
- csl("Pos Y", 56, -35, 35, 0, function(v) op = Vector3.new(op.X, v, op.Z) end)
- csl("Pos Z", 76, -35, 35, 0, function(v) op = Vector3.new(op.X, op.Y, v) end)
- csl("Rot X", 98, -180, 180, 0, function(v) or_ = Vector3.new(math.rad(v), or_.Y, or_.Z) end)
- csl("Rot Y", 118, -180, 180, 0, function(v) or_ = Vector3.new(or_.X, math.rad(v), or_.Z) end)
- csl("Rot Z", 138, -180, 180, 0, function(v) or_ = Vector3.new(or_.X, or_.Y, math.rad(v)) end)
- -- Method & Prediction Toolbar
- local mbRow = Instance.new("Frame")
- mbRow.Size = UDim2.new(1, -16, 0, 22)
- mbRow.Position = UDim2.new(0, 8, 0, 160)
- mbRow.BackgroundTransparency = 1
- mbRow.Parent = lc
- local mmBtn = Instance.new("TextButton")
- mmBtn.Size = UDim2.new(0, 92, 1, 0)
- mmBtn.Text = "MODE: LOCAL"
- mmBtn.BackgroundColor3 = thm.sub
- mmBtn.TextColor3 = thm.txt
- mmBtn.Font = Enum.Font.GothamBold
- mmBtn.TextSize = 8
- mmBtn.BorderSizePixel = 0
- mmBtn.Parent = mbRow
- Instance.new("UICorner", mmBtn).CornerRadius = UDim.new(0, 4)
- local mModes = {"LOCAL", "WORLD", "LOOK"}
- local mIdx = 1
- mmBtn.MouseButton1Click:Connect(function()
- mIdx = (mIdx % #mModes) + 1
- mm = mModes[mIdx]
- mmBtn.Text = "MODE: " .. mm
- end)
- local pdBtn = Instance.new("TextButton")
- pdBtn.Size = UDim2.new(0, 92, 1, 0)
- pdBtn.Position = UDim2.new(0, 98, 0, 0)
- pdBtn.Text = "PRED: OFF"
- pdBtn.BackgroundColor3 = thm.sub
- pdBtn.TextColor3 = thm.mut
- pdBtn.Font = Enum.Font.GothamBold
- pdBtn.TextSize = 8
- pdBtn.BorderSizePixel = 0
- pdBtn.Parent = mbRow
- Instance.new("UICorner", pdBtn).CornerRadius = UDim.new(0, 4)
- pdBtn.MouseButton1Click:Connect(function()
- pd = not pd
- if pd then
- pdBtn.Text = "PRED: ON"
- pdBtn.BackgroundColor3 = thm.pri
- pdBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
- else
- pdBtn.Text = "PRED: OFF"
- pdBtn.BackgroundColor3 = thm.sub
- pdBtn.TextColor3 = thm.mut
- end
- end)
- local actBtn = Instance.new("TextButton")
- actBtn.Size = UDim2.new(1, -196, 1, 0)
- actBtn.Position = UDim2.new(0, 196, 0, 0)
- actBtn.Text = "ACT: Normal"
- actBtn.BackgroundColor3 = thm.sub
- actBtn.TextColor3 = thm.txt
- actBtn.Font = Enum.Font.GothamBold
- actBtn.TextSize = 8
- actBtn.BorderSizePixel = 0
- actBtn.Parent = mbRow
- Instance.new("UICorner", actBtn).CornerRadius = UDim.new(0, 4)
- local acts = {"Normal", "Sit", "PlatformStand", "Dance1", "Dance2", "Dance3", "Laugh", "Wave", "Point", "Cheer"}
- local aIdx = 1
- actBtn.MouseButton1Click:Connect(function()
- aIdx = (aIdx % #acts) + 1
- ca = acts[aIdx]
- actBtn.Text = "ACT: " .. ca
- playAct(ca)
- end)
- -- Action Buttons
- local abRow = Instance.new("Frame")
- abRow.Size = UDim2.new(1, -16, 0, 24)
- abRow.Position = UDim2.new(0, 8, 0, 186)
- abRow.BackgroundTransparency = 1
- abRow.Parent = lc
- local ab = Instance.new("TextButton")
- ab.Size = UDim2.new(0, 92, 1, 0)
- ab.Text = "ATTACH"
- ab.BackgroundColor3 = thm.suc
- ab.TextColor3 = Color3.fromRGB(255, 255, 255)
- ab.Font = Enum.Font.GothamBold
- ab.TextSize = 9
- ab.BorderSizePixel = 0
- ab.Parent = abRow
- Instance.new("UICorner", ab).CornerRadius = UDim.new(0, 4)
- local sb = Instance.new("TextButton")
- sb.Size = UDim2.new(0, 92, 1, 0)
- sb.Position = UDim2.new(0, 98, 0, 0)
- sb.Text = "SIM REP: OFF"
- sb.BackgroundColor3 = thm.sub
- sb.TextColor3 = thm.mut
- sb.Font = Enum.Font.GothamBold
- sb.TextSize = 8
- sb.BorderSizePixel = 0
- sb.Parent = abRow
- Instance.new("UICorner", sb).CornerRadius = UDim.new(0, 4)
- local mkTBtn = Instance.new("TextButton")
- mkTBtn.Size = UDim2.new(1, -196, 1, 0)
- mkTBtn.Position = UDim2.new(0, 196, 0, 0)
- mkTBtn.Text = "+ TOOL SET"
- mkTBtn.BackgroundColor3 = thm.pri
- mkTBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
- mkTBtn.Font = Enum.Font.GothamBold
- mkTBtn.TextSize = 8
- mkTBtn.BorderSizePixel = 0
- mkTBtn.Parent = abRow
- Instance.new("UICorner", mkTBtn).CornerRadius = UDim.new(0, 4)
- -- Hitbox / Highlight List
- local ph = Instance.new("TextLabel")
- ph.Size = UDim2.new(1, -16, 0, 14)
- ph.Position = UDim2.new(0, 8, 0, 214)
- ph.Text = "HITBOX & HIGHLIGHT TOGGLES (DEFAULT: OFF)"
- ph.TextColor3 = thm.mut
- ph.Font = Enum.Font.GothamBold
- ph.TextSize = 8
- ph.TextXAlignment = Enum.TextXAlignment.Left
- ph.BackgroundTransparency = 1
- ph.Parent = lc
- local ps_ = Instance.new("ScrollingFrame")
- ps_.Size = UDim2.new(1, -16, 1, -234)
- ps_.Position = UDim2.new(0, 8, 0, 228)
- ps_.BackgroundColor3 = thm.bg
- ps_.BorderSizePixel = 0
- ps_.ScrollBarThickness = 2
- ps_.CanvasSize = UDim2.new(0, 0, 0, 0)
- ps_.Parent = lc
- Instance.new("UICorner", ps_).CornerRadius = UDim.new(0, 5)
- local pll = Instance.new("UIListLayout")
- pll.Padding = UDim.new(0, 2)
- pll.Parent = ps_
- pll:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
- ps_.CanvasSize = UDim2.new(0, 0, 0, pll.AbsoluteContentSize.Y + 4)
- end)
- ----------------------------------------------------
- -- RIGHT COLUMN: TIMELINE & KEYFRAMES
- ----------------------------------------------------
- local tt = Instance.new("Frame")
- tt.Size = UDim2.new(1, -16, 0, 24)
- tt.Position = UDim2.new(0, 8, 0, 8)
- tt.BackgroundTransparency = 1
- tt.Parent = rc_
- local sk = Instance.new("TextButton")
- sk.Size = UDim2.new(0, 50, 1, 0)
- sk.Text = "+ KF"
- sk.BackgroundColor3 = thm.pri
- sk.TextColor3 = Color3.fromRGB(255, 255, 255)
- sk.Font = Enum.Font.GothamBold
- sk.TextSize = 9
- sk.BorderSizePixel = 0
- sk.Parent = tt
- Instance.new("UICorner", sk).CornerRadius = UDim.new(0, 4)
- local pb = Instance.new("TextButton")
- pb.Size = UDim2.new(0, 46, 1, 0)
- pb.Position = UDim2.new(0, 54, 0, 0)
- pb.Text = "PLAY"
- pb.BackgroundColor3 = thm.suc
- pb.TextColor3 = Color3.fromRGB(255, 255, 255)
- pb.Font = Enum.Font.GothamBold
- pb.TextSize = 9
- pb.BorderSizePixel = 0
- pb.Parent = tt
- Instance.new("UICorner", pb).CornerRadius = UDim.new(0, 4)
- local lp = Instance.new("TextButton")
- lp.Size = UDim2.new(0, 46, 1, 0)
- lp.Position = UDim2.new(0, 104, 0, 0)
- lp.Text = "LOOP"
- lp.BackgroundColor3 = thm.sub
- lp.TextColor3 = thm.txt
- lp.Font = Enum.Font.GothamBold
- lp.TextSize = 9
- lp.BorderSizePixel = 0
- lp.Parent = tt
- Instance.new("UICorner", lp).CornerRadius = UDim.new(0, 4)
- local pModes = {"LOOP", "ONCE", "1TB"}
- local pIdx = 1
- lp.MouseButton1Click:Connect(function()
- pIdx = (pIdx % #pModes) + 1
- pm = pModes[pIdx]
- lp.Text = pm
- if pm == "LOOP" then
- lp.BackgroundColor3 = thm.pri
- elseif pm == "1TB" then
- lp.BackgroundColor3 = thm.wrn
- else
- lp.BackgroundColor3 = thm.sub
- end
- end)
- local rb = Instance.new("TextButton")
- rb.Size = UDim2.new(0, 46, 1, 0)
- rb.Position = UDim2.new(0, 154, 0, 0)
- rb.Text = "REC ●"
- rb.BackgroundColor3 = thm.dan
- rb.TextColor3 = Color3.fromRGB(255, 255, 255)
- rb.Font = Enum.Font.GothamBold
- rb.TextSize = 9
- rb.BorderSizePixel = 0
- rb.Parent = tt
- Instance.new("UICorner", rb).CornerRadius = UDim.new(0, 4)
- local cb_ = Instance.new("TextButton")
- cb_.Size = UDim2.new(0, 36, 1, 0)
- cb_.Position = UDim2.new(1, -36, 0, 0)
- cb_.Text = "CLR"
- cb_.BackgroundColor3 = thm.sub
- cb_.TextColor3 = thm.mut
- cb_.Font = Enum.Font.Gotham
- cb_.TextSize = 9
- cb_.BorderSizePixel = 0
- cb_.Parent = tt
- Instance.new("UICorner", cb_).CornerRadius = UDim.new(0, 4)
- -- JSON Export & Import Bar
- local jsBar = Instance.new("Frame")
- jsBar.Size = UDim2.new(1, -16, 0, 22)
- jsBar.Position = UDim2.new(0, 8, 0, 36)
- jsBar.BackgroundTransparency = 1
- jsBar.Parent = rc_
- local jsBox = Instance.new("TextBox")
- jsBox.Size = UDim2.new(1, -100, 1, 0)
- jsBox.Text = ""
- jsBox.PlaceholderText = "Paste JSON here..."
- jsBox.TextColor3 = thm.txt
- jsBox.BackgroundColor3 = thm.bg
- jsBox.BorderSizePixel = 0
- jsBox.Font = Enum.Font.Gotham
- jsBox.TextSize = 9
- jsBox.ClearTextOnFocus = false
- jsBox.Parent = jsBar
- Instance.new("UICorner", jsBox).CornerRadius = UDim.new(0, 4)
- local cpyBtn = Instance.new("TextButton")
- cpyBtn.Size = UDim2.new(0, 46, 1, 0)
- cpyBtn.Position = UDim2.new(1, -94, 0, 0)
- cpyBtn.Text = "COPY"
- cpyBtn.BackgroundColor3 = thm.sub
- cpyBtn.TextColor3 = thm.txt
- cpyBtn.Font = Enum.Font.GothamBold
- cpyBtn.TextSize = 8
- cpyBtn.BorderSizePixel = 0
- cpyBtn.Parent = jsBar
- Instance.new("UICorner", cpyBtn).CornerRadius = UDim.new(0, 4)
- local lodBtn = Instance.new("TextButton")
- lodBtn.Size = UDim2.new(0, 44, 1, 0)
- lodBtn.Position = UDim2.new(1, -44, 0, 0)
- lodBtn.Text = "LOAD"
- lodBtn.BackgroundColor3 = thm.pri
- lodBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
- lodBtn.Font = Enum.Font.GothamBold
- lodBtn.TextSize = 8
- lodBtn.BorderSizePixel = 0
- lodBtn.Parent = jsBar
- Instance.new("UICorner", lodBtn).CornerRadius = UDim.new(0, 4)
- local ts = Instance.new("ScrollingFrame")
- ts.Size = UDim2.new(1, -16, 1, -66)
- ts.Position = UDim2.new(0, 8, 0, 62)
- ts.BackgroundColor3 = thm.bg
- ts.BorderSizePixel = 0
- ts.ScrollBarThickness = 3
- ts.CanvasSize = UDim2.new(0, 0, 0, 0)
- ts.Parent = rc_
- Instance.new("UICorner", ts).CornerRadius = UDim.new(0, 6)
- local tl0 = Instance.new("UIListLayout")
- tl0.Padding = UDim.new(0, 4)
- tl0.Parent = ts
- tl0:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
- ts.CanvasSize = UDim2.new(0, 0, 0, tl0.AbsoluteContentSize.Y + 6)
- end)
- local function as(pos, rot)
- op = pos
- or_ = rot
- su["Pos X"](pos.X, true)
- su["Pos Y"](pos.Y, true)
- su["Pos Z"](pos.Z, true)
- su["Rot X"](math.deg(rot.X), true)
- su["Rot Y"](math.deg(rot.Y), true)
- su["Rot Z"](math.deg(rot.Z), true)
- end
- local rtk
- ccb("Copy", function()
- if tki and kf[tki] then
- local k = kf[tki]
- cb = { pos = k.pos, rot = k.rot, mode = k.mode, duration = k.duration, act = k.act }
- end
- end)
- ccb("Paste", function()
- if cb then
- local nk = { pos = cb.pos, rot = cb.rot, mode = cb.mode, duration = cb.duration, act = cb.act }
- if tki then
- table.insert(kf, tki + 1, nk)
- else
- table.insert(kf, nk)
- end
- rtk()
- end
- end)
- ccb("Toggle Mode", function()
- if tki and kf[tki] then
- local k = kf[tki]
- k.mode = (k.mode == "Instant") and "Linear" or "Instant"
- rtk()
- end
- end)
- ccb("Set Action", function()
- if tki and kf[tki] then
- local k = kf[tki]
- k.act = ca
- rtk()
- end
- end)
- ccb("Delete", function()
- if tki and kf[tki] then
- table.remove(kf, tki)
- rtk()
- end
- end)
- rtk = function()
- for _, c in ipairs(ts:GetChildren()) do
- if c:IsA("Frame") then c:Destroy() end
- end
- for i, k in ipairs(kf) do
- local cd = Instance.new("Frame")
- cd.Size = UDim2.new(1, -6, 0, 36)
- cd.BackgroundColor3 = thm.card
- cd.BorderSizePixel = 0
- cd.Parent = ts
- Instance.new("UICorner", cd).CornerRadius = UDim.new(0, 4)
- local cs = Instance.new("UIStroke")
- cs.Color = (k.mode == "Linear") and thm.pri or thm.bdr
- cs.Thickness = 1
- cs.Parent = cd
- local bg = Instance.new("TextLabel")
- bg.Size = UDim2.new(0, 20, 1, 0)
- bg.Position = UDim2.new(0, 4, 0, 0)
- bg.Text = "#" .. i
- bg.TextColor3 = thm.pri
- bg.Font = Enum.Font.GothamBold
- bg.TextSize = 10
- bg.BackgroundTransparency = 1
- bg.Parent = cd
- local pt_ = Instance.new("TextLabel")
- pt_.Size = UDim2.new(0, 110, 0, 14)
- pt_.Position = UDim2.new(0, 26, 0, 3)
- pt_.Text = string.format("X:%.1f Y:%.1f Z:%.1f", k.pos.X, k.pos.Y, k.pos.Z)
- pt_.TextColor3 = thm.txt
- pt_.Font = Enum.Font.Gotham
- pt_.TextSize = 9
- pt_.TextXAlignment = Enum.TextXAlignment.Left
- pt_.BackgroundTransparency = 1
- pt_.Parent = cd
- local mp = Instance.new("TextButton")
- mp.Size = UDim2.new(0, 44, 0, 14)
- mp.Position = UDim2.new(0, 26, 0, 18)
- mp.Text = k.mode
- mp.BackgroundColor3 = (k.mode == "Linear") and thm.pri or thm.sub
- mp.TextColor3 = Color3.fromRGB(255, 255, 255)
- mp.Font = Enum.Font.GothamBold
- mp.TextSize = 8
- mp.BorderSizePixel = 0
- mp.Parent = cd
- Instance.new("UICorner", mp).CornerRadius = UDim.new(0, 3)
- mp.MouseButton1Click:Connect(function()
- k.mode = (k.mode == "Instant") and "Linear" or "Instant"
- rtk()
- end)
- local abt = Instance.new("TextButton")
- abt.Size = UDim2.new(0, 48, 0, 14)
- abt.Position = UDim2.new(0, 74, 0, 18)
- abt.Text = k.act or "Normal"
- abt.BackgroundColor3 = thm.sub
- abt.TextColor3 = thm.mut
- abt.Font = Enum.Font.Gotham
- abt.TextSize = 8
- abt.BorderSizePixel = 0
- abt.Parent = cd
- Instance.new("UICorner", abt).CornerRadius = UDim.new(0, 3)
- abt.MouseButton1Click:Connect(function()
- k.act = ca
- abt.Text = ca
- end)
- local db = Instance.new("TextBox")
- db.Size = UDim2.new(0, 44, 0, 18)
- db.Position = UDim2.new(1, -48, 0.5, -9)
- db.Text = string.format("%.2fs", k.duration or 0.25)
- db.TextColor3 = thm.suc
- db.BackgroundColor3 = thm.bg
- db.BorderSizePixel = 0
- db.Font = Enum.Font.Gotham
- db.TextSize = 9
- db.Parent = cd
- Instance.new("UICorner", db).CornerRadius = UDim.new(0, 3)
- db.FocusLost:Connect(function()
- local num = tonumber(db.Text:match("[%d%.]+")) or 0.25
- k.duration = math.clamp(num, 0.02, 60)
- db.Text = string.format("%.2fs", k.duration)
- end)
- cd.InputBegan:Connect(function(inp)
- if inp.UserInputType == Enum.UserInputType.MouseButton2 then
- tki = i
- cm.Position = UDim2.new(0, inp.Position.X, 0, inp.Position.Y)
- cm.Visible = true
- end
- end)
- end
- end
- -- JSON Logic
- cpyBtn.MouseButton1Click:Connect(function()
- local serial = {}
- for _, k in ipairs(kf) do
- table.insert(serial, {
- px = k.pos.X, py = k.pos.Y, pz = k.pos.Z,
- rx = k.rot.X, ry = k.rot.Y, rz = k.rot.Z,
- m = k.mode, d = k.duration, a = k.act
- })
- end
- jsBox.Text = hs:JSONEncode(serial)
- end)
- lodBtn.MouseButton1Click:Connect(function()
- local raw = jsBox.Text
- if raw and raw ~= "" then
- local ok, data = pcall(function() return hs:JSONDecode(raw) end)
- if ok and type(data) == "table" then
- table.clear(kf)
- for _, item in ipairs(data) do
- table.insert(kf, {
- pos = Vector3.new(item.px or 0, item.py or 0, item.pz or 0),
- rot = Vector3.new(item.rx or 0, item.ry or 0, item.rz or 0),
- mode = item.m or "Instant",
- duration = item.d or 0.25,
- act = item.a or "Normal"
- })
- end
- rtk()
- end
- end
- end)
- sk.MouseButton1Click:Connect(function()
- table.insert(kf, { pos = op, rot = or_, mode = "Instant", duration = 0.25, act = ca })
- rtk()
- end)
- cb_.MouseButton1Click:Connect(function()
- table.clear(kf)
- rtk()
- end)
- ----------------------------------------------------
- -- HITBOX & HIGHLIGHT SYSTEM
- ----------------------------------------------------
- local function cv_()
- for _, e in pairs(pv) do
- if e.Adornment then e.Adornment:Destroy() end
- if e.Highlight then e.Highlight:Destroy() end
- end
- table.clear(pv)
- for _, c in ipairs(ps_:GetChildren()) do
- if c:IsA("Frame") then c:Destroy() end
- end
- end
- local function av_(chr)
- cv_()
- if not chr then return end
- for _, pt_ in ipairs(chr:GetChildren()) do
- if pt_:IsA("BasePart") and pt_.Name ~= "HumanoidRootPart" then
- local nm = pt_.Name
- if hms[nm] == nil then
- hms[nm] = false
- end
- local isVis = hms[nm]
- local bx = Instance.new("BoxHandleAdornment")
- bx.Name = "HB_" .. nm
- bx.Adornee = pt_
- bx.Size = pt_.Size + Vector3.new(0.05, 0.05, 0.05)
- bx.Color3 = Color3.fromRGB(255, 0, 0)
- bx.Transparency = 0.55
- bx.AlwaysOnTop = true
- bx.ZIndex = 8
- bx.Visible = isVis
- bx.Parent = pt_
- local hl = Instance.new("Highlight")
- hl.Name = "HL_" .. nm
- hl.FillColor = Color3.fromRGB(255, 50, 50)
- hl.OutlineColor = Color3.fromRGB(255, 255, 255)
- hl.FillTransparency = 0.65
- hl.OutlineTransparency = 0
- hl.Adornee = isVis and pt_ or nil
- hl.Enabled = isVis
- hl.Parent = pt_
- local rw = Instance.new("Frame")
- rw.Size = UDim2.new(1, -6, 0, 20)
- rw.BackgroundColor3 = thm.card
- rw.BorderSizePixel = 0
- rw.Parent = ps_
- Instance.new("UICorner", rw).CornerRadius = UDim.new(0, 3)
- local tl1 = Instance.new("TextLabel")
- tl1.Size = UDim2.new(1, -45, 1, 0)
- tl1.Position = UDim2.new(0, 4, 0, 0)
- tl1.Text = nm
- tl1.TextColor3 = thm.txt
- tl1.Font = Enum.Font.Gotham
- tl1.TextSize = 9
- tl1.TextXAlignment = Enum.TextXAlignment.Left
- tl1.BackgroundTransparency = 1
- tl1.Parent = rw
- local tb = Instance.new("TextButton")
- tb.Size = UDim2.new(0, 36, 0, 14)
- tb.Position = UDim2.new(1, -38, 0.5, -7)
- tb.Text = isVis and "ON" or "OFF"
- tb.BackgroundColor3 = isVis and thm.suc or thm.sub
- tb.TextColor3 = Color3.fromRGB(255, 255, 255)
- tb.Font = Enum.Font.GothamBold
- tb.TextSize = 8
- tb.BorderSizePixel = 0
- tb.Parent = rw
- Instance.new("UICorner", tb).CornerRadius = UDim.new(0, 3)
- local itm = { Adornment = bx, Highlight = hl, Visible = isVis }
- pv[nm] = itm
- tb.MouseButton1Click:Connect(function()
- itm.Visible = not itm.Visible
- hms[nm] = itm.Visible
- itm.Adornment.Visible = itm.Visible
- itm.Highlight.Enabled = itm.Visible
- itm.Highlight.Adornee = itm.Visible and pt_ or nil
- if itm.Visible then
- tb.Text = "ON"
- tb.BackgroundColor3 = thm.suc
- else
- tb.Text = "OFF"
- tb.BackgroundColor3 = thm.sub
- end
- end)
- end
- end
- end
- ----------------------------------------------------
- -- ATTACHMENT & PHYSICS LOOP
- ----------------------------------------------------
- local function dt_()
- at = false
- ab.Text = "ATTACH"
- ab.BackgroundColor3 = thm.suc
- sbt.Text = "IDLE"
- sbt.TextColor3 = thm.mut
- if hb then
- hb:Disconnect()
- hb = nil
- end
- local ch = p.Character
- if ch then
- local hm = ch:FindFirstChildOfClass("Humanoid")
- if hm then hm.PlatformStand = false end
- end
- stopAnim()
- end
- local function at_()
- if not tg or not tg:FindFirstChild("HumanoidRootPart") then return end
- local ch = p.Character
- if not ch or not ch:FindFirstChild("HumanoidRootPart") then return end
- at = true
- ab.Text = "DETACH"
- ab.BackgroundColor3 = thm.dan
- sbt.Text = "ATTACHED"
- sbt.TextColor3 = thm.suc
- local mr = ch.HumanoidRootPart
- local hm = ch:FindFirstChildOfClass("Humanoid")
- local tr = tg.HumanoidRootPart
- pcf = mr.CFrame
- if hm then hm.PlatformStand = true end
- if hb then hb:Disconnect() end
- hb = rs.Heartbeat:Connect(function()
- if not at or not tg or not tg.Parent or not tr.Parent then
- dt_()
- return
- end
- local targetCF = tr.CFrame
- if pd then
- targetCF = targetCF + (tr.AssemblyLinearVelocity * pdt)
- end
- local finalCF
- local rotCF = CFrame.Angles(or_.X, or_.Y, or_.Z)
- if mm == "LOCAL" then
- finalCF = targetCF * CFrame.new(op) * rotCF
- elseif mm == "WORLD" then
- finalCF = CFrame.new(targetCF.Position + op) * rotCF
- elseif mm == "LOOK" then
- local lookPos = targetCF.Position + (targetCF.LookVector * op.Z) + (targetCF.RightVector * op.X) + Vector3.new(0, op.Y, 0)
- finalCF = CFrame.lookAt(lookPos, lookPos + targetCF.LookVector) * rotCF
- end
- mr.AssemblyLinearVelocity = Vector3.zero
- mr.AssemblyAngularVelocity = Vector3.zero
- mr.CFrame = finalCF
- end)
- end
- ab.MouseButton1Click:Connect(function()
- if at then dt_() else at_() end
- end)
- ----------------------------------------------------
- -- TIMELINE PLAYBACK
- ----------------------------------------------------
- local function stP()
- pl = false
- pb.Text = "PLAY"
- pb.BackgroundColor3 = thm.suc
- if th then
- task.cancel(th)
- th = nil
- end
- as(pp, pr)
- stopAnim()
- if pm == "1TB" and pcf then
- local ch_ = p.Character
- if ch_ and ch_:FindFirstChild("HumanoidRootPart") then
- ch_.HumanoidRootPart.CFrame = pcf
- end
- dt_()
- end
- end
- local function plT()
- if #kf == 0 then return end
- pl = true
- pb.Text = "STOP"
- pb.BackgroundColor3 = thm.dan
- pp = op
- pr = or_
- local myChar = p.Character
- if myChar and myChar:FindFirstChild("HumanoidRootPart") then
- pcf = myChar.HumanoidRootPart.CFrame
- end
- th = task.spawn(function()
- repeat
- for _, k in ipairs(kf) do
- if not pl then break end
- if k.act then playAct(k.act) end
- if k.mode == "Instant" then
- as(k.pos, k.rot)
- task.wait(k.duration or 0.25)
- elseif k.mode == "Linear" then
- local sp_ = op
- local sr_ = or_
- local dr = math.max(k.duration or 0.25, 0.03)
- local st_ = tick()
- while (tick() - st_) < dr and pl do
- local a = (tick() - st_) / dr
- local np = sp_:Lerp(k.pos, a)
- local nr = Vector3.new(
- sr_.X + (k.rot.X - sr_.X) * a,
- sr_.Y + (k.rot.Y - sr_.Y) * a,
- sr_.Z + (k.rot.Z - sr_.Z) * a
- )
- as(np, nr)
- rs.Heartbeat:Wait()
- end
- as(k.pos, k.rot)
- end
- end
- if #kf == 0 then task.wait(0.1) end
- until not pl or pm ~= "LOOP"
- if pl then stP() end
- end)
- end
- pb.MouseButton1Click:Connect(function()
- if pl then stP() else plT() end
- end)
- rb.MouseButton1Click:Connect(function()
- rc = not rc
- if rc then
- rb.Text = "STOP ●"
- rb.BackgroundColor3 = Color3.fromRGB(225, 29, 72)
- rth = task.spawn(function()
- while rc do
- table.insert(kf, { pos = op, rot = or_, mode = "Linear", duration = 0.1, act = ca })
- rtk()
- task.wait(0.1)
- end
- end)
- else
- rb.Text = "REC ●"
- rb.BackgroundColor3 = thm.dan
- if rth then
- task.cancel(rth)
- rth = nil
- end
- end
- end)
- ----------------------------------------------------
- -- REPLICATION SIMULATOR
- ----------------------------------------------------
- local function dg_()
- if gm then gm:Destroy() gm = nil end
- table.clear(gps)
- table.clear(pq)
- end
- local function bg_(chr)
- dg_()
- if not chr then return end
- gm = Instance.new("Model")
- gm.Name = "Ghost"
- for _, pt_ in ipairs(chr:GetChildren()) do
- if pt_:IsA("BasePart") and pt_.Name ~= "HumanoidRootPart" then
- local gp_ = Instance.new("Part")
- gp_.Size = pt_.Size
- gp_.CFrame = pt_.CFrame
- gp_.CanCollide = false
- gp_.Anchored = true
- gp_.Material = Enum.Material.ForceField
- gp_.Color = Color3.fromRGB(255, 45, 45)
- gp_.Transparency = 0.55
- gp_.Parent = gm
- local bx = Instance.new("BoxHandleAdornment")
- bx.Size = gp_.Size + Vector3.new(0.04, 0.04, 0.04)
- bx.Color3 = Color3.fromRGB(255, 60, 60)
- bx.Transparency = 0.6
- bx.AlwaysOnTop = true
- bx.Adornee = gp_
- bx.ZIndex = 5
- bx.Parent = gp_
- gps[pt_.Name] = gp_
- end
- end
- if chr:FindFirstChild("HumanoidRootPart") then
- gcf = chr.HumanoidRootPart.CFrame
- end
- gm.Parent = workspace
- end
- sb.MouseButton1Click:Connect(function()
- se = not se
- if se then
- sb.Text = "SIM REP: ON"
- sb.BackgroundColor3 = thm.pri
- sb.TextColor3 = Color3.fromRGB(255, 255, 255)
- if p.Character then bg_(p.Character) end
- else
- sb.Text = "SIM REP: OFF"
- sb.BackgroundColor3 = thm.sub
- sb.TextColor3 = thm.mut
- dg_()
- end
- end)
- rs.Heartbeat:Connect(function(dt_)
- if not se then return end
- local ch = p.Character
- if not ch or not ch:FindFirstChild("HumanoidRootPart") then return end
- local rt = ch.HumanoidRootPart
- local nw = tick()
- pt = pt + dt_
- if pt >= pi then
- pt = 0
- table.insert(pq, { sendTime = nw, cf = rt.CFrame })
- end
- while #pq > 0 and (nw - pq[1].sendTime) > 2.0 do
- table.remove(pq, 1)
- end
- local rt_ = nw - sl
- local tp_ = nil
- for i = #pq, 1, -1 do
- if pq[i].sendTime <= rt_ then
- tp_ = pq[i]
- break
- end
- end
- if tp_ then
- gcf = gcf:Lerp(tp_.cf, math.clamp(dt_ * 14, 0, 1))
- elseif #pq > 0 then
- gcf = gcf:Lerp(pq[1].cf, 0.1)
- end
- local rcf = rt.CFrame
- for nm, gp_ in pairs(gps) do
- local rl = ch:FindFirstChild(nm)
- if rl then
- local rl_ = rcf:ToObjectSpace(rl.CFrame)
- gp_.CFrame = gcf * rl_
- end
- end
- end)
- ----------------------------------------------------
- -- TOOL CREATOR & TARGET SELECTION HANDLERS
- ----------------------------------------------------
- local function makeCustomTool(name, kfList, playMode)
- local t = Instance.new("Tool")
- t.Name = name or "Weld Tool"
- t.RequiresHandle = false
- t.CanBeDropped = false
- t.Parent = p:WaitForChild("Backpack")
- local tConn = nil
- t.Activated:Connect(function()
- local tgt = m.Target
- if not tgt then return end
- local ch = tgt:FindFirstAncestorOfClass("Model")
- local pl_ = ps:GetPlayerFromCharacter(ch)
- if pl_ and pl_ ~= p and ch:FindFirstChild("HumanoidRootPart") then
- tg = ch
- tl_.Text = "Target: " .. pl_.DisplayName
- av_(tg)
- if #kfList == 0 then
- at_()
- return
- end
- dt_()
- local ch_ = p.Character
- if not ch_ or not ch_:FindFirstChild("HumanoidRootPart") then return end
- local mr = ch_.HumanoidRootPart
- local tr = tg.HumanoidRootPart
- local hm = ch_:FindFirstChildOfClass("Humanoid")
- local startCF = mr.CFrame
- at = true
- if hm then hm.PlatformStand = true end
- local curP = Vector3.new(0, 0, 0)
- local curR = Vector3.new(0, 0, 0)
- hb = rs.Heartbeat:Connect(function()
- if not at or not tg or not tg.Parent or not tr.Parent then
- dt_()
- return
- end
- local baseCF = tr.CFrame
- if pd then
- baseCF = baseCF + (tr.AssemblyLinearVelocity * pdt)
- end
- local ocf = CFrame.new(curP) * CFrame.Angles(curR.X, curR.Y, curR.Z)
- mr.AssemblyLinearVelocity = Vector3.zero
- mr.AssemblyAngularVelocity = Vector3.zero
- mr.CFrame = baseCF * ocf
- end)
- if tConn then task.cancel(tConn) end
- tConn = task.spawn(function()
- repeat
- for _, k in ipairs(kfList) do
- if not at or not t.Parent:IsA("Model") then break end
- if k.act then playAct(k.act) end
- if k.mode == "Instant" then
- curP = k.pos
- curR = k.rot
- task.wait(k.duration or 0.25)
- elseif k.mode == "Linear" then
- local sp_ = curP
- local sr_ = curR
- local dur = math.max(k.duration or 0.25, 0.03)
- local st_ = tick()
- while (tick() - st_) < dur and at and t.Parent:IsA("Model") do
- local a = (tick() - st_) / dur
- curP = sp_:Lerp(k.pos, a)
- curR = Vector3.new(
- sr_.X + (k.rot.X - sr_.X) * a,
- sr_.Y + (k.rot.Y - sr_.Y) * a,
- sr_.Z + (k.rot.Z - sr_.Z) * a
- )
- rs.Heartbeat:Wait()
- end
- curP = k.pos
- curR = k.rot
- end
- end
- if #kfList == 0 then task.wait(0.1) end
- until playMode ~= "LOOP" or not at or not t.Parent:IsA("Model")
- if playMode == "1TB" and startCF then
- dt_()
- mr.CFrame = startCF
- end
- end)
- end
- end)
- t.Unequipped:Connect(function()
- if tConn then task.cancel(tConn) tConn = nil end
- dt_()
- end)
- return t
- end
- -- Default Target-Selection Tool
- local dt = Instance.new("Tool")
- dt.Name = "Weld Test"
- dt.RequiresHandle = false
- dt.CanBeDropped = false
- dt.Parent = p:WaitForChild("Backpack")
- dt.Activated:Connect(function()
- local ht = m.Target
- if not ht then return end
- local ch = ht:FindFirstAncestorOfClass("Model")
- local pl_ = ps:GetPlayerFromCharacter(ch)
- if pl_ and pl_ ~= p and ch:FindFirstChild("HumanoidRootPart") then
- tg = ch
- tl_.Text = "Target: " .. pl_.DisplayName
- av_(tg)
- if at then
- dt_()
- at_()
- end
- end
- end)
- local toolCount = 0
- mkTBtn.MouseButton1Click:Connect(function()
- toolCount = toolCount + 1
- local copyList = {}
- for _, k in ipairs(kf) do
- table.insert(copyList, { pos = k.pos, rot = k.rot, mode = k.mode, duration = k.duration, act = k.act })
- end
- makeCustomTool("CustomTool_" .. toolCount, copyList, pm)
- end)
- -- Character Respawn
- p.CharacterAdded:Connect(function(ch)
- dt_()
- cv_()
- dg_()
- tg = nil
- tl_.Text = "Target: [None]"
- dt.Parent = p:WaitForChild("Backpack")
- if se then bg_(ch) end
- end)
Add Comment
Please, Sign In to add comment