Facebook
From Round Wolf, 1 Year ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 716
  1. if not game:IsLoaded() then game.Loaded:Wait() end
  2.  
  3. local lPlayer = game.Players.LocalPlayer
  4. -- thanks 3ds and kiko metatables r hard
  5. if not getgenv().MTAPIMutex then loadstring(game:HttpGet("https://raw.githubusercontent.com/KikoTheDon/MT-Api-v2/main/__source/mt-api%20v2.lua", true))() end
  6.  
  7. if game.PlaceId == 111311599 then -- Critical Strike
  8.     local anticheat = game:GetService("ReplicatedFirst")["Serverbased AntiCheat"] -- then why put it in a localscript?
  9.     -- I literally copied the rest of this from the "Serverbased Anticheat"
  10.     local sValue = game:GetService("Players").LocalPlayer:WaitForChild("SValue")
  11.     local function constructAnticheatString()
  12.         return "CS-" .. math.random(11111, 99999) .. "-" .. math.random(1111, 9999) .. "-" .. math.random(111111, 999999) .. math.random(1111111, 9999999) .. (sValue.Value * 6) ^ 2 + 18;
  13.     end
  14.     -- to be fair the game hasn't been updated in over a year
  15.     task.spawn(function()
  16.             while true do task.wait(2)
  17.                 game:GetService("ReplicatedStorage").ACDetect:FireServer(sValue.Value, constructAnticheatString());
  18.             end
  19.     end)
  20.     anticheat.Disabled = true
  21. end
  22.  
  23. local playerNames = {}
  24. --local npcNames = {} -- I was planning on adding npc support
  25. local teamNames = {}
  26.  
  27. -- thanks inori and wally
  28. local Library = loadstring(game:HttpGet('https://raw.githubusercontent.com/wally-rblx/LinoriaLib/main/Library.lua'))()
  29. local SaveManager = loadstring(game:HttpGet('https://raw.githubusercontent.com/wally-rblx/LinoriaLib/main/addons/SaveManager.lua'))()
  30. SaveManager:SetLibrary(Library)
  31. SaveManager:SetFolder("HitboxExtender")
  32. Library:Notify("hai :3")
  33. local mainWindow = Library:CreateWindow("Personal object of abuse")
  34.  
  35. local mainTab = mainWindow:AddTab("Main")
  36. local mainGroupbox = mainTab:AddLeftGroupbox("Hitbox Extender")
  37. local ignoresGroupbox = mainTab:AddRightGroupbox("Ignores")
  38. local miscGroupbox = mainTab:AddLeftGroupbox("Misc")
  39.  
  40. local extenderToggled = mainGroupbox:AddToggle("extenderToggled", {Text = "Toggle"})
  41. local extenderSize = mainGroupbox:AddSlider("extenderSize", {Text = "Size", Min = 2, Max = 100, Default = 10, Rounding = 0})
  42. local extenderTransparency = mainGroupbox:AddSlider("extenderTransparency", {Text = "Transparency", Min = 0, Max = 1, Default = 0.5, Rounding = 2})
  43. -- for some reason the save manager doesn't save inputs, idk how to fix it
  44. local customPartNameInput = mainGroupbox:AddInput("customPartList", {Text = "Custom Part Name", Default = "HeadHB"})
  45. local extenderPartList = mainGroupbox:AddDropdown("extenderPartList", {Text = "Body Parts", AllowNull = true, Multi = true, Values = {"Custom Part", "Head", "HumanoidRootPart", "Torso", "Left Arm", "Right Arm", "Left Leg", "Right Leg"}, Default = "Head"})
  46. local extenderUpdateRate = miscGroupbox:AddSlider("extenderUpdateRate", {Text = "Update Rate", Min = 0, Max = 1000, Default = 0, Rounding = 0, Suffix = "ms"})
  47.  
  48. local extenderSitCheck = ignoresGroupbox:AddToggle("extenderSitCheck", {Text = "Ignore Sitting Players"})
  49. local ignoreSelectedPlayersToggled = ignoresGroupbox:AddToggle("ignoreSelectedPlayersToggled", {Text = "Ignore Selected Players"})
  50. local ignorePlayerList = ignoresGroupbox:AddDropdown("ignorePlayerList", {Text = "Players", AllowNull = true, Multi = true, Values = playerNames})
  51. --local ignoreSelectedNpcsToggled = ignoresGroupbox:AddToggle("ignoreSelectedNpcsToggled", {Text = "Ignore Selected Npcs"})
  52. --local ignoreNpcList = ignoresGroupbox:AddDropdown("ignoreNpcList", {Text = "Npcs", AllowNull = true, Multi = true, Values = npcNames})
  53. local ignoreSelfTeamToggled = ignoresGroupbox:AddToggle("ignoreSelfTeamToggled", {Text = "Ignore Own Team"})
  54. local ignoreSelectedTeamsToggled = ignoresGroupbox:AddToggle("ignoreSelectedTeamsToggled", {Text = "Ignore Selected Teams"})
  55. local ignoreTeamList = ignoresGroupbox:AddDropdown("ignoreTeamList", {Text = "Teams", AllowNull = true, Multi = true, Values = teamNames})
  56.  
  57. -- thanks roblox dev forum
  58. local function CheckTableEquality(t1,t2)
  59.     for i,v in next, t1 do if t2[i]~=v then return false end end
  60.     for i,v in next, t2 do if t1[i]~=v then return false end end
  61.     return true
  62. end
  63.  
  64. -- updates the player list
  65. task.spawn(function()
  66.     while true do task.wait() -- if you cry about while true do loops then kys
  67.         local temp = {}
  68.         for i,v in ipairs(game.Players:GetPlayers()) do
  69.             if v ~= lPlayer then
  70.                 temp[i] = v.Name
  71.             end
  72.         end
  73.         if not CheckTableEquality(playerNames, temp) then
  74.             playerNames = temp
  75.             ignorePlayerList.Values = temp
  76.             ignorePlayerList:SetValues()
  77.             ignorePlayerList:Display()
  78.         end
  79.     end
  80. end)
  81.  
  82. -- updates the team list
  83. task.spawn(function()
  84.     while true do task.wait()
  85.         local temp = {}
  86.         for i,v in pairs(game.Teams:GetTeams()) do
  87.             temp[i] = v.Name
  88.         end
  89.         if not CheckTableEquality(teamNames, temp) then
  90.             teamNames = temp
  91.             ignoreTeamList.Values = temp
  92.             ignoreTeamList:SetValues()
  93.             ignoreTeamList:Display()
  94.         end
  95.     end
  96. end)
  97.  
  98. --task.spawn(function()
  99. --    while true do task.wait()
  100. --        local temp = {}
  101. --        for i,v in ipairs(npcs) do
  102. --            temp[i] = v.Name
  103. --        end
  104. --        if not CheckTableEquality(npcNames, temp) then
  105. --            ignoreNpcList.Values = temp
  106. --            ignoreNpcList:SetValues()
  107. --            ignoreNpcList:Display()
  108. --        end
  109. --    end
  110. --end)
  111.  
  112. SaveManager:BuildConfigSection(mainTab)
  113. SaveManager:LoadAutoloadConfig()
  114.  
  115. -- Returns a table of every possible bodypart in a character, or nil if the character does not exist.
  116. local function getBodyParts(character)
  117.     local humanoid = character:WaitForChild("Humanoid")
  118.     local parts = {
  119.         Head = character:WaitForChild("Head"),
  120.         HumanoidRootPart = character:WaitForChild("HumanoidRootPart"),
  121.         Humanoid = character:WaitForChild("Humanoid")
  122.     }
  123.     if humanoid.RigType == Enum.HumanoidRigType.R6 then
  124.         parts.Torso = {Torso = character:WaitForChild("Torso")}
  125.         parts["Left Arm"] = {LeftArm = character:WaitForChild("Left Arm")}
  126.         parts["Right Arm"] = {RightArm = character:WaitForChild("Right Arm")}
  127.         parts["Left Leg"] = {LeftLeg = character:WaitForChild("Left Leg")}
  128.         parts["Right Leg"] = {RightLeg = character:WaitForChild("Right Leg")}
  129.     elseif humanoid.RigType == Enum.HumanoidRigType.R15 then
  130.         parts.Torso = {
  131.             UpperTorso = character:WaitForChild("UpperTorso"),
  132.             LowerTorso = character:WaitForChild("LowerTorso")
  133.         }
  134.         parts["Left Arm"] = {
  135.             LeftHand = character:WaitForChild("LeftHand"),
  136.             LeftLowerArm = character:WaitForChild("LeftLowerArm"),
  137.             LeftUpperArm = character:WaitForChild("LeftUpperArm")
  138.         }
  139.         parts["Right Arm"] = {
  140.             RightHand = character:WaitForChild("RightHand"),
  141.             RightLowerArm = character:WaitForChild("RightLowerArm"),
  142.             RightUpperArm = character:WaitForChild("RightUpperArm")
  143.         }
  144.         parts["Left Leg"] = {
  145.             LeftFoot = character:WaitForChild("LeftFoot"),
  146.             LeftLowerLeg = character:WaitForChild("LeftLowerLeg"),
  147.             LeftUpperLeg = character:WaitForChild("LeftUpperLeg")
  148.         }
  149.         parts["Right Leg"] = {
  150.             RightFoot = character:WaitForChild("RightFoot"),
  151.             RightLowerLeg = character:WaitForChild("RightLowerLeg"),
  152.             RightUpperLeg = character:WaitForChild("RightUpperLeg")
  153.         }
  154.     end
  155.     return parts
  156. end
  157.  
  158. -- Main function that allows the character passed to be expanded at will
  159. local function extendCharacter(character)
  160.     local player = game.Players:GetPlayerFromCharacter(character)
  161.     local timer = 0
  162.     local originals = {}
  163.     local collisions = {}
  164.     local CharacterAdded = {}
  165.     local bodyParts = getBodyParts(character)
  166.     --Sets up original sizes, creates collision constraints, and creates hooks to bypass localscript anticheats
  167.     local function setup(i, v)
  168.         if not originals[i] then
  169.             originals[i] = {}
  170.             originals[i].Size = v.Size
  171.             originals[i].Transparency = v.Transparency
  172.             originals[i].CanCollide = v.CanCollide
  173.             originals[i].Massless = v.Massless
  174.             local sizeHook = v:AddGetHook("Size", originals[i].Size)
  175.             local transparencyHook = v:AddGetHook("Transparency", originals[i].Transparency)
  176.             local canCollideHook = v:AddGetHook("CanCollide", originals[i].CanCollide)
  177.             local masslessHook = v:AddGetHook("Massless", originals[i].Massless)
  178.             v:AddSetHook("Size", function(self, value)
  179.                 originals[i].Size = value
  180.                 sizeHook:Modify("Size", value)
  181.                 return value
  182.             end)
  183.             v:AddSetHook("Transparency", function(self, value)
  184.                 originals[i].Transparency = value
  185.                 transparencyHook:Modify("Transparency", value)
  186.                 return value
  187.             end)
  188.             v:AddSetHook("CanCollide", function(self, value)
  189.                 originals[i].CanCollide = value
  190.                 canCollideHook:Modify("CanCollide", value)
  191.                 return value
  192.             end)
  193.             v:AddSetHook("Massless", function(self, value)
  194.                 originals[i].Massless = value
  195.                 masslessHook:Modify("Massless", value)
  196.                 return value
  197.             end)
  198.         end
  199.         if not collisions[i] then
  200.             collisions[i] = {}
  201.             -- thanks to GameGuy#5286 for telling me collision constraints exist
  202.             for o,b in pairs(getBodyParts(lPlayer.Character)) do
  203.                 if o ~= "Humanoid" and type(b) ~= "table" then
  204.                     collisions[i][o] = Instance.new("NoCollisionConstraint", v)
  205.                     collisions[i][o].Enabled = false
  206.                     collisions[i][o].Part0 = v
  207.                     collisions[i][o].Part1 = b
  208.                     CharacterAdded[i] = lPlayer.CharacterAdded:Connect(function(char)
  209.                         local temp = char:WaitForChild(o)
  210.                         collisions[i][o].Part1 = temp
  211.                     end)
  212.                 elseif type(b) == "table" then
  213.                     for g,z in pairs(b) do
  214.                         if z:IsA("BasePart") then
  215.                             collisions[i][g] = Instance.new("NoCollisionConstraint", v)
  216.                             collisions[i][g].Enabled = false
  217.                             collisions[i][g].Part0 = v
  218.                             collisions[i][g].Part1 = z
  219.                             CharacterAdded[i] = lPlayer.CharacterAdded:Connect(function(char)
  220.                                 local temp = char:WaitForChild(g)
  221.                                 if temp:IsA("BasePart") then
  222.                                     collisions[i][g].Part1 = temp
  223.                                 end
  224.                             end)
  225.                         end
  226.                     end
  227.                 end
  228.             end
  229.         end
  230.     end
  231.     do
  232.         local customPart = character:FindFirstChild(customPartNameInput.Value)
  233.         if customPart and customPart:IsA("BasePart") then
  234.             if not originals[customPart.Name] then
  235.                 setup(customPart.Name, customPart)
  236.             end
  237.         end
  238.         for i,v in pairs(bodyParts) do
  239.             if i ~= "Humanoid" and type(v) ~= "table" then
  240.                 if not originals[i] then
  241.                     setup(i,v)
  242.                 end
  243.             elseif type(v) == "table" then
  244.                 for o,b in pairs(v) do
  245.                     if not originals[o] then
  246.                         setup(o,b)
  247.                     end
  248.                 end
  249.             end
  250.         end
  251.     end
  252.     -- resets the properties of the selected part.
  253.     -- if "all" is passed, will reset every part
  254.     local function reset(part)
  255.         if part == "custompart" or part == "all" then
  256.             local customPart = character:FindFirstChild(customPartNameInput.Value)
  257.             if customPart and customPart:IsA("BasePart") then
  258.                 customPart.Size = originals[customPart.Name].Size
  259.                 customPart.Transparency = originals[customPart.Name].Transparency
  260.                 customPart.CanCollide = originals[customPart.Name].CanCollide
  261.                 customPart.Massless = originals[customPart.Name].Massless
  262.             end
  263.         end
  264.         for i,v in pairs(bodyParts) do
  265.             if string.lower(part) == string.lower(i) or part == "all" then
  266.                 if i ~= "Humanoid" and type(v) ~= "table" then
  267.                     v.Size = originals[i].Size
  268.                     v.Transparency = originals[i].Transparency
  269.                     v.CanCollide = originals[i].CanCollide
  270.                     v.Massless = originals[i].Massless
  271.                 elseif type(v) == "table" then
  272.                     for o,b in pairs(v) do
  273.                         b.Size = originals[o].Size
  274.                         b.Transparency = originals[o].Transparency
  275.                         b.Massless = originals[o].Massless
  276.                         for _,z in pairs(collisions[o]) do
  277.                             if z.Enabled == true and z.Part0 == b then
  278.                                 z.Enabled = false
  279.                             end
  280.                         end
  281.                     end
  282.                 end
  283.             end
  284.         end
  285.     end
  286.     local function getChecks()
  287.         if bodyParts.Humanoid:GetState() == Enum.HumanoidStateType.Dead then
  288.             return 2
  289.         end
  290.         if extenderSitCheck.Value then
  291.             if bodyParts.Humanoid.Sit then
  292.                 return 1
  293.             end
  294.         end
  295.         if ignoreSelfTeamToggled.Value then
  296.             if game.PlaceId == 2039118386 then -- Neighborhood War
  297.                 local selfTeam
  298.                 local playerTeam
  299.                 pcall(function()
  300.                     selfTeam = lPlayer.Character.HumanoidRootPart.BrickColor
  301.                     playerTeam = bodyParts.HumanoidRootPart.BrickColor
  302.                 end)
  303.                 if selfTeam == playerTeam then
  304.                     return 1
  305.                 end
  306.             else
  307.                 if lPlayer.Team == player.Team then
  308.                     return 1
  309.                 end
  310.             end
  311.         end
  312.         if ignoreSelectedTeamsToggled.Value then
  313.             local teamList = ignoreTeamList:GetActiveValues()
  314.             if table.find(teamList, tostring(player.Team)) then
  315.                 return 1
  316.             end
  317.         end
  318.         if ignoreSelectedPlayersToggled.Value then
  319.             local playerList = ignorePlayerList:GetActiveValues()
  320.             if table.find(playerList, tostring(player.Name)) then
  321.                 return 1
  322.             end
  323.         end
  324.         return 0
  325.     end
  326.     -- here's the actual expander code
  327.     local Heartbeat
  328.     Heartbeat = game:GetService("RunService").Heartbeat:Connect(function(deltaTime)
  329.         timer += deltaTime
  330.         if timer >= (extenderUpdateRate.Value / 100) then -- divided by 100 because milliseconds
  331.             timer = 0
  332.             local bodyPartList = extenderPartList:GetActiveValues()
  333.             local checks = getChecks()
  334.             if checks == 2 then
  335.                 reset("all")
  336.                 for _,v in pairs(CharacterAdded) do
  337.                     v:Disconnect()
  338.                 end
  339.                 Heartbeat:Disconnect()
  340.                 return
  341.             elseif checks == 1 then
  342.                 reset("all")
  343.                 return
  344.             end
  345.             if extenderToggled.Value then
  346.                 if table.find(bodyPartList, "Custom Part") then
  347.                     local customPart = character:FindFirstChild(customPartNameInput.Value)
  348.                     if customPart then
  349.                         customPart.Size = Vector3.new(extenderSize.Value, extenderSize.Value, extenderSize.Value)
  350.                         customPart.Transparency = extenderTransparency.Value
  351.                         customPart.CanCollide = false
  352.                         customPart.Massless = true
  353.                     end
  354.                 else
  355.                     reset("custompart")
  356.                 end
  357.                 for i,v in pairs(bodyParts) do
  358.                     if table.find(bodyPartList, i) then
  359.                         if type(v) ~= "table" then
  360.                             if i ~= "HumanoidRootPart" then
  361.                                 v.Massless = true
  362.                             end
  363.                             v.Size = Vector3.new(extenderSize.Value, extenderSize.Value, extenderSize.Value)
  364.                             v.Transparency = extenderTransparency.Value
  365.                             v.CanCollide = false
  366.                         else
  367.                             for o,b in pairs(v) do
  368.                                 b.Massless = true
  369.                                 b.Size = Vector3.new(extenderSize.Value, extenderSize.Value, extenderSize.Value)
  370.                                 b.Transparency = extenderTransparency.Value
  371.                                 for _,z in pairs(collisions[o]) do
  372.                                     if z.Enabled == false and z.Part0 == b then
  373.                                         z.Enabled = true
  374.                                     end
  375.                                 end
  376.                             end
  377.                         end
  378.                     else
  379.                         reset(i)
  380.                     end
  381.                 end
  382.             else
  383.                 reset("all")
  384.             end
  385.         end
  386.     end)
  387.     local PlayerRemoving
  388.     PlayerRemoving = game.Players.PlayerRemoving:Connect(function(v)
  389.         if v == player then
  390.             Heartbeat:Disconnect()
  391.             PlayerRemoving:Disconnect()
  392.         end
  393.     end)
  394. end
  395. for _,player in ipairs(game.Players:GetPlayers()) do
  396.     if player ~= lPlayer then
  397.         task.spawn(function()
  398.             if player.Character then
  399.                 -- why use coroutine.wrap after I've been abusing task.spawn? fuck you that's why
  400.                 coroutine.wrap(extendCharacter)(player.Character)
  401.             end
  402.             player.CharacterAdded:Connect(function(v)
  403.                 coroutine.wrap(extendCharacter)(v)
  404.             end)
  405.         end)
  406.     end
  407. end
  408. game.Players.PlayerAdded:Connect(function(player)
  409.         player.CharacterAdded:Connect(function(v)
  410.         coroutine.wrap(extendCharacter)(v)
  411.     end)
  412. end)
  413. -- now, where are my schizo meds?

Replies to empty rss

Title Name Language When
Re: empty Bistre Iguana text 1 Year ago.
Re: empty Aqua Hummingbird text 1 Year ago.
Re: empty Round Bee text 1 Year ago.
Re: empty Ivory Coyote text 1 Year ago.
Re: empty Thundering Eider text 1 Year ago.