Ameno__GodOH

fix this

May 17th, 2025
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.15 KB | None | 0 0
  1. repeat wait() until game:IsLoaded() and game:GetService("Players")
  2.  
  3. local Players = game:GetService("Players")
  4. local LocalPlayer = Players.LocalPlayer
  5. local Character = LocalPlayer.Character
  6. local HumanoidRootPart = Character and Character:FindFirstChild("HumanoidRootPart")
  7. local Humanoid = Character and Character:FindFirstChild("Humanoid")
  8.  
  9. local Time = true
  10. local Attacking = game:GetService("Workspace"):FindFirstChild("Dead")
  11. local Obby = game:GetService("Workspace"):FindFirstChild("ObbyW")
  12. local Phase = game:GetService("Workspace"):FindFirstChild("BossPhase")
  13. local Health = game:GetService("Workspace"):FindFirstChild("TrollHealth")
  14.  
  15. if game:GetService("Workspace"):FindFirstChild("Effects") then
  16. game:GetService("Workspace"):FindFirstChild("Effects"):Destroy()
  17. end
  18. if game:GetService("Workspace").Map:FindFirstChild("ThunderParts") then
  19. game:GetService("Workspace").Map:FindFirstChild("ThunderParts"):Destroy()
  20. end
  21.  
  22. if LocalPlayer.Backpack:FindFirstChild("KnightsSword") then
  23. LocalPlayer.Backpack["KnightsSword"].Parent = Character
  24. if Character:FindFirstChild("KnightsSword") then
  25. local Sword = Character:FindFirstChild("KnightsSword")
  26. local Box = Instance.new("SelectionBox")
  27. Box.Name = "SelectionBoxCreated"
  28. Box.Parent = Sword.Handle
  29. Box.Adornee = Sword.Handle
  30. Sword.Handle.Massless = true
  31. Sword.GripPos = Vector3.new(0, 0, 0)
  32. Character:FindFirstChildOfClass("Humanoid"):UnequipTools()
  33. LocalPlayer.Backpack["KnightsSword"].Parent = Character
  34. Character.KnightsSword.Handle.Size = Vector3.new(20, 20, 500)
  35. end
  36. elseif Character:FindFirstChild("KnightsSword") then
  37. local Sword = Character:FindFirstChild("KnightsSword")
  38. local Box = Instance.new("SelectionBox")
  39. Box.Name = "SelectionBoxCreated"
  40. Box.Parent = Sword.Handle
  41. Box.Adornee = Sword.Handle
  42. Sword.Handle.Massless = true
  43. Sword.GripPos = Vector3.new(0, 0, 0)
  44. Character:FindFirstChildOfClass("Humanoid"):UnequipTools()
  45. LocalPlayer.Backpack["KnightsSword"].Parent = Character
  46. Character.KnightsSword.Handle.Size = Vector3.new(20, 20, 500)
  47. end
  48.  
  49. task.spawn(function()
  50. while Attacking and Attacking.Value == false do
  51. task.wait()
  52. if Obby and Obby.Value == true then
  53. HumanoidRootPart.CFrame = CFrame.new(20.4561386, 113.245972, 196.61351, 0.0634383112, 5.81675401e-08, -0.99798578, 8.29346689e-08, 1, 6.35567972e-08, 0.99798578, -8.67995524e-08, 0.0634383112)
  54. else
  55. if Phase and Phase.Value == "None" then
  56. HumanoidRootPart.CFrame = CFrame.new(-5.46999931, -4.45343876, 248.209991, 1, 1.68923409e-09, 7.63995055e-14, -1.68923409e-09, 1, 6.64721389e-09, -7.63882772e-14, -6.64721389e-09, 1)
  57. else
  58. HumanoidRootPart.CFrame = CFrame.new(-19.8957844, -4.77343941, 142.49881, -0.999476075, -3.27794467e-08, -0.0323671587, -3.71140274e-08, 1, 1.33318295e-07, 0.0323671587, 1.34449706e-07, -0.999476075)
  59. end
  60. end
  61. end
  62. end)
  63.  
  64. task.spawn(function()
  65. while Attacking and Attacking.Value == false do
  66. task.wait()
  67. if Obby and Obby.Value == false then
  68. if Character:FindFirstChild("KnightsSword") then
  69. Character.KnightsSword:Activate()
  70. end
  71. end
  72. end
  73. end)
  74.  
  75. local function Percent(First, Second)
  76. return (First / Second)
  77. end
  78.  
  79. if Health then
  80. Health:GetPropertyChangedSignal("Value"):Connect(function()
  81. local percent = Percent(Health.Value, Health.MaxHealth.Value)
  82. if percent <= 0.003 and percent >= 0 then
  83. if Time then
  84. Time = false
  85. Character:FindFirstChildOfClass("Humanoid"):UnequipTools()
  86. wait(WaitTime)
  87. if LocalPlayer.Backpack:FindFirstChild("KnightsSword") then
  88. LocalPlayer.Backpack["KnightsSword"].Parent = Character
  89. end
  90. end
  91. end
  92. end)
  93. end
Advertisement
Add Comment
Please, Sign In to add comment