Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- _Install_TSBCOMBAT (run once in Studio)
- local RunService = game:GetService("RunService")
- if not RunService:IsStudio() then
- warn("Installer only runs in Studio. Delete this script in live games.")
- return
- end
- local function svc(name) return game:GetService(name) end
- -- Find the root model
- local root = workspace:FindFirstChild("TSBCOMBAT")
- or svc("ServerStorage"):FindFirstChild("TSBCOMBAT")
- or svc("ReplicatedStorage"):FindFirstChild("TSBCOMBAT")
- if not root then
- warn("Could not find a 'TSBCOMBAT' model. Insert it into the game first.")
- return
- end
- local function moveChildren(fromInst, toInst)
- if not fromInst or not toInst then return end
- for _, child in ipairs(fromInst:GetChildren()) do
- child.Parent = toInst
- end
- end
- -- Map: [folder inside TSBCOMBAT] -> [real service container]
- local targets = {
- { "ReplicatedStorage", svc("ReplicatedStorage") },
- { "ServerScriptService", svc("ServerScriptService") },
- { "ServerStorage", svc("ServerStorage") },
- { "StarterPack", svc("StarterPack") },
- { "StarterPlayerScripts", svc("StarterPlayer"):WaitForChild("StarterPlayerScripts") },
- { "StarterCharacterScripts", svc("StarterPlayer"):WaitForChild("StarterCharacterScripts") },
- { "StarterPlayer", svc("StarterPlayer") }, -- e.g. StarterHumanoid
- }
- for _, pair in ipairs(targets) do
- local src, dest = root:FindFirstChild(pair[1]), pair[2]
- if src then
- moveChildren(src, dest)
- print(("Moved %s children → %s"):format(pair[1], dest:GetFullName()))
- end
- end
- -- Common loose modules at the root → ReplicatedStorage (shared)
- local sharedMods = { "HitService", "stunHandlerV2", "TomatoHitbox" }
- for _, name in ipairs(sharedMods) do
- local m = root:FindFirstChild(name)
- if m and m:IsA("ModuleScript") then
- m.Parent = svc("ReplicatedStorage")
- print("Moved module → ReplicatedStorage/" .. name)
- end
- end
- -- If there's a stray R6Ragdoll folder at root, keep it with server scripts
- local r6 = root:FindFirstChild("R6Ragdoll")
- if r6 then
- r6.Parent = svc("ServerScriptService")
- print("Moved R6Ragdoll → ServerScriptService")
- end
- print("✅ TSBCOMBAT: install step complete. Re-upload animations next!")
Advertisement
Add Comment
Please, Sign In to add comment