Advertisement
fusionfriends

fusionwoken

Dec 30th, 2022 (edited)
1,777
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 33.35 KB | None | 0 0
  1. repeat task.wait() until game:IsLoaded()
  2.  
  3. local UILib = loadstring(game:GetObjects("rbxassetid://7657867786")[1].Source)()
  4.  
  5. local HttpService = game:GetService("HttpService")
  6. local RunService = game:GetService("RunService")
  7. local UIS = game:GetService("UserInputService")
  8. local Players = game:GetService("Players")
  9. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  10. local StarterGui = game:GetService("StarterGui")
  11. local Lighting = game:GetService("Lighting")
  12.  
  13. local Player = Players.LocalPlayer
  14. local Camera = workspace.CurrentCamera
  15. local WTVP = Camera.WorldToViewportPoint
  16. local LastRender = tick()
  17. local Mouse = Player:GetMouse()
  18. local Direction = Vector3.new(0,0,0)
  19. local InterpolatedDir = Direction
  20. local Tilt = 0
  21. local OldDensity = 0
  22. local InterpolatedTilt = Tilt
  23. local CameraPos = game.Workspace.CurrentCamera.CFrame.Position
  24. local Data
  25. local GameMeta = getrawmetatable(game)
  26. local OldIndex = GameMeta.__index
  27. local OldNameCall = GameMeta.__namecall
  28. local MenuHidden = false
  29.  
  30. setreadonly(GameMeta,false)
  31.  
  32. local DataHandler = {}
  33. DataHandler.__index = DataHandler
  34.  
  35. local ESPHandler = {}
  36. ESPHandler.__index = ESPHandler
  37.  
  38. local ESPObjects = {}
  39.  
  40. local ESPTypes = {
  41.     ["MobESP"] = "Mob ESP";
  42.     ["PlayerESP"] = "Player ESP";
  43.     ["BagESP"] = "Bag ESP";
  44.     ["ChestESP"] = "Chest ESP";
  45.     ["IngredientESP"] = "Ingredient ESP";
  46.     ["NpcESP"] = "NPC ESP";
  47.     ["LocationESP"] = "Location ESP";
  48. }
  49.  
  50. function WTS(Position)
  51.     local VP,bool = WTVP(Camera,Position)
  52.     return Vector2.new(VP.x, VP.y),bool,math.round(VP.Z)
  53. end
  54.  
  55. function GetStringForKeycode(Keycode)
  56.     local Full = tostring(Keycode)
  57.     return string.sub(Full,14,#Full)
  58. end
  59.  
  60. local Modlist = {
  61.     43350779;
  62. }
  63.  
  64. local ModRoles = {
  65.     "Junior Moderator";
  66.     "Moderator";
  67.     "Senior Moderator";
  68.     "Head Moderator";
  69.     "Contributor";
  70.     "Admin";
  71.     "Owner";
  72. }
  73.  
  74. local Rand = Random.new()
  75.  
  76. local ModNotifierSounds = {
  77.     "rbxassetid://5837820950";
  78.     "rbxassetid://2050522204";
  79.     "rbxassetid://5783842554";
  80.     "rbxassetid://4024763191";
  81.     "rbxassetid://336771379";
  82.     "rbxassetid://4809574295";
  83.     "rbxassetid://4910368846";
  84.     "rbxassetid://4572783577";
  85.     "rbxassetid://5290941733";
  86.     "rbxassetid://2777522827";
  87. }
  88.  
  89. local function NotifyMod(Plr)
  90.     local Role
  91.  
  92.     pcall(function()
  93.         Role = Plr:GetRoleInGroup(5212858)
  94.     end)
  95.  
  96.     if table.find(Modlist,Plr.UserId) or table.find(ModRoles,Role or "") then
  97.         StarterGui:SetCore("SendNotification", {
  98.             Title = "Moderator Detected";
  99.             Text = "Moderator in your game: "..Plr.Name;
  100.             Duration = 5;
  101.             Button1 = "Ok";
  102.         })
  103.         local Sound = Instance.new("Sound")
  104.         Sound.SoundId = ModNotifierSounds[Rand:NextInteger(1,#ModNotifierSounds)]
  105.         Sound.Volume = 10
  106.         Sound.Parent = game.CoreGui
  107.         Sound:Play()
  108.         task.delay(5,Sound.Destroy,Sound)
  109.     end
  110. end
  111.  
  112. Players.PlayerAdded:Connect(NotifyMod)
  113. for i,v in ipairs(Players:GetPlayers()) do
  114.     NotifyMod(v)
  115. end
  116.  
  117. function ESPHandler:Destroy()
  118.     if self.Destroyed then return end
  119.     self.Destroyed = true
  120.     self.Properties.Enabled = false
  121.  
  122.     for i,v in pairs(self.TextObjects) do
  123.         v:Remove()
  124.     end
  125.  
  126.  
  127.     if table.find(ESPObjects[self.Name] or {},self) then
  128.         table.remove(ESPObjects[self.Name],table.find(ESPObjects[self.Name],self))
  129.     end
  130. end
  131.  
  132. function ESPHandler:Render()
  133.     if self.Destroyed then return end
  134.  
  135.     if not self.Part or self.Part.Parent == nil then
  136.         self:Destroy()
  137.         return
  138.     end
  139.  
  140.     local Position,OnScreen,Distance = WTS(self.Part.Position)
  141.     Position -= Vector2.new(0,Data.Contents.ESPYOffset)
  142.  
  143.     for i,v in pairs(self.Texts) do
  144.         local TextObject = self.TextObjects[i] or Drawing.new("Text")
  145.         if self.Properties.Enabled and Distance < self.Properties.MaxDistance then
  146.             local NewText,IsDistance = v(self.Part)
  147.             local SetColor
  148.             if IsDistance then
  149.                 if Data.Contents.DistanceHidden then
  150.                     TextObject.Visible = false
  151.                     continue
  152.                 end
  153.                 SetColor = Color3.new(1,1,1)
  154.             end
  155.             TextObject.Size = self.Properties.Size
  156.             TextObject.Outline = true
  157.             TextObject.Center = true
  158.             TextObject.Visible = OnScreen
  159.             TextObject.Text = NewText
  160.             TextObject.Color = SetColor or self.Properties.Color
  161.             local Scale = self.Properties.Size
  162.             local Amt = #self.Texts-1
  163.             TextObject.Position = Position-Vector2.new(0,((Scale*Amt)-(Scale*(i-1))))
  164.  
  165.             self.TextObjects[i] = TextObject
  166.         else
  167.             TextObject.Visible = false
  168.         end
  169.     end
  170. end
  171.  
  172. function ESPHandler.new(TargetPart,Texts,Properties)
  173.     local self = setmetatable({
  174.         Part = TargetPart;
  175.         Texts = Texts;
  176.         TextObjects = {};
  177.         Properties = Properties;
  178.     },ESPHandler)
  179.  
  180.     Texts[#Texts+1] = function(Part)
  181.         local Position,OnScreen,Distance = WTS(Part.Position)
  182.         return "["..Distance.."s]",true
  183.     end
  184.  
  185.     for i,v in pairs(Texts) do
  186.         local NewText = v(self.Part)
  187.         local TextObject = Drawing.new("Text")
  188.         TextObject.Outline = true
  189.         TextObject.Center = true
  190.         TextObject.Visible = false
  191.         TextObject.Text = NewText
  192.         self.TextObjects[i] = TextObject
  193.     end
  194.  
  195.     return self
  196. end
  197.  
  198. function DataHandler:Save()
  199.     local SaveTable = {}
  200.  
  201.     for i,v in pairs(self.Contents) do
  202.         SaveTable[i] = v
  203.     end
  204.  
  205.     for i,v in pairs(SaveTable) do
  206.         if typeof(v) == "Color3" then
  207.             SaveTable[i] = {
  208.                 R = v.R;
  209.                 G = v.G;
  210.                 B = v.B;
  211.             }
  212.         end
  213.     end
  214.  
  215.     writefile(self.FileName,HttpService:JSONEncode(SaveTable))
  216. end
  217.  
  218. function DataHandler:SetValue(Key,Value)
  219.     self.Contents[Key] = Value
  220.     self:Save()
  221.  
  222.     if self.ChangedCallbacks[Key] then
  223.         self.ChangedCallbacks[Key](Value)
  224.     end
  225. end
  226.  
  227. function DataHandler:Changed(Key,Callback)
  228.     self.ChangedCallbacks[Key] = Callback
  229. end
  230.  
  231. function DataHandler.new(FileName)
  232.     local DataTable = isfile(FileName) and HttpService:JSONDecode(readfile(FileName)) or {
  233.         MenuToggleBind = "LeftAlt";
  234.     }
  235.  
  236.     for i,v in pairs(DataTable) do
  237.         if typeof(v) == "table" and (v.R and v.G and v.B) then
  238.             DataTable[i] = Color3.new(v.R,v.G,v.B)
  239.         end
  240.     end
  241.  
  242.     local self = setmetatable({
  243.         Contents = DataTable;
  244.         FileName = FileName;
  245.         ChangedCallbacks = {};
  246.     },DataHandler)
  247.  
  248.     self:Save()
  249.  
  250.     return self
  251. end
  252.  
  253. Data = DataHandler.new("fusionwoken_data.txt")
  254.  
  255. local Connection
  256. local WindowInst
  257.  
  258. Connection = game.CoreGui.ChildAdded:Connect(function(NewInst)
  259.     WindowInst = NewInst
  260.     Connection:Disconnect()
  261. end)
  262.  
  263. local Window = UILib:CreateWindow({
  264.     Name = "Fusionwoken [ALPHA]";
  265.     Theme = [[{"__Designer.Colors.section":"FFFFFF","__Designer.Colors.topGradient":"003E66","__Designer.Settings.ShowHideKey":"Enum.KeyCode.LeftAlt","__Designer.Colors.otherElementText":"FFFFFF","__Designer.Colors.hoveredOptionBottom":"2D2D2D","__Designer.Background.ImageAssetID":"rbxassetid://11946878655","__Designer.Colors.selectedOption":"373737","__Designer.Colors.unselectedOption":"282828","__Designer.Background.UseBackgroundImage":true,"__Designer.Files.WorkspaceFile":"Fusionwoken [ALPHA]","__Designer.Colors.innerBorder":"212A2C","__Designer.Colors.unhoveredOptionTop":"323232","__Designer.Colors.main":"FFFFFF","__Designer.Colors.outerBorder":"003A72","__Designer.Background.ImageColor":"FFFFFF","__Designer.Colors.tabText":"B9B9B9","__Designer.Colors.elementBorder":"141414","__Designer.Background.ImageTransparency":63,"__Designer.Colors.sectionBackground":"1A1A1A","__Designer.Colors.background":"000000","__Designer.Colors.bottomGradient":"486B6E","__Designer.Colors.hoveredOptionTop":"414141","__Designer.Colors.elementText":"FFFFFF","__Designer.Colors.unhoveredOptionBottom":"232323"}]]
  266. })
  267.  
  268. WindowInst.Enabled = false
  269.  
  270. if Data.Contents.MenuHidden then
  271.     Window:Hide()
  272. end
  273.  
  274. local ESPTab = Window:CreateTab({
  275.     Name = "ESP"
  276. })
  277.  
  278. local CharacterTab = Window:CreateTab({
  279.     Name = "Character"
  280. })
  281.  
  282. local ClientTab = Window:CreateTab({
  283.     Name = "Client"
  284. })
  285.  
  286. local MiscTab = Window:CreateTab({
  287.     Name = "Misc";
  288. })
  289.  
  290. local ESPTabGeneralSection = ESPTab:CreateSection({
  291.     Name = "General";
  292. })
  293.  
  294. ESPTabGeneralSection:AddSlider({
  295.     Name = "Refresh Rate";
  296.     Flag = "ESPGeneralSection_RefreshRate";
  297.     Value = Data.Contents.ESPRefreshRate or 40;
  298.     Min = 5;
  299.     Max = 180;
  300.     Callback = function(Value)
  301.         Data:SetValue("ESPRefreshRate",Value)
  302.     end;
  303. })
  304.  
  305. ESPTabGeneralSection:AddSlider({
  306.     Name = "Y Offset";
  307.     Flag = "ESPGeneralSection_YOffset";
  308.     Value = Data.Contents.ESPYOffset or 20;
  309.     Min = 0;
  310.     Max = 40;
  311.     Callback = function(Value)
  312.         Data:SetValue("ESPYOffset",Value)
  313.     end;
  314. })
  315.  
  316. ESPTabGeneralSection:AddToggle({
  317.     Name = "Hide Distance";
  318.     Flag = "ESPGeneralSection_DistanceHidden";
  319.     Value = Data.Contents.DistanceHidden or false;
  320.     Callback = function(Value)
  321.         Data:SetValue("DistanceHidden",Value)
  322.     end;
  323. })
  324.  
  325. local DefaultColors = {
  326.     ["MobESP"] = Color3.new(1,0,0);
  327.     ["PlayerESP"] = Color3.new(1,0,1);
  328.     ["BagESP"] = Color3.new(0,1,1);
  329.     ["ChestESP"] = Color3.new(1,1,0);
  330.     ["IngredientESP"] = Color3.new(0,1,0);
  331.     ["NpcESP"] = Color3.new(0,0,1);
  332.     ["LocationESP"] = Color3.new(.5,1,0);
  333. }
  334.  
  335. local ESPIndex = 0
  336. for i,v in pairs(ESPTypes) do
  337.     ESPIndex += 1
  338.     local Section = ESPTab:CreateSection({
  339.         Name = v;
  340.         Side = ESPIndex % 2 == 0 and "Left" or "Right";
  341.     })
  342.     ESPObjects[i] = {}
  343.  
  344.     local function Update()
  345.         for _,Object in ipairs(ESPObjects[i]) do
  346.             if Object.Properties.Name == i then
  347.                 Object.Properties.Enabled = Data.Contents[i.."Enabled"] or false
  348.                 Object.Properties.Color = Data.Contents[i.."Color"] or DefaultColors[i]
  349.                 Object.Properties.Size = Data.Contents[i.."Size"] or 16
  350.                 Object.Properties.MaxDistance = Data.Contents[i.."Distance"] or 20000
  351.                 Object:Render()
  352.             end
  353.         end
  354.     end
  355.  
  356.     local EnabledToggle = Section:AddToggle({
  357.         Name = "Enabled";
  358.         Flag = i.."Section_Enabled";
  359.         Value = Data.Contents[i.."Enabled"] or false;
  360.         Callback = function(Value)
  361.             Data:SetValue(i.."Enabled",Value)
  362.             Update()
  363.         end;
  364.         Keybind = {
  365.             Value = Data.Contents[i.."Bind"] and Enum.KeyCode[Data.Contents[i.."Bind"]];
  366.             Callback = function(NewBind)
  367.                 Data:SetValue(i.."Bind",NewBind and GetStringForKeycode(NewBind))
  368.             end;
  369.         }
  370.     })
  371.  
  372.     local SizeSlider = Section:AddSlider({
  373.         Name = "Size";
  374.         Flag = i.."Section_Size";
  375.         Value = Data.Contents[i.."Size"] or 16;
  376.         Min = 10;
  377.         Max = 25;
  378.         Callback = function(Value)
  379.             Data:SetValue(i.."Size",Value)
  380.             Update()
  381.         end;
  382.     })
  383.  
  384.     local DistanceSlider = Section:AddSlider({
  385.         Name = "Distance";
  386.         Flag = i.."Section_Distance";
  387.         Value = Data.Contents[i.."Distance"] or 20000;
  388.         Min = 100;
  389.         Max = 60000;
  390.         Callback = function(Value)
  391.             Data:SetValue(i.."Distance",Value)
  392.             Update()
  393.         end;
  394.     })
  395.  
  396.     local ColorPicker = Section:AddColorpicker({
  397.         Name = "Color";
  398.         Flag = i.."Section_Color";
  399.         Value = Data.Contents[i.."Color"] or DefaultColors[i];
  400.         Callback = function(Value)
  401.             Data:SetValue(i.."Color",Value)
  402.             Update()
  403.         end;
  404.     })
  405.  
  406.     Update()
  407. end
  408.  
  409. local function ConnectPlayerToESP(Plr)
  410.     if Plr == Player then return end
  411.  
  412.     local function ConnectCharacter(Character)
  413.         local HRoot = Character:WaitForChild("HumanoidRootPart")
  414.  
  415.         local Object = ESPHandler.new(HRoot,{
  416.             [1] = function(Part)
  417.                 local Humanoid = Part.Parent and Part.Parent:FindFirstChildWhichIsA("Humanoid")
  418.                 local Position,OnScreen,Distance = WTS(Part.Position)
  419.                 if Humanoid then
  420.                     return Plr.Name.." [HP: |"..math.round(Humanoid.Health).."/"..math.round(Humanoid.MaxHealth).."| ("..math.round((Humanoid.Health/Humanoid.MaxHealth)*100) .."%)]"
  421.                 else
  422.                     return ""
  423.                 end
  424.             end;
  425.             [2] = function(Part)
  426.                 local Oath
  427.                 local Bell
  428.                 if Plr:FindFirstChild("Backpack") then
  429.                     for i,v in ipairs(Plr.Backpack:GetChildren()) do
  430.                         if string.find(v.Name,"Talent:Oath:") then
  431.                             Oath = string.sub(v.Name,14,#v.Name)
  432.                         elseif string.find(v.Name,"Resonance:") then
  433.                             Bell = string.sub(v.Name,11,#v.Name)
  434.                         end
  435.                     end
  436.                 end
  437.                 local AddedStats = -27
  438.                 local Elements = -1
  439.  
  440.                 if Plr.Character then
  441.                     for i,v in pairs(Plr.Character:GetAttributes()) do
  442.                         if string.find(i,"Stat") then
  443.                             AddedStats += v
  444.                             if string.find(i,"Element") then
  445.                                 Elements += 1
  446.                             end
  447.                         end
  448.                     end
  449.                 end
  450.  
  451.                 AddedStats -= math.clamp(Elements,0,4)
  452.  
  453.                 return "O: "..(Oath or "None").." | B: "..(Bell or "None").." | P: "..math.clamp(1+math.floor(AddedStats/15),1,20)
  454.             end;
  455.         },{
  456.             Name = "PlayerESP";
  457.             Color = Data.Contents["PlayerESPColor"];
  458.             Size = Data.Contents["PlayerESPSize"];
  459.             Enabled = Data.Contents["PlayerESPEnabled"];
  460.             MaxDistance = Data.Contents["PlayerESPDistance"];
  461.         })
  462.  
  463.         table.insert(ESPObjects["PlayerESP"],Object)
  464.  
  465.         local Connections = {}
  466.  
  467.         local function Disconnect()
  468.             for i,v in ipairs(Connections) do
  469.                 v:Disconnect()
  470.             end
  471.             Object:Destroy()
  472.         end
  473.  
  474.         table.insert(Connections,Plr.CharacterAdded:Connect(function()
  475.             Disconnect()
  476.         end))
  477.  
  478.         table.insert(Connections,Players.PlayerRemoving:Connect(function(WhoLeft)
  479.             if WhoLeft == Plr then
  480.                 Disconnect()
  481.             end
  482.         end))
  483.     end
  484.  
  485.     ConnectCharacter(Plr.Character or Plr.CharacterAdded:Wait())
  486.     Plr.CharacterAdded:Connect(ConnectCharacter)
  487. end
  488.  
  489. local function ConnectChestToChestESP(Model)
  490.     local Object
  491.  
  492.     local Connection
  493.     Connection = Model.AncestryChanged:Connect(function()
  494.         if not Model:IsDescendantOf(workspace) then
  495.             Connection:Disconnect()
  496.             if Object then
  497.                 Object:Destroy()
  498.             end
  499.         end
  500.     end)
  501.  
  502.     local Part = Model:WaitForChild("RootPart")
  503.    
  504.     Object = ESPHandler.new(Part,{
  505.         [1] = function(Part)
  506.             return "Chest"
  507.         end;
  508.     },{
  509.         Name = "ChestESP";
  510.         Color = Data.Contents["ChestESPColor"];
  511.         Size = Data.Contents["ChestESPSize"];
  512.         Enabled = Data.Contents["ChestESPEnabled"];
  513.         MaxDistance = Data.Contents["ChestESPDistance"];
  514.     })
  515.  
  516.     table.insert(ESPObjects["ChestESP"],Object)
  517. end
  518.  
  519. local function ConnectMobToMobESP(Model)
  520.     local Object
  521.  
  522.     local Connection
  523.     Connection = Model.AncestryChanged:Connect(function()
  524.         if Model.Parent ~= workspace.Live then
  525.             Connection:Disconnect()
  526.             if Object then
  527.                 Object:Destroy()
  528.             end
  529.         end
  530.     end)
  531.  
  532.     Part = Model:WaitForChild("HumanoidRootPart")
  533.     local Humanoid = Model:FindFirstChildWhichIsA("Humanoid")
  534.  
  535.     Object = ESPHandler.new(Part,{
  536.         [1] = function(Part)
  537.             return Model.Name
  538.         end;
  539.         [2] = function(Part)
  540.             local Humanoid = Part.Parent and Part.Parent:FindFirstChildWhichIsA("Humanoid")
  541.             if not Humanoid then return "" end
  542.             return "HP: "..math.round(Humanoid.Health).."/"..math.round(Humanoid.MaxHealth).." ("..math.round((Humanoid.Health/Humanoid.MaxHealth)*100).."%)"
  543.         end;
  544.     },{
  545.         Name = "MobESP";
  546.         Color = Data.Contents["MobESPColor"];
  547.         Size = Data.Contents["MobESPSize"];
  548.         Enabled = Data.Contents["MobESPEnabled"];
  549.         MaxDistance = Data.Contents["MobESPDistance"];
  550.     })
  551.  
  552.     table.insert(ESPObjects["MobESP"],Object)
  553. end
  554.  
  555. local function ConnectNpcToNpcESP(Model)
  556.     local Object
  557.  
  558.     local Connection
  559.     Connection = Model.AncestryChanged:Connect(function()
  560.         if not Model:IsDescendantOf(workspace) then
  561.             Connection:Disconnect()
  562.             if Object then
  563.                 Object:Destroy()
  564.             end
  565.         end
  566.     end)
  567.  
  568.     repeat task.wait() until Model.PrimaryPart
  569.     Part = Model.PrimaryPart
  570.    
  571.     Object = ESPHandler.new(Part,{
  572.         [1] = function(Part)
  573.             if Part.Parent == nil then return "" end
  574.             return Model.Name
  575.         end;
  576.     },{
  577.         Name = "NpcESP";
  578.         Color = Data.Contents["NpcESPColor"];
  579.         Size = Data.Contents["NpcESPSize"];
  580.         Enabled = Data.Contents["NpcESPEnabled"];
  581.         MaxDistance = Data.Contents["NpcESPDistance"];
  582.     })
  583.  
  584.     table.insert(ESPObjects["NpcESP"],Object)
  585. end
  586.  
  587. local function ConnectBagToBagESP(Part)
  588.     local Object
  589.  
  590.     local Connection
  591.     Connection = Part.AncestryChanged:Connect(function()
  592.         if not Part:IsDescendantOf(workspace) then
  593.             Connection:Disconnect()
  594.             if Object then
  595.                 Object:Destroy()
  596.             end
  597.         end
  598.     end)
  599.    
  600.     Object = ESPHandler.new(Part,{
  601.         [1] = function(Part)
  602.             if Part.Parent == nil then return "" end
  603.             return "Bag"
  604.         end;
  605.     },{
  606.         Name = "BagESP";
  607.         Color = Data.Contents["BagESPColor"];
  608.         Size = Data.Contents["BagESPSize"];
  609.         Enabled = Data.Contents["BagESPEnabled"];
  610.         MaxDistance = Data.Contents["BagESPDistance"];
  611.     })
  612.  
  613.     table.insert(ESPObjects["BagESP"],Object)
  614. end
  615.  
  616. local function ConnectIngredientToIngredientESP(Part)
  617.     local Object
  618.  
  619.     local Connection
  620.     Connection = Part.AncestryChanged:Connect(function()
  621.         if not Part:IsDescendantOf(workspace) then
  622.             Connection:Disconnect()
  623.             if Object then
  624.                 Object:Destroy()
  625.             end
  626.         end
  627.     end)
  628.    
  629.     Object = ESPHandler.new(Part,{
  630.         [1] = function(Part)
  631.             if Part.Parent == nil then return "" end
  632.             return Part.Name
  633.         end;
  634.     },{
  635.         Name = "IngredientESP";
  636.         Color = Data.Contents["IngredientESPColor"];
  637.         Size = Data.Contents["IngredientESPSize"];
  638.         Enabled = Data.Contents["IngredientESPEnabled"];
  639.         MaxDistance = Data.Contents["IngredientESPDistance"];
  640.     })
  641.  
  642.     table.insert(ESPObjects["IngredientESP"],Object)
  643. end
  644.  
  645. Players.PlayerAdded:Connect(ConnectPlayerToESP)
  646. for i,v in ipairs(Players:GetPlayers()) do
  647.     task.spawn(ConnectPlayerToESP,v)
  648. end
  649.  
  650. if workspace:FindFirstChild("Thrown") then
  651.     local Connected = {}
  652.  
  653.     task.spawn(function()
  654.         while true do
  655.             for i,v in ipairs(workspace.Thrown:GetChildren()) do
  656.                 if table.find(Connected,v) then continue end
  657.                 if v:FindFirstChild("Pick") then
  658.                     table.insert(Connected,v)
  659.                     task.spawn(ConnectChestToChestESP,v)
  660.                 elseif v.Name == "BagDrop" then
  661.                     table.insert(Connected,v)
  662.                     ConnectBagToBagESP(v)
  663.                 end
  664.             end
  665.             task.wait(1)
  666.         end
  667.     end)
  668. end
  669.  
  670. if workspace:FindFirstChild("Ingredients") then
  671.     workspace.Ingredients.ChildAdded:Connect(ConnectIngredientToIngredientESP)
  672.  
  673.     for i,v in ipairs(workspace.Ingredients:GetChildren()) do
  674.         task.spawn(ConnectIngredientToIngredientESP,v)
  675.     end
  676. end
  677.  
  678. if workspace:FindFirstChild("Live") then
  679.     workspace.Live.ChildAdded:Connect(function(Model)
  680.         if string.sub(Model.Name,1,1) == "." then
  681.             ConnectMobToMobESP(Model)
  682.         end
  683.     end)
  684.  
  685.     for i,v in ipairs(workspace.Live:GetChildren()) do
  686.         if string.sub(v.Name,1,1) == "." then
  687.             task.spawn(ConnectMobToMobESP,v)
  688.         end
  689.     end
  690. end
  691.  
  692. if workspace:FindFirstChild("NPCs") then
  693.     workspace.NPCs.ChildAdded:Connect(ConnectNpcToNpcESP)
  694.  
  695.     for i,v in ipairs(workspace.NPCs:GetChildren()) do
  696.         task.spawn(ConnectNpcToNpcESP,v)
  697.     end
  698. end
  699.  
  700. if ReplicatedStorage:FindFirstChild("MarkerWorkspace") then
  701.     for i,v in ipairs(ReplicatedStorage.MarkerWorkspace.AreaMarkers:GetChildren()) do
  702.         local AreaMarker = v:FindFirstChild("AreaMarker")
  703.         if AreaMarker then
  704.             local Object = ESPHandler.new(AreaMarker,{
  705.                 [1] = function(Part)
  706.                     return v.Name
  707.                 end;
  708.             },{
  709.                 Name = "LocationESP";
  710.                 Color = Data.Contents["LocationESPColor"];
  711.                 Size = Data.Contents["LocationESPSize"];
  712.                 Enabled = Data.Contents["LocationESPEnabled"];
  713.                 MaxDistance = Data.Contents["LocationESPDistance"];
  714.             })
  715.        
  716.             table.insert(ESPObjects["LocationESP"],Object)
  717.         end
  718.     end
  719. end
  720.  
  721. local CharacterMovementSection = CharacterTab:CreateSection({
  722.     Name = "Movement";
  723.     Side = "Left";
  724. })
  725.  
  726. local CharacterConditionSection = CharacterTab:CreateSection({
  727.     Name = "Condition";
  728.     Side = "Right";
  729. })
  730.  
  731. local ResetButton = CharacterConditionSection:AddButton({
  732.     Name = "Reset Character";
  733.     Callback = function()
  734.         if Player.Character then
  735.             Player.Character:Destroy()
  736.         end
  737.     end;
  738. })
  739.  
  740. local NofallToggle = CharacterConditionSection:AddToggle({
  741.     Name = "Nofall";
  742.     Flag = "ConditionSection_NofallEnabled";
  743.     Value = Data.Contents["NofallEnabled"] or false;
  744.     Callback = function(Value)
  745.         Data:SetValue("NofallEnabled",Value)
  746.     end;
  747.     Keybind = {
  748.         Value = Data.Contents["NofallBind"] and Enum.KeyCode[Data.Contents["NofallBind"]];
  749.         Callback = function(NewBind)
  750.             Data:SetValue("NofallBind",NewBind and GetStringForKeycode(NewBind))
  751.         end;
  752.     }
  753. })
  754.  
  755. local FlyEnabledToggle = CharacterMovementSection:AddToggle({
  756.     Name = "Fly";
  757.     Flag = "MovementSection_FlyEnabled";
  758.     Value = Data.Contents["FlyEnabled"] or false;
  759.     Callback = function(Value)
  760.         if Value then
  761.             LastPos = Player.Character.HumanoidRootPart.Position
  762.         else
  763.             LastPos = nil
  764.         end
  765.         Data:SetValue("FlyEnabled",Value)
  766.     end;
  767.     Keybind = {
  768.         Value = Data.Contents["FlyBind"] and Enum.KeyCode[Data.Contents["FlyBind"]];
  769.         Callback = function(NewBind)
  770.             Data:SetValue("FlyBind",NewBind and GetStringForKeycode(NewBind))
  771.         end;
  772.     }
  773. })
  774.  
  775. local FlySpeedSlider = CharacterMovementSection:AddSlider({
  776.     Name = "Fly Speed";
  777.     Flag = "MovementSection_FlySpeed";
  778.     Value = Data.Contents["FlySpeed"] or 6;
  779.     Min = 0;
  780.     Max = 20;
  781.     Callback = function(Value)
  782.         Data:SetValue("FlySpeed",Value)
  783.     end;
  784. })
  785.  
  786. local FlySprintBind = CharacterMovementSection:AddKeybind({
  787.     Name = "Fly Sprint Bind";
  788.     Flag = "MovementSection_FlySprintBind";
  789.     Value = Data.Contents["FlySprintBind"] and Enum.KeyCode[Data.Contents["FlySprintBind"]];
  790.     Callback = function(NewBind)
  791.         Data:SetValue("FlySprintBind",NewBind and GetStringForKeycode(NewBind))
  792.     end;
  793. })
  794.  
  795. local FlySprintSpeedSlider = CharacterMovementSection:AddSlider({
  796.     Name = "Fly Sprint Speed";
  797.     Flag = "MovementSection_FlySprintSpeed";
  798.     Value = Data.Contents["FlySprintSpeed"] or 18;
  799.     Min = 0;
  800.     Max = 20;
  801.     Callback = function(Value)
  802.         Data:SetValue("FlySprintSpeed",Value)
  803.     end;
  804. })
  805.  
  806. local NoclipEnabledToggle = CharacterMovementSection:AddToggle({
  807.     Name = "Noclip";
  808.     Flag = "MovementSection_NoclipEnabled";
  809.     Value = Data.Contents["NoclipEnabled"] or false;
  810.     Callback = function(Value)
  811.         Data:SetValue("NoclipEnabled",Value)
  812.     end;
  813.     Keybind = {
  814.         Value = Data.Contents["NoclipBind"] and Enum.KeyCode[Data.Contents["NoclipBind"]];
  815.         Callback = function(NewBind)
  816.             Data:SetValue("NoclipBind",NewBind and GetStringForKeycode(NewBind))
  817.         end;
  818.     }
  819. })
  820.  
  821. local WalkspeedEnabledToggle = CharacterMovementSection:AddToggle({
  822.     Name = "Walkspeed";
  823.     Flag = "MovementSection_WalkspeedEnabled";
  824.     Value = Data.Contents["WalkspeedEnabled"] or false;
  825.     Callback = function(Value)
  826.         Data:SetValue("WalkspeedEnabled",Value)
  827.     end;
  828.     Keybind = {
  829.         Value = Data.Contents["WalkspeedBind"] and Enum.KeyCode[Data.Contents["WalkspeedBind"]];
  830.         Callback = function(NewBind)
  831.             Data:SetValue("WalkspeedBind",NewBind and GetStringForKeycode(NewBind))
  832.         end;
  833.     }
  834. })
  835.  
  836. local WalkspeedAmountSlider = CharacterMovementSection:AddSlider({
  837.     Name = "Walkspeed Amount";
  838.     Flag = "MovementSection_WalkspeedAmountSlider";
  839.     Value = Data.Contents["WalkspeedAmount"] or 30;
  840.     Min = 16;
  841.     Max = 200;
  842.     Callback = function(Value)
  843.         Data:SetValue("WalkspeedAmount",Value)
  844.     end;
  845. })
  846.  
  847. local ClientViewSection = ClientTab:CreateSection({
  848.     Name = "View";
  849.     Side = "Left";
  850. })
  851.  
  852. ClientViewSection:AddToggle({
  853.     Name = "Nofog";
  854.     Flag = "ViewSection_NofogToggle";
  855.     Value = Data.Contents["Nofog"] or false;
  856.     Callback = function(Value)
  857.         Data:SetValue("Nofog",Value)
  858.         if not Value then
  859.             Lighting.Atmosphere.Density = OldDensity
  860.         end
  861.     end;
  862.     Keybind = {
  863.         Value = Data.Contents["NofogBind"] and Enum.KeyCode[Data.Contents["NofogBind"]];
  864.         Callback = function(NewBind)
  865.             Data:SetValue("NofogBind",NewBind and GetStringForKeycode(NewBind))
  866.         end;
  867.     }
  868. })
  869.  
  870. local OldTimeOfDay = "14:00:00"
  871. local OldFogEnd = 9999
  872. local OldBloom = 0.1
  873.  
  874. ClientViewSection:AddToggle({
  875.     Name = "Fullbright";
  876.     Flag = "ViewSection_FullbrightToggle";
  877.     Value = Data.Contents["Fullbright"] or false;
  878.     Callback = function(Value)
  879.         Data:SetValue("Fullbright",Value)
  880.         if not Value then
  881.             Lighting.TimeOfDay = OldTimeOfDay
  882.             Lighting.FogEnd = OldFogEnd
  883.             Lighting.Bloom.Intensity = OldBloom
  884.         end
  885.     end;
  886.     Keybind = {
  887.         Value = Data.Contents["FullbrightBind"] and Enum.KeyCode[Data.Contents["FullbrightBind"]];
  888.         Callback = function(NewBind)
  889.             Data:SetValue("FullbrightBind",NewBind and GetStringForKeycode(NewBind))
  890.         end;
  891.     }
  892. })
  893.  
  894. RunService.Stepped:Connect(function()
  895.     if Player.Character then
  896.         for i,v in ipairs(Player.Character:GetDescendants()) do
  897.             if v:IsA("BasePart") and Data.Contents.NoclipEnabled then
  898.                 v.CanCollide = false
  899.             end
  900.         end
  901.  
  902.         local HRoot = Player.Character:FindFirstChild("HumanoidRootPart")
  903.         local Humanoid = Player.Character:FindFirstChild("Humanoid")
  904.         if Humanoid and HRoot and Data.Contents.WalkspeedEnabled then
  905.             local MoveVel = Humanoid.MoveDirection*(Data.Contents.WalkspeedAmount or 30)
  906.             HRoot.Velocity = Vector3.new(MoveVel.X,HRoot.Velocity.Y,MoveVel.Z)
  907.         end
  908.     end
  909. end)
  910.  
  911. local FlySettings = {
  912.     ForwardKey = Enum.KeyCode.W,
  913.     LeftKey = Enum.KeyCode.A,
  914.     BackwardKey = Enum.KeyCode.S,
  915.     RightKey = Enum.KeyCode.D,
  916.     UpKey = Enum.KeyCode.E,
  917.     DownKey = Enum.KeyCode.Q,
  918. }
  919.  
  920. local SettingSection = MiscTab:CreateSection({
  921.     Name = "Settings"
  922. })
  923.  
  924. local FlySprintBind = SettingSection:AddKeybind({
  925.     Name = "Menu Toggle Bind";
  926.     Flag = "SettingsSection_MenuBind";
  927.     Value = Data.Contents["MenuToggleBind"] and Enum.KeyCode[Data.Contents["MenuToggleBind"]];
  928.     Callback = function(NewBind)
  929.         Data:SetValue("MenuToggleBind",NewBind and GetStringForKeycode(NewBind))
  930.     end;
  931. })
  932.  
  933. GameMeta.__namecall = newcclosure(function(Self,...)
  934.     local Args = {...}
  935.     local Method = getnamecallmethod()
  936.     if Method == "FireServer" and typeof(Args[1]) == "number" and typeof(Args[2]) == "boolean" and (Data.Contents.NofallEnabled or Data.Contents.FlyEnabled) then
  937.         return
  938.     end
  939.     return OldNameCall(Self,...)
  940. end)
  941.    
  942. function Lerp(a, b, t)
  943.     return a + (b - a) * t
  944. end
  945.    
  946. local LastPos = nil
  947.    
  948. function KeyHandler(actionName, userInputState)
  949.     if true and Player.Character and Player.Character:FindFirstChild("HumanoidRootPart") then
  950.         if actionName == "Forward" then
  951.             Tilt = userInputState == Enum.UserInputState.Begin and -20 or 0
  952.             Direction = Vector3.new(Direction.x,Direction.y,userInputState == Enum.UserInputState.Begin and -1 or 0)
  953.         elseif actionName == "Left" then
  954.             Direction = Vector3.new(userInputState == Enum.UserInputState.Begin and -1 or 0,Direction.y,Direction.z)
  955.         elseif actionName == "Backward" then
  956.             Tilt = userInputState == Enum.UserInputState.Begin and 20 or 0
  957.             Direction = Vector3.new(Direction.x,Direction.y,userInputState == Enum.UserInputState.Begin and 1 or 0)
  958.         elseif actionName == "Right" then
  959.             Direction = Vector3.new(userInputState == Enum.UserInputState.Begin and 1 or 0,Direction.y,Direction.z)
  960.         elseif actionName == "Up" then
  961.             Direction = Vector3.new(Direction.x,userInputState == Enum.UserInputState.Begin and 1 or 0,Direction.z)
  962.         elseif actionName == "Down" then
  963.             Direction = Vector3.new(Direction.x,userInputState == Enum.UserInputState.Begin and -1 or 0,Direction.z)
  964.         end
  965.     end
  966. end
  967.    
  968. game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
  969.     if gameProcessedEvent then return end
  970.     if inputObject.KeyCode == FlySettings.ToggleKey then
  971.         KeyHandler("Toggle", Enum.UserInputState.Begin, inputObject)
  972.     elseif inputObject.KeyCode == FlySettings.ForwardKey then
  973.         KeyHandler("Forward", Enum.UserInputState.Begin, inputObject)
  974.     elseif inputObject.KeyCode == FlySettings.LeftKey then
  975.         KeyHandler("Left", Enum.UserInputState.Begin, inputObject)
  976.     elseif inputObject.KeyCode == FlySettings.BackwardKey then
  977.         KeyHandler("Backward", Enum.UserInputState.Begin, inputObject)
  978.     elseif inputObject.KeyCode == FlySettings.RightKey then
  979.         KeyHandler("Right", Enum.UserInputState.Begin, inputObject)
  980.     elseif inputObject.KeyCode == FlySettings.UpKey then   
  981.         KeyHandler("Up", Enum.UserInputState.Begin, inputObject)
  982.     elseif inputObject.KeyCode == FlySettings.DownKey then
  983.         KeyHandler("Down", Enum.UserInputState.Begin, inputObject)
  984.     elseif inputObject.KeyCode == FlySettings.SprintKey then
  985.         KeyHandler("Sprint", Enum.UserInputState.Begin, inputObject)
  986.     end
  987. end)
  988.    
  989.    
  990. game:GetService("UserInputService").InputEnded:connect(function(inputObject, gameProcessedEvent)
  991.     if inputObject.KeyCode == FlySettings.ForwardKey then
  992.         KeyHandler("Forward", Enum.UserInputState.End, inputObject)
  993.     elseif inputObject.KeyCode == FlySettings.LeftKey then
  994.         KeyHandler("Left", Enum.UserInputState.End, inputObject)
  995.     elseif inputObject.KeyCode == FlySettings.BackwardKey then
  996.         KeyHandler("Backward", Enum.UserInputState.End, inputObject)
  997.     elseif inputObject.KeyCode == FlySettings.RightKey then
  998.         KeyHandler("Right", Enum.UserInputState.End, inputObject)
  999.     elseif inputObject.KeyCode == FlySettings.UpKey then   
  1000.         KeyHandler("Up", Enum.UserInputState.End, inputObject)
  1001.     elseif inputObject.KeyCode == FlySettings.DownKey then
  1002.         KeyHandler("Down", Enum.UserInputState.End, inputObject)
  1003.     elseif inputObject.KeyCode == FlySettings.SprintKey then
  1004.         KeyHandler("Sprint", Enum.UserInputState.End, inputObject)
  1005.     end
  1006. end)
  1007.    
  1008.    
  1009. RunService.RenderStepped:Connect(function()
  1010.     local CanRender = math.abs(tick()-LastRender)
  1011.     if CanRender > 1/Data.Contents.ESPRefreshRate then
  1012.         LastRender = tick()
  1013.         for Type,List in pairs(ESPObjects) do
  1014.             if Data.Contents[Type.."Enabled"] then
  1015.                 for i,v in ipairs(List) do
  1016.                     v:Render()
  1017.                 end
  1018.             end
  1019.         end
  1020.     end
  1021.  
  1022.     if Data.Contents.Nofog and Lighting:FindFirstChild("Atmosphere") then
  1023.         if Lighting.Atmosphere.Density > 0 then
  1024.             OldDensity = Lighting.Atmosphere.Density
  1025.         end
  1026.         Lighting.Atmosphere.Density = 0
  1027.     end
  1028.  
  1029.     if Data.Contents.Fullbright then
  1030.         if Lighting.TimeOfDay ~= "14:00:00" then
  1031.             OldTimeOfDay = Lighting.TimeOfDay
  1032.         end
  1033.         if Lighting.FogEnd ~= 9999 then
  1034.             OldFogEnd = Lighting.FogEnd
  1035.         end
  1036.         if Lighting.Bloom.Intensity ~= 0.1 then
  1037.             OldBloom = Lighting.Bloom.Intensity
  1038.         end
  1039.         Lighting.TimeOfDay = "14:00:00"
  1040.         Lighting.FogEnd = 9999
  1041.         Lighting.Bloom.Intensity = 0.1
  1042.     end
  1043.  
  1044.     if Data.Contents.FlyEnabled and Player.Character and Player.Character:FindFirstChild("HumanoidRootPart")  then
  1045.         for i,v in pairs(Player.Character:GetDescendants()) do
  1046.             if v:IsA("BasePart") then
  1047.                 v.Velocity = Vector3.new(0,0,0)
  1048.             end
  1049.         end
  1050.         local RootPart = game.Players.LocalPlayer.Character.HumanoidRootPart
  1051.         InterpolatedDir = InterpolatedDir:Lerp((Direction * ((Data.Contents.FlySprintBind and UIS:IsKeyDown(Enum.KeyCode[Data.Contents.FlySprintBind])) and Data.Contents.FlySprintSpeed or Data.Contents.FlySpeed)),.2)
  1052.         InterpolatedTilt = Lerp(InterpolatedTilt ,Tilt* ((Data.Contents.FlySprintBind and UIS:IsKeyDown(Enum.KeyCode[Data.Contents.FlySprintBind])) and 2 or 1),Tilt == 0 and .2 or .1)
  1053.         RootPart.CFrame = RootPart.CFrame:Lerp(CFrame.new(RootPart.Position,RootPart.Position + Mouse.UnitRay.Direction) * CFrame.Angles(0,math.rad(00),0) * CFrame.new(InterpolatedDir)  * CFrame.Angles(math.rad(InterpolatedTilt),0,0),.2)
  1054.     end
  1055. end)
  1056.  
  1057. UIS.InputBegan:Connect(function(Input,Busy)
  1058.     if Busy then return end
  1059.     if Data.Contents.MenuToggleBind and Input.KeyCode == Enum.KeyCode[Data.Contents.MenuToggleBind] then
  1060.         MenuHidden = not MenuHidden
  1061.         if MenuHidden then
  1062.             Window:Hide()
  1063.         else
  1064.             Window:Show()
  1065.         end
  1066.     end
  1067. end)
  1068.  
  1069. WindowInst.main.innerMain.tabsHolder:WaitForChild("unnamedtabTab"):Destroy()
  1070. task.wait(.5)
  1071. WindowInst.Enabled = true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement