Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if player.Stage.Value == "Combat3" then
- local function TransformModel(objects, center, new, recurse)
- for _,object in pairs(objects) do
- if object:IsA("BasePart") then
- object.CFrame = new:toWorldSpace(center:toObjectSpace(object.CFrame))
- end
- if recurse then
- TransformModel(object:GetChildren(), center, new, true)
- end
- end
- end
- local bot = game.Lighting.Combat3SwordBot:clone()
- bot.Parent = camera
- local sword = game.Lighting.CombatWeps.Combat3.LinkedSword:clone()
- sword.Parent = player.Backpack
- bot.Weapon.Hitter.Touched:connect(function(hit)
- if hit:IsDescendantOf(char) then
- char.Humanoid:TakeDamage(30)
- end
- end)
- Spawn(function()
- while wait() do
- Spawn(function()
- wait(1)
- TransformModel(
- bot:GetChildren(),
- bot.Body.Main.CFrame,
- CFrame.new(
- bot.Body.Main.Position,
- Vector3.new(
- char.Torso.Position.x,
- bot.Body.Main.Position.y,
- char.Torso.Position.z
- )
- --char.Torso.Position + ( --* Vector3.new(1, 0, 1)
- ) * CFrame.Angles(0, math.rad(180), 0),
- true
- )
- --[[TransformModel(
- bot.Weapon:GetChildren(),
- bot.Weapon.Main.CFrame,
- CFrame.new(
- bot.Weapon.Main.Position,
- Vector3.new(
- bot.Body.Main.Position.x,
- char.Torso.Position.y,
- bot.Body.Main.Position.z
- )
- ) * CFrame.Angles(0, math.rad(-90), 0),
- true
- )]]
- end)
- end
- end)
- Spawn(function()
- repeat wait() until bot.Health.Value <= 0
- bot:Destroy()
- player.StagesCompleted[player.Stage.Value].Value = true
- player.Stage.Value = ""
- --LoadCharacter(player)
- DeleteBodyParts()
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement