Advertisement
CaliberMag

Untitled

Mar 11th, 2022 (edited)
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 13.94 KB | None | 0 0
  1. --//Services
  2. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  3. local Players = game:GetService("Players")
  4. local RunService = game:GetService("RunService")
  5. local UserInputService = game:GetService("UserInputService")
  6. local CoreGui = game:GetService("CoreGui")
  7. local HttpService = game:GetService("HttpService")
  8.  
  9. for _, Screen_GUI in pairs(CoreGui:GetChildren()) do
  10.     if Screen_GUI:GetAttribute("Marked") then
  11.         Screen_GUI:Destroy()
  12.     end
  13. end
  14.  
  15. --//Gui Loading
  16. local ScreenGui = Instance.new("ScreenGui")
  17. local Main_Frame = Instance.new("Frame")
  18. local Chart_Frame = Instance.new("Frame")
  19. local Boss_Info = Instance.new("Frame")
  20. local Boss_Name = Instance.new("TextLabel")
  21. local Damage_Chart = Instance.new("ScrollingFrame")
  22. local Players_Container = Instance.new("Folder")
  23. local UIListLayout = Instance.new("UIListLayout")
  24. local Frame = Instance.new("Frame")
  25. local Player_Name = Instance.new("TextLabel")
  26. local Damage = Instance.new("TextLabel")
  27. local ImageLabel = Instance.new("ImageLabel")
  28. local UIGradient_1 = Instance.new("UIGradient")
  29. local UIGradient_2 = Instance.new("UIGradient")
  30. local UIStroke = Instance.new("UIStroke")
  31. local UICorner = Instance.new("UICorner")
  32. local Boss_Notification = Instance.new("Sound")
  33.  
  34. ScreenGui:SetAttribute("Marked", true)
  35. syn.protect_gui(ScreenGui)
  36.  
  37. ScreenGui.ResetOnSpawn = false
  38. ScreenGui.Name = HttpService:GenerateGUID()
  39. ScreenGui.Parent = CoreGui
  40. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  41.  
  42. Main_Frame.Name = "Main_Frame"
  43. Main_Frame.Parent = ScreenGui
  44. Main_Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  45. Main_Frame.BackgroundTransparency = 1.000
  46. Main_Frame.BorderSizePixel = 0
  47. Main_Frame.Size = UDim2.new(1, 0, 1, 0)
  48. Main_Frame.Position = UDim2.new(-0.5, 0, 0, 0)
  49. Main_Frame.SizeConstraint = Enum.SizeConstraint.RelativeYY
  50.  
  51. Chart_Frame.Name = "Chart_Frame"
  52. Chart_Frame.Parent = Main_Frame
  53. Chart_Frame.AnchorPoint = Vector2.new(0, 0.5)
  54. Chart_Frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  55. Chart_Frame.BackgroundTransparency = 0.300
  56. Chart_Frame.ClipsDescendants = true
  57. Chart_Frame.Position = UDim2.new(0.00999999978, 0, 0.5, 0)
  58. Chart_Frame.Size = UDim2.new(0.349999994, 0, 0.349999994, 0)
  59.  
  60. Boss_Info.Name = "Boss_Info"
  61. Boss_Info.Parent = Chart_Frame
  62. Boss_Info.AnchorPoint = Vector2.new(0.5, 0)
  63. Boss_Info.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  64. Boss_Info.BackgroundTransparency = 0.900
  65. Boss_Info.BorderSizePixel = 0
  66. Boss_Info.Position = UDim2.new(0.5, 0, 0.00999999978, 0)
  67. Boss_Info.Size = UDim2.new(0.980000019, 0, 0.0900000036, 0)
  68.  
  69. Boss_Name.Name = "Boss_Name"
  70. Boss_Name.Parent = Boss_Info
  71. Boss_Name.AnchorPoint = Vector2.new(0, 0.5)
  72. Boss_Name.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  73. Boss_Name.BackgroundTransparency = 1.000
  74. Boss_Name.Position = UDim2.new(0, 0, 0.5, 0)
  75. Boss_Name.Size = UDim2.new(1, 0, 0.800000012, 0)
  76. Boss_Name.Font = Enum.Font.SourceSans
  77. Boss_Name.RichText = true
  78. Boss_Name.Text = "None ― [ N/A hp ]"
  79. Boss_Name.TextColor3 = Color3.fromRGB(255, 255, 255)
  80. Boss_Name.TextScaled = true
  81. Boss_Name.TextSize = 14.000
  82. Boss_Name.TextStrokeTransparency = 0.500
  83. Boss_Name.TextWrapped = true
  84.  
  85. Damage_Chart.Name = "Damage_Chart"
  86. Damage_Chart.Parent = Chart_Frame
  87. Damage_Chart.Active = true
  88. Damage_Chart.AnchorPoint = Vector2.new(0.5, 1)
  89. Damage_Chart.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  90. Damage_Chart.BackgroundTransparency = 1.000
  91. Damage_Chart.BorderSizePixel = 0
  92. Damage_Chart.Position = UDim2.new(0.5, 0, 0.99000001, 0)
  93. Damage_Chart.Size = UDim2.new(0.980000019, 0, 0.850000024, 0)
  94. Damage_Chart.CanvasSize = UDim2.new(0, 0, 1.22500002, 0)
  95. Damage_Chart.ScrollBarThickness = 0
  96. Damage_Chart.VerticalScrollBarPosition = Enum.VerticalScrollBarPosition.Left
  97.  
  98. Players_Container.Name = "Players_Container"
  99. Players_Container.Parent = Damage_Chart
  100.  
  101. UIListLayout.Parent = Players_Container
  102. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  103. UIListLayout.Padding = UDim.new(0.00999999978, 0)
  104.  
  105. Frame.Parent = Damage_Chart
  106. Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  107. Frame.BackgroundTransparency = 0.900
  108. Frame.BorderColor3 = Color3.fromRGB(255, 255, 255)
  109. Frame.BorderSizePixel = 0
  110. Frame.ClipsDescendants = true
  111. Frame.Size = UDim2.new(1, 0, 0.0500000007, 0)
  112. Frame.Visible = false
  113.  
  114. Player_Name.Name = "Player_Name"
  115. Player_Name.Parent = Frame
  116. Player_Name.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  117. Player_Name.BackgroundTransparency = 1.000
  118. Player_Name.Size = UDim2.new(0.5, 0, 1, 0)
  119. Player_Name.Font = Enum.Font.SourceSans
  120. Player_Name.TextColor3 = Color3.fromRGB(255, 255, 255)
  121. Player_Name.TextScaled = true
  122. Player_Name.TextSize = 14.000
  123. Player_Name.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
  124. Player_Name.TextStrokeTransparency = 0.950
  125. Player_Name.TextWrapped = true
  126. Player_Name.TextXAlignment = Enum.TextXAlignment.Left
  127.  
  128. Damage.Name = "Damage"
  129. Damage.Parent = Frame
  130. Damage.AnchorPoint = Vector2.new(1, 0)
  131. Damage.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  132. Damage.BackgroundTransparency = 1.000
  133. Damage.Position = UDim2.new(1, 0, 0, 0)
  134. Damage.Size = UDim2.new(0.5, 0, 1, 0)
  135. Damage.Font = Enum.Font.SourceSans
  136. Damage.TextColor3 = Color3.fromRGB(255, 255, 255)
  137. Damage.TextScaled = true
  138. Damage.TextSize = 14.000
  139. Damage.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
  140. Damage.TextStrokeTransparency = 0.950
  141. Damage.TextWrapped = true
  142. Damage.TextXAlignment = Enum.TextXAlignment.Right
  143.  
  144. ImageLabel.Parent = Chart_Frame
  145. ImageLabel.AnchorPoint = Vector2.new(0.5, 0)
  146. ImageLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  147. ImageLabel.BorderSizePixel = 0
  148. ImageLabel.Position = UDim2.new(0.5, 0, 0.100000001, 0)
  149. ImageLabel.Size = UDim2.new(1, 0, 0.00499999989, 0)
  150.  
  151. UICorner.Parent = Chart_Frame
  152.  
  153. UIStroke.ApplyStrokeMode = "Border"
  154. UIStroke.Color = Color3.new(1, 1, 1)
  155. UIStroke.Thickness = 2
  156. UIStroke.Parent = Chart_Frame
  157.  
  158. Boss_Notification.SoundId = "rbxassetid://4590662766"
  159. Boss_Notification.Volume = 1
  160. Boss_Notification.Parent = ScreenGui
  161.  
  162. local Keypoints = {} do
  163.     for Index, Colour in ipairs(Settings.Border_Colours) do
  164.         if Settings.Border_Colours[Index + 1] then
  165.             Keypoints[#Keypoints + 1] = ColorSequenceKeypoint.new((Index - 1) / #Settings.Border_Colours, Colour)
  166.         else
  167.             Keypoints[#Keypoints + 1] = ColorSequenceKeypoint.new(Index / #Settings.Border_Colours, Colour)
  168.         end
  169.     end
  170. end
  171. local ColorSequence = ColorSequence.new(Keypoints)
  172.  
  173. UIGradient_1.Color = ColorSequence
  174. UIGradient_2.Color = ColorSequence
  175.  
  176. UIGradient_1.Parent = UIStroke
  177. UIGradient_2.Parent = ImageLabel
  178.  
  179. Main_Frame:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Sine, 0.5, true)
  180.  
  181. --//Instances
  182. local Fruit_Types = {
  183.     ["Suke-Suke"] = Color3.fromRGB(255, 255, 255),
  184.     ["Spin-Spin"] = Color3.fromRGB(255, 223, 208),
  185.     ["Kilo-Kilo"] = Color3.fromRGB(70, 62, 62),
  186.     ["Bari-Bari"] = Color3.fromRGB(0, 170, 255),
  187.     ["Bomb-Bomb"] = Color3.fromRGB(255, 85, 0),
  188.     ["Mero-Mero"] = Color3.fromRGB(255, 0, 255),
  189.     ["Gomu-Gomu"] = Color3.fromRGB(216, 192, 247),
  190.     ["Magu-Magu"] = Color3.fromRGB(255, 0, 0),
  191.     ["Pika-Pika"] = Color3.fromRGB(250, 250, 43),
  192.     ["Mera-Mera"] = Color3.fromRGB(255, 200, 0),
  193.     ["Hie-Hie"] = Color3.fromRGB(164, 214, 255),
  194.     ["Goro-Goro"] = Color3.fromRGB(104, 232, 255),
  195.     ["Zushi-Zushi"] = Color3.fromRGB(170, 85, 255),
  196.     ["Tori-Tori"] = Color3.fromRGB(85, 255, 255),
  197.     ["Gura-Gura"] = Color3.fromRGB(0, 170, 255),
  198.     ["Suna-Suna"] = Color3.fromRGB(255, 230, 178),
  199.     ["Ito-Ito"] = Color3.fromRGB(200, 200, 200),
  200.     ["Horo-Horo"] = Color3.fromRGB(248, 177, 248)
  201. }
  202.  
  203. local Current = nil
  204. local Last_Time = 0
  205. local Toggle = false
  206. local Connections = {Damage_Chart = {}}
  207.  
  208.  
  209. --//Functions
  210. function Find_Nearest_Boss()
  211.     local Found, Dist
  212.  
  213.     for _, NPC in pairs(workspace.NPCs:GetChildren()) do
  214.         if table.find(Settings.Whitelist, NPC.Name) then
  215.             local Magnitude = Players.LocalPlayer:DistanceFromCharacter(NPC.PrimaryPart.Position)
  216.  
  217.             if Magnitude < (Dist or 1e7) then
  218.                 Found, Dist = NPC:FindFirstChildWhichIsA("Humanoid"), Magnitude
  219.             end
  220.         end
  221.     end
  222.     return Found
  223. end
  224.  
  225. function Find_Player_Ability(Player_Name)
  226.     local Player_Data = ReplicatedStorage:FindFirstChild("Stats" ..Player_Name)
  227.    
  228.     if Player_Data and Player_Data.Stats:FindFirstChild("DF") then
  229.         return Player_Data.Stats.DF.Value
  230.     end
  231. end
  232.  
  233. function Find_Player_Stat(Player_Name, Stat)
  234.     local Player_Data = ReplicatedStorage:FindFirstChild("Stats" ..Player_Name)
  235.    
  236.     if Player_Data and Player_Data.Stats:FindFirstChild(Stat) then
  237.         return Player_Data.Stats[Stat].Value
  238.     end
  239. end
  240.  
  241. function Clear_Gui()
  242.     for _, UI_Obj in pairs(Players_Container:GetChildren()) do
  243.         if UI_Obj:IsA("Frame") then
  244.             UI_Obj:Destroy()
  245.             task.wait()
  246.         end
  247.     end
  248. end
  249.  
  250. function Format_Number(Number)
  251.     return tostring(Number):reverse():gsub("%d%d%d", "%1,"):reverse():gsub("^,", "")   
  252. end
  253.  
  254. function Create_Chams(NPC)
  255.     if Settings.Chams ~= true then
  256.         return
  257.     end
  258.     for _, Obj in pairs(NPC:GetChildren()) do
  259.         if Obj:IsA("BasePart") or Obj:IsA("UnionOperation") or Obj:IsA("MeshPart") then
  260.             if (Obj.Name ~= "HumanoidRootPart" and Obj.Name ~= "camra")  then
  261.                 if Obj:FindFirstChildWhichIsA("BoxHandleAdornment") then
  262.                     return
  263.                 end
  264.                    
  265.                 local Box = Instance.new("BoxHandleAdornment")
  266.                 Box.Adornee = Obj; Box.AlwaysOnTop = true; Box.Name = ""
  267.                 Box.Color3 = Color3.new(1, 1, 1); Box.Size = Obj.Size
  268.                 Box.ZIndex = 0; Box.Parent = Obj
  269.             end
  270.         end
  271.     end
  272. end
  273.  
  274. function Remove_Chams(NPC)
  275.     for _, Obj in pairs(NPC:GetChildren()) do
  276.         local Box = Obj:FindFirstChildWhichIsA("BoxHandleAdornment")
  277.  
  278.         if Box ~= nil and Box.Name == "" then
  279.             Box:Destroy()
  280.         end
  281.     end
  282. end
  283.  
  284. function Create_Tab(Player, Humanoid)
  285.     if Players_Container:FindFirstChild(Player.Name) then
  286.         return
  287.     end
  288.     local New_Tab = Frame:Clone()
  289.     New_Tab.Name = Player.Name
  290.  
  291.     if Players:FindFirstChild(Player.Name) == Players.LocalPlayer then
  292.         New_Tab.Player_Name.Text = string.format("[ %s ] (You)", Player.Name)
  293.     else
  294.         New_Tab.Player_Name.Text = string.format("[ %s ]", Player.Name)
  295.     end
  296.  
  297.     local Tab_Color = Fruit_Types[Find_Player_Stat(Player.Name, "DF")] or Color3.new(1, 1, 1)
  298.     New_Tab.BackgroundColor3 = Tab_Color
  299.     New_Tab.Player_Name.TextColor3 = Tab_Color
  300.     New_Tab.Damage.TextColor3 = Tab_Color
  301.     New_Tab.Damage.Text = string.format("[ %s ] [ %.1f%% ] ", Format_Number(math.floor(Player.Value)), (math.floor((Player.Value / Humanoid.MaxHealth * 100) * 100) / 100))
  302.     New_Tab.LayoutOrder = -(Player.Value)
  303.     New_Tab.Visible = true
  304.  
  305.     New_Tab.Parent = Players_Container
  306.  
  307.     if math.floor(Player.Value) / Humanoid.MaxHealth * 100 < 5 then
  308.         New_Tab.Damage.TextColor3 = Color3.new(1, 0, 0)
  309.     else
  310.         New_Tab.Damage.TextColor3 = Color3.new(0, 1, 0)
  311.     end
  312.  
  313.     Connections.Damage_Chart[#Connections.Damage_Chart + 1] = Player.Changed:Connect(function(Value)
  314.         New_Tab.Damage.Text = string.format("[ %s ] [ %.1f%% ] ", Format_Number(math.floor(Value)), (math.floor((Value / Humanoid.MaxHealth * 100) * 100) / 100))
  315.         New_Tab.LayoutOrder = -(Value)
  316.  
  317.         if math.floor(Value) / Humanoid.MaxHealth * 100 < 5 then
  318.             New_Tab.Damage.TextColor3 = Color3.new(1, 0, 0)
  319.         else
  320.             New_Tab.Damage.TextColor3 = Color3.new(0, 1, 0)
  321.         end
  322.     end)
  323. end
  324.  
  325. function Render_Window(Humanoid, Folder)
  326.     if Humanoid and Folder then
  327.         local NPC = Humanoid.Parent
  328.         Current = NPC
  329.  
  330.         for Index, Conn in pairs(Connections.Damage_Chart) do
  331.             Conn:Disconnect()
  332.             Connections.Damage_Chart[Index] = nil
  333.         end
  334.  
  335.         local Progress = math.clamp(math.floor((255 * (Humanoid.Health / Humanoid.MaxHealth))), 0, 255)
  336.         local Hex = Color3.fromRGB(255, Progress, Progress):ToHex()
  337.  
  338.         Boss_Name.Text = string.format("%s ― <font color='%s'>[ %s hp ] [ %.1f%% ]</font>", NPC.Name, "#"..Hex, Format_Number(math.floor(Humanoid.Health)), (math.floor((Humanoid.Health / Humanoid.MaxHealth * 100) * 100) / 100))
  339.        
  340.         Connections.Damage_Chart[#Connections.Damage_Chart + 1] = Humanoid.HealthChanged:Connect(function(Health)
  341.             Progress = math.clamp(math.floor((255 * (Health / Humanoid.MaxHealth))), 0, 255)
  342.             Hex = Color3.fromRGB(255, Progress, Progress):ToHex()
  343.  
  344.             Boss_Name.Text = string.format("%s ― <font color='rgb(255, %i, %i)'>[ %s hp ] [ %.1f%% ]</font>", NPC.Name, Progress, Progress, Format_Number(math.floor(Health)), (math.floor((Health / Humanoid.MaxHealth * 100) * 100) / 100))
  345.         end)
  346.         Clear_Gui()
  347.  
  348.         for _, Player in pairs(Folder:GetChildren()) do
  349.             if Players:FindFirstChild(Player.Name) then
  350.                 Create_Tab(Player, Humanoid)
  351.             end
  352.         end
  353.         Connections.Damage_Chart[#Connections.Damage_Chart + 1] = Folder.ChildAdded:Connect(function(Player)
  354.             repeat task.wait() until Player.Name
  355.  
  356.             if Players:FindFirstChild(Player.Name) then
  357.                 Create_Tab(Player, Humanoid)
  358.             end
  359.         end)
  360.     end
  361. end
  362.  
  363. Connections[#Connections + 1] = RunService.Heartbeat:Connect(function()
  364.     if UIGradient_1.Rotation >= 360 then
  365.         UIGradient_1.Rotation = 0
  366.     end
  367.     UIGradient_1.Rotation += 5
  368.  
  369.     if os.clock() - Last_Time < (Settings.Update_Rate / 1000) then
  370.         return
  371.     end
  372.     local Nearest_Boss = Find_Nearest_Boss()
  373.    
  374.     if Nearest_Boss ~= nil and Nearest_Boss.Parent ~= Current then
  375.         if Current then
  376.             Remove_Chams(Nearest_Boss.Parent)
  377.         end
  378.         Render_Window(
  379.             Nearest_Boss,
  380.             Nearest_Boss.Parent:WaitForChild("PlayerDMG", 5)
  381.         )
  382.         Boss_Notification:Play()
  383.         Create_Chams(Nearest_Boss.Parent)
  384.     end
  385.     Last_Time = os.clock()
  386. end)
  387.  
  388. ScreenGui.AncestryChanged:Connect(function(_, New_Parent)
  389.     if New_Parent ~= nil then
  390.         return
  391.     end
  392.  
  393.     for Index, Conn in pairs(Connections) do
  394.         if typeof(Conn) == "RBXScriptConnection" then
  395.             Conn:Disconnect()
  396.         end
  397.     end
  398.     for Index, Conn in pairs(Connections.Damage_Chart) do
  399.         Conn:Disconnect()
  400.     end
  401.     table.clear(Connections)
  402. end)
  403.  
  404. UserInputService.InputBegan:Connect(function(Input_Object)
  405.     if Input_Object.KeyCode == Enum.KeyCode.F2 and ScreenGui.Parent == game.CoreGui then
  406.         if Toggle then
  407.             Main_Frame:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Sine, 0.5, true)
  408.             Toggle = false
  409.         elseif not Toggle then
  410.             Main_Frame:TweenPosition(UDim2.new(-0.5, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Sine, 0.5, true)
  411.             Toggle = true
  412.         end
  413.     end
  414. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement