SInanazorar

Untitled

Sep 6th, 2025
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. -- _Install_TSBCOMBAT (run once in Studio)
  2. local RunService = game:GetService("RunService")
  3. if not RunService:IsStudio() then
  4. warn("Installer only runs in Studio. Delete this script in live games.")
  5. return
  6. end
  7.  
  8. local function svc(name) return game:GetService(name) end
  9.  
  10. -- Find the root model
  11. local root = workspace:FindFirstChild("TSBCOMBAT")
  12. or svc("ServerStorage"):FindFirstChild("TSBCOMBAT")
  13. or svc("ReplicatedStorage"):FindFirstChild("TSBCOMBAT")
  14.  
  15. if not root then
  16. warn("Could not find a 'TSBCOMBAT' model. Insert it into the game first.")
  17. return
  18. end
  19.  
  20. local function moveChildren(fromInst, toInst)
  21. if not fromInst or not toInst then return end
  22. for _, child in ipairs(fromInst:GetChildren()) do
  23. child.Parent = toInst
  24. end
  25. end
  26.  
  27. -- Map: [folder inside TSBCOMBAT] -> [real service container]
  28. local targets = {
  29. { "ReplicatedStorage", svc("ReplicatedStorage") },
  30. { "ServerScriptService", svc("ServerScriptService") },
  31. { "ServerStorage", svc("ServerStorage") },
  32. { "StarterPack", svc("StarterPack") },
  33. { "StarterPlayerScripts", svc("StarterPlayer"):WaitForChild("StarterPlayerScripts") },
  34. { "StarterCharacterScripts", svc("StarterPlayer"):WaitForChild("StarterCharacterScripts") },
  35. { "StarterPlayer", svc("StarterPlayer") }, -- e.g. StarterHumanoid
  36. }
  37.  
  38. for _, pair in ipairs(targets) do
  39. local src, dest = root:FindFirstChild(pair[1]), pair[2]
  40. if src then
  41. moveChildren(src, dest)
  42. print(("Moved %s children → %s"):format(pair[1], dest:GetFullName()))
  43. end
  44. end
  45.  
  46. -- Common loose modules at the root → ReplicatedStorage (shared)
  47. local sharedMods = { "HitService", "stunHandlerV2", "TomatoHitbox" }
  48. for _, name in ipairs(sharedMods) do
  49. local m = root:FindFirstChild(name)
  50. if m and m:IsA("ModuleScript") then
  51. m.Parent = svc("ReplicatedStorage")
  52. print("Moved module → ReplicatedStorage/" .. name)
  53. end
  54. end
  55.  
  56. -- If there's a stray R6Ragdoll folder at root, keep it with server scripts
  57. local r6 = root:FindFirstChild("R6Ragdoll")
  58. if r6 then
  59. r6.Parent = svc("ServerScriptService")
  60. print("Moved R6Ragdoll → ServerScriptService")
  61. end
  62.  
  63. print("✅ TSBCOMBAT: install step complete. Re-upload animations next!")
  64.  
Advertisement
Add Comment
Please, Sign In to add comment