Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.63 KB | None | 0 0
  1. -- Farewell Infortality.
  2. -- Version: 2.82
  3. -- Instances:
  4. local R2DAProsianHub = Instance.new("ScreenGui")
  5. local Frame = Instance.new("Frame")
  6. local INFJUMP = Instance.new("TextButton")
  7. local NOCLIP = Instance.new("TextButton")
  8. local TextLabel = Instance.new("TextLabel")
  9. local MORTADEXV2 = Instance.new("TextButton")
  10. --Properties:
  11. R2DAProsianHub.Name = "R2DA Prosian Hub"
  12. R2DAProsianHub.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  13. R2DAProsianHub.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  14.  
  15. Frame.Parent = R2DAProsianHub
  16. Frame.BackgroundColor3 = Color3.new(0, 1, 0.415686)
  17. Frame.Size = UDim2.new(0, 291, 0, 285)
  18. Frame.Style = Enum.FrameStyle.RobloxRound
  19.  
  20. INFJUMP.Name = "INFJUMP"
  21. INFJUMP.Parent = Frame
  22. INFJUMP.BackgroundColor3 = Color3.new(0.0823529, 1, 0.156863)
  23. INFJUMP.Position = UDim2.new(0, 0, 0.807017565, 0)
  24. INFJUMP.Size = UDim2.new(0, 90, 0, 50)
  25. INFJUMP.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
  26. INFJUMP.Font = Enum.Font.GothamSemibold
  27. INFJUMP.Text = "Inf Jump"
  28. INFJUMP.TextColor3 = Color3.new(0, 0, 0)
  29. INFJUMP.TextScaled = true
  30. INFJUMP.TextSize = 14
  31. INFJUMP.TextWrapped = true
  32. INFJUMP.MouseButton1Down:connect(function()
  33. -- //~ F to toggle ~\\ --
  34.  
  35. _G.infinjump = true
  36.  
  37. local Player = game:GetService("Players").LocalPlayer
  38. local Mouse = Player:GetMouse()
  39. Mouse.KeyDown:connect(function(k)
  40. if _G.infinjump then
  41. if k:byte() == 32 then
  42. Humanoid = game:GetService("Players").LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
  43. Humanoid:ChangeState("Jumping")
  44. wait(0.1)
  45. Humanoid:ChangeState("Seated")
  46. end
  47. end
  48. end)
  49.  
  50. local Player = game:GetService("Players").LocalPlayer
  51. local Mouse = Player:GetMouse()
  52. Mouse.KeyDown:connect(function(k)
  53. k = k:lower()
  54. if k == "f" then
  55. if _G.infinjump == true then
  56. _G.infinjump = false
  57. else
  58. _G.infinjump = true
  59. end
  60. end
  61. end)
  62. end)
  63.  
  64. NOCLIP.Name = "NOCLIP"
  65. NOCLIP.Parent = Frame
  66. NOCLIP.BackgroundColor3 = Color3.new(0.0823529, 1, 0.156863)
  67. NOCLIP.Position = UDim2.new(0.659793794, 0, 0.807017565, 0)
  68. NOCLIP.Size = UDim2.new(0, 90, 0, 50)
  69. NOCLIP.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
  70. NOCLIP.Font = Enum.Font.GothamSemibold
  71. NOCLIP.Text = "Noclip"
  72. NOCLIP.TextColor3 = Color3.new(0, 0, 0)
  73. NOCLIP.TextScaled = true
  74. NOCLIP.TextSize = 14
  75. NOCLIP.TextWrapped = true
  76. NOCLIP.MouseButton1Down:connect(function()
  77. --This is not my script
  78. wait(2)
  79.  
  80. nam = game.Players.LocalPlayer.Name
  81.  
  82. coroutine.wrap(function()
  83. while wait() do
  84. for a, b in pairs(Workspace[nam]:GetChildren()) do
  85. if b:FindFirstChild('Handle') then
  86. b.Handle.CanCollide = false
  87. end
  88. end
  89. end
  90. end)()
  91.  
  92. Workspace[nam].Humanoid.Changed:connect(function()
  93. Workspace[nam].Humanoid.WalkSpeed = 16
  94. end)
  95.  
  96. game:GetService('Players').LocalPlayer.PlayerGui.ChildAdded:connect(function(asd)
  97. delay(0, function()
  98. if asd.Name ~= 'OutputGUI' then
  99. asd:Destroy()
  100. end
  101. end)
  102. end)
  103.  
  104. game:GetService('RunService').Stepped:connect(function()
  105. Workspace[nam].Torso.CanCollide = false
  106. Workspace[nam].Head.CanCollide = false
  107. end)
  108.  
  109. Workspace[nam].Torso.Changed:connect(function()
  110. Workspace[nam].Torso.CanCollide = false
  111. Workspace[nam].Head.CanCollide = false
  112. end)
  113. end)
  114.  
  115. TextLabel.Parent = Frame
  116. TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  117. TextLabel.BackgroundTransparency = 1
  118. TextLabel.BorderColor3 = Color3.new(1, 1, 1)
  119. TextLabel.BorderSizePixel = 0
  120. TextLabel.Position = UDim2.new(0.0549828187, 0, -0.00544167263, 0)
  121. TextLabel.Size = UDim2.new(0, 242, 0, 50)
  122. TextLabel.Font = Enum.Font.GothamSemibold
  123. TextLabel.Text = "Prosian R2DA Hub"
  124. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  125. TextLabel.TextScaled = true
  126. TextLabel.TextSize = 14
  127. TextLabel.TextWrapped = true
  128.  
  129.  
  130. MORTADEXV2.Name = "MORTADEXV2"
  131. MORTADEXV2.Parent = Frame
  132. MORTADEXV2.BackgroundColor3 = Color3.new(0.0823529, 1, 0.156863)
  133. MORTADEXV2.Position = UDim2.new(0.0103092603, 0, 0.210526347, 0)
  134. MORTADEXV2.Size = UDim2.new(0, 90, 0, 50)
  135. MORTADEXV2.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
  136. MORTADEXV2.Font = Enum.Font.GothamSemibold
  137. MORTADEXV2.Text = "Mortadex"
  138. MORTADEXV2.TextColor3 = Color3.new(0, 0, 0)
  139. MORTADEXV2.TextScaled = true
  140. MORTADEXV2.TextSize = 14
  141. MORTADEXV2.TextWrapped = true
  142. MORTADEXV2.MouseButton1Down:connect(function()
  143. -- MORTADEX
  144. -- WRITTEN BY LOUKA @ V3RMILLION
  145. -- DON'T JEW THE LOCALSCRIPT IF YOU DON'T KNOW HOW TO SCRIPT
  146.  
  147. local Mortadex = {}
  148. Mortadex.Version = "1"
  149. Mortadex.Modules = {}
  150. Mortadex.ModuleCount = 0
  151. Mortadex.ModuleSelection = 1
  152.  
  153. Mortadex.Stealth = true -- this will just remove print messages
  154. Mortadex.Debug = false
  155. Mortadex.FreeForAll = false
  156. Mortadex.Studio = false
  157.  
  158. function Mortadex:RegisterModule(name, onrender, norender)
  159. if Mortadex.Modules[name] then
  160. return error("Module \""..name.."\" already registered!")
  161. else
  162. Mortadex:FLog("Registering module \"%s\"", name)
  163. Mortadex.Modules[name] = {OnRender = onrender, NoRender = norender, Scratchpad = {}, Enabled = false, Order = Mortadex.ModuleCount}
  164. Mortadex.ModuleCount = Mortadex.ModuleCount + 1
  165. end
  166. end
  167.  
  168. function Mortadex:Log(...)
  169. if Mortadex.Stealth then return end
  170. return print("[- MORTADEX -] ", ...)
  171. end
  172.  
  173. function Mortadex:FLog(o, ...)
  174. return Mortadex:Log(o:format(...))
  175. end
  176.  
  177. local getrawmetatable = getrawmetatable
  178.  
  179. ---------------------------------------------------------------
  180.  
  181. Mortadex:Log("Loading core utilities...")
  182.  
  183. Mortadex.HookManager = {IdxHooks = {}, NIdxHooks = {}}
  184. Mortadex.Utilities = {}
  185. Mortadex.Services = {
  186. Players = game:GetService("Players"),
  187. Lighting = game:GetService("Lighting"),
  188. RunService = game:GetService("RunService"),
  189. UserInputService = game:GetService("UserInputService")
  190. }
  191. Mortadex.Instances = {
  192. LocalPlayer = Mortadex.Services.Players.LocalPlayer,
  193. LocalCharacter = Mortadex.Services.Players.LocalPlayer.Character,
  194. LocalCamera = workspace.CurrentCamera,
  195. LocalMouse = Mortadex.Services.Players.LocalPlayer:GetMouse()
  196. }
  197.  
  198. function Mortadex.HookManager:Init()
  199. if getrawmetatable then
  200. local ObjectMt = getrawmetatable(game)
  201. Mortadex.OriginalIndex = ObjectMt.__index
  202. Mortadex.OriginalNewIndex = ObjectMt.__newindex
  203.  
  204. ObjectMt.__index = function(self, key)
  205. local Hook = Mortadex.HookManager:LookupIndexHook(self, key)
  206. if Hook then
  207. return Hook(self)
  208. else
  209. return Mortadex.OriginalIndex(self, key)
  210. end
  211. end
  212.  
  213. ObjectMt.__newindex = function(self, key, value)
  214. local Hook = Mortadex.HookManager:LookupNewIndexHook(self, key)
  215. if Hook then
  216. return Hook(self, value)
  217. else
  218. return Mortadex.OriginalNewIndex(self, key, value)
  219. end
  220. end
  221.  
  222. return true
  223. end
  224. end
  225.  
  226. function Mortadex.HookManager:LookupIndexHook(inst, key)
  227. for _, Hook in next, Mortadex.HookManager.IdxHooks do
  228. if Mortadex.OriginalIndex(inst, "IsA")(inst, Hook.AffectedClass) and Hook.Property == key then
  229. return Hook.HookFunction
  230. end
  231. end
  232. end
  233.  
  234. function Mortadex.HookManager:LookupNewIndexHook(inst, key)
  235. for _, Hook in next, Mortadex.HookManager.NIdxHooks do
  236. if Mortadex.OriginalIndex(inst, "IsA")(inst, Hook.AffectedClass) and Hook.Property == key then
  237. return Hook.HookFunction
  238. end
  239. end
  240. end
  241.  
  242. function Mortadex.HookManager:HookIndex(class, prop, f)
  243. return table.insert(Mortadex.HookManager.IdxHooks, {AffectedClass = class, Property = prop, HookFunction = f})
  244. end
  245.  
  246. function Mortadex.HookManager:HookNewIndex(class, prop, f)
  247. return table.insert(Mortadex.HookManager.NIdxHooks, {AffectedClass = class, Property = prop, HookFunction = f})
  248. end
  249.  
  250. function Mortadex.Utilities:WorldToScreenPoint(...)
  251. return Mortadex.Instances.LocalCamera:WorldToScreenPoint(...)
  252. end
  253.  
  254. function Mortadex.Utilities:PathObstructed(p1, p2, ...)
  255. local ray = Ray.new(p1, (p2 - p1).unit * 500)
  256. local haspart, hitpos = workspace:FindPartOnRayWithIgnoreList(ray, {...})
  257. if haspart then return true, hitpos else return false end
  258. end
  259.  
  260. function Mortadex.Utilities:GetReplicator()
  261. return game:FindFirstChild("ClientReplicator", true)
  262. end
  263.  
  264. function Mortadex.Utilities:GetSize(i)
  265. if i:IsA("BasePart") then
  266. return i.Size
  267. elseif i:IsA("Model") then
  268. return i:GetExtentsSize()
  269. end
  270. end
  271.  
  272. function Mortadex.Utilities:GetPlayers(mode)
  273. local Result = {}
  274. for _,player in next, Mortadex.Services.Players:GetPlayers() do
  275. if mode == 0 then -- exclude players in current team
  276. if (player ~= Mortadex.Instances.LocalPlayer and (Mortadex.Instances.LocalPlayer.TeamColor ~= player.TeamColor or (FreeForAll or DEBUG))) then
  277. table.insert(Result, player)
  278. end
  279. else -- include everyone
  280. table.insert(Result, player)
  281. end
  282. end
  283. return Result
  284. end
  285.  
  286. function Mortadex.Utilities:GetNearestPlayer()
  287. if not Mortadex.Instances.LocalPlayer.Character then return end
  288. local Players = Mortadex.Utilities:GetPlayers(0)
  289. local SelectedPlayer, SelectedPlayerPrevDistance = nil, 25000
  290. for i,v in next, Players do
  291. if v.Character and v.Character:FindFirstChild("HumanoidRootPart") then
  292. local Distance = Mortadex.Utilities:GetDistance(Mortadex.Instances.LocalPlayer.Character.HumanoidRootPart.Position, v.Character.HumanoidRootPart.Position)
  293. if Distance < SelectedPlayerPrevDistance then
  294. SelectedPlayer = v
  295. SelectedPlayerPrevDistance = Distance
  296. end
  297. end
  298. end
  299. return SelectedPlayer
  300. end
  301.  
  302. function Mortadex.Utilities:GetDistance(v1, v2)
  303. return (v1 - v2).magnitude
  304. end
  305.  
  306. function Mortadex.Utilities:GetCanvas()
  307. if not Mortadex.Canvas then
  308. if getrawmetatable then
  309. Mortadex.Canvas = Instance.new("ScreenGui", game:GetService("CoreGui"))
  310. else
  311. Mortadex.Canvas = Instance.new("ScreenGui", Mortadex.Services.Players.LocalPlayer.PlayerGui)
  312. end
  313. end
  314. return Mortadex.Canvas
  315. end
  316.  
  317. Mortadex.EmptyVector3 = Vector3.new()
  318. Mortadex.EmptyCFrame = CFrame.new()
  319.  
  320. ---------------------------------------------------------------
  321.  
  322. --> ESP
  323. Mortadex:RegisterModule("ESP", function(Storage)
  324. local Canvas = Mortadex.Utilities:GetCanvas()
  325. local Root = Canvas:FindFirstChild("ESP")
  326. if not Root then
  327. Root = Instance.new("Frame")
  328. Root.Name = "ESP"
  329. Root.Size = UDim2.new(1, 0, 1, 0)
  330. Root.BackgroundTransparency = 1
  331. end
  332.  
  333. Root:ClearAllChildren()
  334. for _, Player in next, Mortadex.Utilities:GetPlayers(0) do
  335. if Player.Character and Player.Character:FindFirstChild("Torso") then
  336. local Locator = Instance.new("Frame")
  337. Locator.BackgroundColor = Player.TeamColor
  338. Locator.BackgroundTransparency = .5
  339. local VPos, VVis = Mortadex.Utilities:WorldToScreenPoint(Player.Character.Torso.Position)
  340. if VVis then
  341. Locator.Size = UDim2.new(0, -2800 / VPos.z, 0, -4300 / VPos.z)
  342. Locator.Position = UDim2.new(0, VPos.x - Locator.Size.X.Offset / 2, 0, VPos.y - Locator.Size.Y.Offset / 2)
  343. local Name = Instance.new("TextLabel")
  344. Name.TextColor3 = Color3.new(1,1,1)
  345. Name.Size = UDim2.new(1,0,0, Locator.Size.Y.Offset / 5)
  346. Name.BackgroundTransparency = 1
  347. Name.TextScaled = true
  348. Name.FontSize = 'Size24'
  349. Name.Text = Player.Name
  350. Name.TextStrokeTransparency = .3
  351. Name.Font = 'SourceSansLight'
  352. Name.TextXAlignment = 'Left'
  353. Name.Parent = Locator
  354. Locator.Parent = Root
  355. else
  356. Locator:Destroy()
  357. end
  358. end
  359. end
  360.  
  361. if not Root.Parent then
  362. Root.Parent = Canvas
  363. end
  364. end)
  365.  
  366. --> FreeForAll
  367. Mortadex:RegisterModule("FreeForAll", function(Storage)
  368. FreeForAll = true
  369. end, function(Storage) FreeForAll = false end)
  370.  
  371. --> Chams
  372. Mortadex:RegisterModule("Chams", function(Storage)
  373. for i, Cham in next, Storage do
  374. if Cham.Name:find("Cham") then
  375. Cham:Destroy()
  376. Storage[i] = nil
  377. end
  378. end
  379.  
  380. for _, Player in next, Mortadex.Utilities:GetPlayers(0) do
  381. if Player.Character and Player.Character:FindFirstChild("Torso") then
  382. for _, Part in next, Player.Character:GetChildren() do
  383. if Part:IsA("PVInstance") then
  384. local Box = Instance.new("BoxHandleAdornment")
  385. Box.Size = Mortadex.Utilities:GetSize(Part) + Vector3.new(.2, .2, .2)
  386. Box.Name = "Cham" .. Player.Name
  387. Box.Color3 = Player.TeamColor.Color
  388. Box.Adornee = Part
  389. Box.AlwaysOnTop = true
  390. Box.ZIndex = 5
  391. Box.Transparency = .1
  392. table.insert(Storage, Box)
  393. Box.Parent = Mortadex.Utilities:GetCanvas()
  394. end
  395. end
  396. end
  397. end
  398. end)
  399.  
  400. --> LagSwitch
  401. Mortadex:RegisterModule("LagSwitch", function(Storage)
  402. if not Storage.State then
  403. Storage.State = true
  404. local Replicator = Mortadex.Utilities:GetReplicator()
  405. if Replicator then
  406. Replicator:DisableProcessPackets()
  407. end
  408. end
  409. end,
  410.  
  411. function(Storage)
  412. if Storage.State then
  413. Storage.State = false
  414. local Replicator = Mortadex.Utilities:GetReplicator()
  415. if Replicator then
  416. Replicator:EnableProcessPackets()
  417. end
  418. end
  419. end)
  420.  
  421. --> IronSight
  422. Mortadex:RegisterModule("IronSight", function(Storage)
  423. local Sight = Instance.new("Frame")
  424. Sight.Size = UDim2.new(0, 5, 0, 5)
  425. Sight.BackgroundTransparency = .5
  426. Sight.BackgroundColor3 = Color3.new(1, 1, 1)
  427. Sight.Position = UDim2.new(0, Mortadex.Instances.LocalMouse.X, 0, Mortadex.Instances.LocalMouse.Y)
  428. Sight.Parent = Mortadex.Utilities:GetCanvas()
  429. end)
  430.  
  431. --> KnifeMaster
  432. Mortadex:RegisterModule("KnifeMaster", function(Storage)
  433. if not Mortadex.Instances.LocalPlayer.Character then
  434. return
  435. end
  436. local Pl = Mortadex.Utilities:GetNearestPlayer()
  437. if Pl and Pl.Character and Mortadex.Utilities:GetDistance(Pl.Character.Torso.Position, Mortadex.Instances.LocalPlayer.Character.HumanoidRootPart.Position) < 150 then
  438. Mortadex.Instances.LocalPlayer.Character.HumanoidRootPart.CFrame = Pl.Character.Torso.CFrame * CFrame.new(0,0,3)
  439. end
  440. end)
  441.  
  442. --> BigHead
  443. Mortadex:RegisterModule("BigHead", function(Storage)
  444. for _, v in next, Mortadex.Utilities:GetPlayers(0) do
  445. if v.Character then
  446. if not Storage[v.Name] then
  447. Storage[v.Name] = { v.Character.Head.Size, v.Character.Head.CFrame }
  448. end
  449. v.Character.Head.CanCollide = false
  450. v.Character.Head.Size = Vector3.new(40, 40, 40)
  451. v.Character.Head.CFrame = v.Character.Torso.CFrame * CFrame.new(0, 20, 0)
  452. v.Character.Head.Transparency = .3
  453. end
  454. end
  455. end,
  456.  
  457. function(Storage)
  458. if not Storage.NormalSize then
  459. Storage.NormalSize = Vector3.new(2, 1, 1)
  460. end
  461.  
  462. for _, v in next, Mortadex.Utilities:GetPlayers(0) do
  463. if v.Character then
  464. v.Character.Head.CanCollide = true
  465. v.Character.Head.Size = Storage.NormalSize
  466. end
  467. end
  468. end)
  469.  
  470. ---------------------------------------------------------------
  471.  
  472. Mortadex:Log("Loading UI...")
  473.  
  474. function Mortadex:CreateWindow(name, size, timed_close, tween)
  475. local TopBar = Instance.new("TextLabel")
  476. TopBar.Name = "NO_CLEAR"
  477. TopBar.Size = UDim2.new(size.X.Scale, size.X.Offset, 0, 20)
  478. TopBar.BorderSizePixel = 0
  479. TopBar.BackgroundColor3 = Color3.new(1, 0, 0)
  480. TopBar.Text = name
  481. TopBar.TextXAlignment = Enum.TextXAlignment.Left
  482. TopBar.TextScaled = true
  483. TopBar.Font = Enum.Font.Code
  484. TopBar.TextColor3 = Color3.new(0, 0, 0)
  485. TopBar.Position = UDim2.new(.5, -(size.X.Offset/2), .5, -(size.Y.Offset/2))
  486. TopBar.Draggable = true
  487. TopBar.Active = true
  488.  
  489. local Window = Instance.new("Frame")
  490. Window.Name = "Content"
  491. Window.Size = size
  492. Window.BackgroundColor3 = Color3.new(0, 0, 0)
  493. Window.Position = UDim2.new(0, 0, 0, 20)
  494. Window.BackgroundTransparency = .3
  495. Window.BorderSizePixel = 0
  496.  
  497. if not timed_close then
  498. local CloseBtn = Instance.new("TextButton", TopBar)
  499. CloseBtn.Position = UDim2.new(1, -20, 0, 0)
  500. CloseBtn.Size = UDim2.new(0, 20, 1, 0)
  501. CloseBtn.BorderSizePixel = 0
  502. CloseBtn.Name = "CloseBtn"
  503. CloseBtn.BackgroundColor3 = Color3.new(0,0,0)
  504. CloseBtn.TextColor3 = Color3.new(1, 0, 0)
  505. CloseBtn.Text = "X"
  506. CloseBtn.MouseButton1Click:connect(function()
  507. TopBar:Destroy()
  508. end)
  509. else
  510. local Countdown = Instance.new("TextLabel", TopBar)
  511. Countdown.Position = UDim2.new(1, -20, 0, 0)
  512. Countdown.Size = UDim2.new(0, 20, 1, 0)
  513. Countdown.BackgroundTransparency = 1
  514. Countdown.TextColor3 = Color3.new(0, 0, 0)
  515. Countdown.Text = tostring(timed_close)
  516. local BackPos
  517. if tween then
  518. BackPos = TopBar.Position
  519. TopBar.Position = UDim2.new(.5, -(size.X.Offset/2), 1, 0)
  520. end
  521. spawn(function()
  522. if tween then
  523. TopBar:TweenPosition(BackPos, "Out", "Quad", .3, true)
  524. end
  525. for i = timed_close-1, 0, -1 do
  526. wait(1)
  527. Countdown.Text = tostring(i)
  528. end
  529. if not tween then
  530. TopBar:Destroy()
  531. else
  532. TopBar:TweenPosition(UDim2.new(.5, -(size.X.Offset/2), 1, 0), "Out", "Sine", .3, true)
  533. wait(.3)
  534. TopBar:Destroy()
  535. end
  536. end)
  537. end
  538.  
  539. Window.Parent = TopBar
  540. TopBar.Parent = Mortadex.Utilities:GetCanvas()
  541. return TopBar
  542. end
  543.  
  544.  
  545. ---------------------------------------------------------------
  546.  
  547. if not script then script = Instance.new("LocalScript") end
  548. Mortadex.UpvalScript = script
  549.  
  550. Mortadex:Log("Hooking functions...")
  551. Mortadex.HookManager:Init()
  552. Mortadex.HookManager:HookIndex("Player", "Kick", error)
  553. Mortadex.HookManager:HookIndex("BasePart", "Size", function(Part)
  554. local caller_env = getfenv(1)
  555. if caller_env.script ~= Mortadex.UpvalScript and caller_env.script.ClassName ~= "CoreScript" then
  556. if Part.Name == "Head" then
  557. return Mortadex.EmptyVector3
  558. end
  559. end
  560. return Mortadex.OriginalIndex(Part, "Size")
  561. end)
  562.  
  563. Mortadex.HookManager:HookIndex("BasePart", "CFrame", function(Part)
  564. local caller_env = getfenv(1)
  565. if caller_env.script ~= Mortadex.UpvalScript and caller_env.script.ClassName ~= "CoreScript" then
  566. if Part.Name == "Head" then
  567. return Mortadex.EmptyCFrame
  568. end
  569. end
  570. return Mortadex.OriginalIndex(Part, "CFrame")
  571. end)
  572.  
  573. Mortadex.HookManager:HookIndex("BasePart", "Transparency", function(Part)
  574. local caller_env = getfenv(1)
  575. if caller_env.script ~= Mortadex.UpvalScript and caller_env.script.ClassName ~= "CoreScript" then
  576. if Part.Name == "Head" then
  577. return 0
  578. end
  579. end
  580. return Mortadex.OriginalIndex(Part, "Transparency")
  581. end)
  582.  
  583. Mortadex:Log("Creating menu...")
  584. Mortadex.SelectionMenu = Mortadex:CreateWindow("Mortadex v"..Mortadex.Version, UDim2.new(0, 250, 0, 20 * Mortadex.ModuleCount))
  585. Mortadex.SelectionMenu.Position = UDim2.new(0, 10, 0, 10)
  586. Mortadex.SelectionMenu.CloseBtn:Destroy()
  587.  
  588. for ModuleName, Module in next, Mortadex.Modules do
  589. local Entry = Instance.new("TextLabel")
  590. Entry.BackgroundTransparency = 1
  591. Entry.BackgroundColor3 = Color3.new(1,1,1)
  592. Entry.TextColor3 = Color3.new(1, 1, 1)
  593. Entry.TextScaled = true
  594. Entry.Font = "Code"
  595. Entry.TextXAlignment = "Left"
  596. Entry.Text = ModuleName
  597. Entry.Position = UDim2.new(0, 0, 0, 20 * Module.Order)
  598. Entry.Size = UDim2.new(1, 0, 0, 20)
  599. Entry.Name = tostring(Module.Order)
  600. Entry.Parent = Mortadex.SelectionMenu.Content
  601. Entry.BorderSizePixel = 0
  602.  
  603. local Status = Instance.new("Frame")
  604. Status.BorderSizePixel = 0
  605. Status.BackgroundColor3 = Color3.new(1, 0, 0)
  606. Status.Size = UDim2.new(0, 5, 0, 5)
  607. Status.Position = UDim2.new(1, -10, 0, 8)
  608. Status.Name = "Status"
  609. Status.Parent = Entry
  610. end
  611.  
  612. Mortadex:Log("Connecting UI renderer...")
  613. Mortadex.Services.RunService:BindToRenderStep("Mortadex", Enum.RenderPriority.Last.Value + 1, function()
  614. for _, Object in next, Mortadex.Utilities:GetCanvas():GetChildren() do
  615. if not Object.Name:find("NO_CLEAR") then
  616. Object:Destroy()
  617. end
  618. end
  619.  
  620. for i, Module in next, Mortadex.Modules do
  621. if Module.Enabled and Module.OnRender then
  622. local Success, ErrMsg = pcall(Module.OnRender, Module.Scratchpad)
  623. if not Success then
  624. Mortadex:FLog("Panic during execution of \"%s\"::OnRender: %s", i, ErrMsg)
  625. end
  626. elseif not Module.Enabled and Module.NoRender then
  627. local Success, ErrMsg = pcall(Module.NoRender, Module.Scratchpad)
  628. if not Success then
  629. Mortadex:FLog("Panic during execution of \"%s\"::NoRender: %s", i, ErrMsg)
  630. end
  631. end
  632. end
  633. end)
  634.  
  635. Mortadex:Log("Attaching controls...")
  636. Mortadex.Services.UserInputService.InputBegan:connect(function(InputObject)
  637. local PreviousSelection = Mortadex.SelectionMenu.Content:FindFirstChild(tostring(Mortadex.ModuleSelection))
  638. if PreviousSelection then
  639. PreviousSelection.BackgroundTransparency = 1
  640. PreviousSelection.TextColor3 = Color3.new(1, 1, 1)
  641. end
  642. if InputObject.KeyCode.Name == "J" then
  643. Mortadex.ModuleSelection = Mortadex.ModuleSelection - 1
  644. if Mortadex.ModuleSelection < 0 then
  645. Mortadex.ModuleSelection = Mortadex.ModuleCount - 1
  646. end
  647. elseif InputObject.KeyCode.Name == "K" then
  648. Mortadex.ModuleSelection = Mortadex.ModuleSelection + 1
  649. if Mortadex.ModuleSelection > Mortadex.ModuleCount-1 then
  650. Mortadex.ModuleSelection = 0
  651. end
  652. elseif InputObject.KeyCode.Name == "L" then
  653. local EntryLabel = Mortadex.SelectionMenu.Content:FindFirstChild(tostring(Mortadex.ModuleSelection))
  654. if EntryLabel then
  655. local ModuleEntry = Mortadex.Modules[EntryLabel.Text]
  656. if ModuleEntry then
  657. ModuleEntry.Enabled = not ModuleEntry.Enabled
  658. if ModuleEntry.Enabled then
  659. EntryLabel.Status.BackgroundColor3 = Color3.new(0, 1, 0)
  660. else
  661. EntryLabel.Status.BackgroundColor3 = Color3.new(1, 0, 0)
  662. end
  663. end
  664. end
  665. elseif InputObject.KeyCode.Name == "P" then
  666. Mortadex.SelectionMenu.Position = UDim2.new(1, -270, 0, 10)
  667. end
  668. local EntryLabel = Mortadex.SelectionMenu.Content:FindFirstChild(tostring(Mortadex.ModuleSelection))
  669. if EntryLabel then
  670. EntryLabel.BackgroundTransparency = .3
  671. EntryLabel.TextColor3 = Color3.new(0, 0, 0)
  672. end
  673. end)
  674.  
  675. Mortadex:Log("Finishing up...")
  676. local IntroWindow = Mortadex:CreateWindow("Mortadex", UDim2.new(0, 350, 0, 200), 5, true)
  677. local IntroLabel = Instance.new("TextLabel")
  678. IntroLabel.Font = "Code"
  679. IntroLabel.TextWrapped = true
  680. IntroLabel.FontSize = "Size24"
  681. IntroLabel.TextColor3 = Color3.new(1, 1, 1)
  682. IntroLabel.BackgroundTransparency = 1
  683. IntroLabel.Text = "Welcome to Mortadex! If you need to change the menu's placement, simply drag the window around the screen. Press P to dock the window to the right side of the screen in case the chat blocks the menu."
  684. IntroLabel.Parent = IntroWindow.Content
  685. IntroLabel.Size = UDim2.new(1, 0, 1, 0)
  686.  
  687. Mortadex:Log("Initialization complete!")
  688. end)
  689. -- Scripts:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement