Advertisement
plytalent

Script

Feb 27th, 2022 (edited)
1,149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 15.21 KB | None | 0 0
  1. local DrawUI = loadstring(game:HttpGet("https://pastebin.com/raw/yUiWjGmT"))()
  2. local httpservice = game:GetService("HttpService")
  3. local speedlabel = DrawUI:synTextLabel()
  4. DrawUI:MakeDraggable(speedlabel)
  5. local UnderCover = false
  6. local readf = function(fname)
  7.     if readfile then
  8.         if isfile then
  9.             if isfile(fname) then
  10.                 return readfile(fname)
  11.             end
  12.         end
  13.     end
  14.     return ""
  15. end
  16. local writef = writefile or function() end
  17. local protective_call_wrapper = function(real, err)
  18.     local err = err or rconsoleinfo
  19.     if typeof(err) == "function" then
  20.         err = rconsoleinfo
  21.     end
  22.     if type(real) == "function" then
  23.         local fake = function(...)
  24.             local args = {...}
  25.             local s,e_res = pcall(function()
  26.                 return {real(unpack(args))}
  27.             end)
  28.             if not s then
  29.                 if err then
  30.                     err("ERROR: "..tostring(e_res)) -- EXTERNAL CONSOLE
  31.                 end
  32.             else
  33.                 return unpack(e_res)
  34.             end
  35.         end
  36.         return fake
  37.     end
  38.     return real
  39. end
  40. local config = {
  41.     ["NoClip"]={
  42.         Options = {
  43.             Enabled = false
  44.         }
  45.     },
  46.     ["ManaRun"]={
  47.         Options = {
  48.             Enabled = false,
  49.             speed = 2.75,
  50.         }
  51.     },
  52.     ["ManaFly"] = {
  53.         Options = {
  54.             Enabled = false,
  55.             speed = 0,
  56.         }
  57.     },
  58.     ["NoFall"] = {
  59.         Options = {
  60.             Enabled = false,
  61.             speed = 0,
  62.             CFrameOffset = 3.5,
  63.         }
  64.     }
  65. }
  66. local json_data = readf("ManaStuff.Json")
  67. if json_data ~= "" then
  68.     config = httpservice:JSONDecode(json_data)
  69. else
  70.     local JSONData = httpservice:JSONEncode(config)
  71.     writef("ManaStuff.Json", JSONData)
  72. end
  73.  
  74. local Noclip = (function()
  75.     --// Variables
  76.     local module = {}
  77.     local RunService = game:GetService("RunService")
  78.     local Players = game:GetService("Players")
  79.     local Player = Players.LocalPlayer
  80.     local MANAFLY = nil
  81.     module = config.NoClip
  82.     function module:Enable()
  83.         module.Options.Enabled = true
  84.     end
  85.     function module:Disable()
  86.         module.Options.Enabled = false
  87.         Player.Character.HumanoidRootPart.CanCollide=true
  88.     end
  89.     RunService.Stepped:Connect(function()
  90.         if module.Options.Enabled then
  91.             if Player.Character then
  92.                 for _,v in pairs(Player.Character:GetDescendants())do
  93.                     if v:IsA("BasePart") then
  94.                         v.CanCollide =  false
  95.                     end
  96.                 end
  97.             end
  98.         end
  99.     end)
  100.     return module
  101. end)()
  102.  
  103. local ManaRun= (function()
  104.     --// Variables
  105.     local module = {}
  106.     local RunService = game:GetService("RunService")
  107.     local UIS = game:GetService("UserInputService")
  108.     local Players = game:GetService("Players")
  109.     local Player = Players.LocalPlayer
  110.     local framelimit = 60
  111.     local localposition = CFrame.new()
  112.     local delta = tick()
  113.     local delta2 = tick()
  114.     local leftorright,backorforward = 0,0
  115.     local targetCF
  116.     module = config.ManaRun
  117.     function module:Enable()
  118.         module.Options.Enabled = true
  119.         leftorright,backorforward = 0,0
  120.         if UIS:IsKeyDown(Enum.KeyCode.S) then
  121.             backorforward = backorforward + module.Options.speed
  122.         end
  123.         if UIS:IsKeyDown(Enum.KeyCode.W) then
  124.             backorforward = backorforward - module.Options.speed
  125.         end
  126.         if UIS:IsKeyDown(Enum.KeyCode.D) then
  127.             leftorright = leftorright + module.Options.speed
  128.         end
  129.         if UIS:IsKeyDown(Enum.KeyCode.A) then
  130.             leftorright = leftorright - module.Options.speed
  131.         end
  132.     end
  133.     function module:Disable()
  134.         module.Options.Enabled = false
  135.         leftorright, backorforward = 0,0
  136.     end
  137.     function module:SpeedChange()
  138.         if leftorright ~= 0 then
  139.             if leftorright > 0 then
  140.                 leftorright = module.Options.speed
  141.             else
  142.                 leftorright = -module.Options.speed
  143.             end
  144.         end
  145.         if backorforward ~= 0 then
  146.             if backorforward > 0 then
  147.                 backorforward = module.Options.speed
  148.             else
  149.                 backorforward = -module.Options.speed
  150.             end
  151.         end
  152.     end
  153.     RunService.Stepped:Connect(function()
  154.         if targetCF and module.Options.Enabled and Player.Character and (tick()-delta2) >= 1/60 then
  155.             delta2 = tick()
  156.             targetCF = workspace.CurrentCamera.CFrame
  157.             local rx,ry,rz = targetCF:ToOrientation()
  158.             -- NewCF = Player Character Position + Camera Angles + Speed
  159.             targetCF = (CFrame.new(Player.Character:GetPrimaryPartCFrame().p)*CFrame.Angles(0,ry,0)) * CFrame.new(leftorright,0,backorforward)
  160.             Player.Character:SetPrimaryPartCFrame(targetCF)
  161.         end
  162.     end)
  163.     RunService:BindToRenderStep("MANARUN",199,function()
  164.         if module.Options.Enabled and Player.Character then
  165.             if (tick()-delta) >= 1/60 then
  166.                 delta = tick()
  167.                 targetCF = workspace.CurrentCamera.CFrame
  168.                 local rx,ry,rz = targetCF:ToOrientation()
  169.                 targetCF = (CFrame.new(Player.Character:GetPrimaryPartCFrame().p)*CFrame.Angles(0,ry,0)) * CFrame.new(leftorright,0,backorforward)
  170.                 Player.Character:SetPrimaryPartCFrame(targetCF)
  171.             end
  172.         end
  173.     end)
  174.     Player:GetMouse().KeyDown:Connect(function(k)
  175.         if k == "w" then
  176.             backorforward = backorforward - module.Options.speed
  177.         elseif k == "s" then
  178.             backorforward = backorforward + module.Options.speed
  179.         elseif k == "a" then
  180.             leftorright = leftorright - module.Options.speed
  181.         elseif k == "d" then
  182.             leftorright = leftorright + module.Options.speed
  183.         end
  184.     end)
  185.     Player:GetMouse().KeyUp:Connect(function(k)
  186.         if k == "w" then
  187.             backorforward = backorforward + module.Options.speed
  188.         elseif k == "s" then
  189.             backorforward = backorforward - module.Options.speed
  190.         elseif k == "a" then
  191.             leftorright = leftorright + module.Options.speed
  192.         elseif k == "d" then
  193.             leftorright = leftorright - module.Options.speed
  194.         end
  195.     end)
  196.     return module
  197. end)()
  198. local NOFALL
  199. if game.PlaceId == 6032399813 or game.PlaceId == 5735553160 or game.PlaceId == 8668476218 then
  200.     --[[
  201.     NOFALL = (function()
  202.         module = config.NoFall
  203.         module.original = nil
  204.             module.newnamecall = newcclosure(function(remote, ...)
  205.                 if typeof(remote) == "Instance" and not checkcaller() then
  206.                     local args = { ... }
  207.                     local methodName = getnamecallmethod()
  208.                     local validInstance, remoteName = pcall(function()
  209.                         return remote.Name
  210.                     end)
  211.                     if module.Options.Enabled and validInstance and (methodName == "FireServer" or methodName == "fireServer" or methodName == "InvokeServer" or methodName == "invokeServer") and remoteName:find("ArchMageOwO") and #args == 2 and typeof(args[1]) == "number" and typeof(args[2]) == "boolean" then
  212.                         return nil
  213.                     else
  214.                         return module.original(remote, ...)
  215.                     end
  216.                 end
  217.                 return module.original(remote, ...)
  218.             end, module.original)
  219.             if hookmetamethod then
  220.                 module.oldNamecall = hookmetamethod(game, "__namecall", module.newnamecall)
  221.                 module.original = module.original or function(...)
  222.                     return module.oldNamecall(...)
  223.                 end
  224.             else
  225.                 module.gm = module.gm or getrawmetatable(game)
  226.                 module.original = module.original or function(...)
  227.                     return module.gm.__namecall(...)
  228.                 end
  229.                 setreadonly(module.gm, false)
  230.                 if not module.original then
  231.                     setreadonly(module.gm, true)
  232.                     return
  233.                 end
  234.                 module.gm.__namecall = module.newnamecall
  235.                 setreadonly(module.gm, true)
  236.             end
  237.         function module:Enable()
  238.             module.Options.Enabled = true
  239.         end
  240.         function module:Disable()
  241.             module.Options.Enabled = false
  242.         end
  243.         module:Enable()
  244.         return module
  245.     end)()
  246. --]]
  247. end
  248. local ManaFly = (function()
  249.     local tweenservice = game:GetService("TweenService")
  250.     local module = {}
  251.     local MANAFLY
  252.     local RunService = game:GetService("RunService")
  253.     local Players = game:GetService("Players")
  254.     local Player = Players.LocalPlayer
  255.     local x,y,z = 0,0,0
  256.     module = config.ManaFly
  257.     function module:Enable()
  258.         MANAFLY = Player.Character:GetPrimaryPartCFrame()
  259.         module.Options.Enabled = true
  260.         x,y,z = 0,0,0
  261.     end
  262.     function module:Disable()
  263.         module.Options.Enabled = false
  264.         x,y,z = 0,0,0
  265.     end
  266.     function module:SpeedChange(Speed)
  267.         if z > 0 then
  268.             z = Speed
  269.         elseif z < 0 then
  270.             z = -Speed
  271.         end
  272.         if y > 0 then
  273.             y = Speed
  274.         elseif y < 0 then
  275.             y = -Speed
  276.         end
  277.         if x > 0 then
  278.             x = Speed
  279.         elseif x < 0 then
  280.             x = -Speed
  281.         end
  282.     end
  283.     local bodyvelocity,bodygyro
  284.     Player:GetMouse().KeyDown:Connect(function(k)
  285.         if not module.Options.Enabled then return end
  286.         if k == "w" then
  287.             x = x - module.Options.speed
  288.         elseif k == "s" then
  289.             x = x + module.Options.speed
  290.         elseif k == "a" then
  291.             z = z - module.Options.speed
  292.         elseif k == "d" then
  293.             z = z + module.Options.speed
  294.         elseif k == module.Options.Down then
  295.             y = y - module.Options.speed
  296.         elseif k == module.Options.Up then
  297.             y = y + module.Options.speed
  298.         end
  299.         --rconsoleinfo("ManaFly: X: "..tostring(x).." Y: "..tostring(y).." Z: "..tostring(z))
  300.     end)
  301.     Player:GetMouse().KeyUp:Connect(function(k)
  302.         if not module.Options.Enabled then
  303.             return
  304.         end
  305.         if x == 0 and z == 0 and y == 0 then
  306.             return
  307.         end
  308.         if k == "w" then
  309.             x = x + module.Options.speed
  310.         elseif k == "s" then
  311.             x = x - module.Options.speed
  312.         elseif k == "a" then
  313.             z = z + module.Options.speed
  314.         elseif k == "d" then
  315.             z = z - module.Options.speed
  316.         elseif k == module.Options.Down then
  317.             y = y + module.Options.speed
  318.         elseif k == module.Options.Up then
  319.             y = y - module.Options.speed
  320.         end
  321.     end)
  322.     RunService.Stepped:Connect(function()
  323.         if module.Options.Enabled then
  324.             local targetCF = workspace.CurrentCamera.CFrame
  325.             local rx,ry,rz = targetCF:ToOrientation()
  326.             targetCF = CFrame.new(0,0,0)*CFrame.Angles(0,ry,0) *CFrame.Angles(rx,0,0)
  327.             if Player.Character ~= nil then
  328.                 MANAFLY = (CFrame.new(MANAFLY.p) * targetCF)*CFrame.new(z,y,x)
  329.                 Player.Character:SetPrimaryPartCFrame(MANAFLY)
  330.             end
  331.             Player.Character.HumanoidRootPart.Velocity = Vector3.new(Player.Character.HumanoidRootPart.Velocity.x,0,Player.Character.HumanoidRootPart.Velocity.z)
  332.         end
  333.     end)
  334.     local function fly()
  335.         if module.Options.Enabled then
  336.             local targetCF = workspace.CurrentCamera.CFrame
  337.             local rx,ry,rz = targetCF:ToOrientation()
  338.             targetCF = CFrame.new(0,0,0)*CFrame.Angles(0,ry,0) *CFrame.Angles(rx,0,0)
  339.             if Player.Character ~= nil then
  340.                 MANAFLY = (CFrame.new(MANAFLY.p) * targetCF)*CFrame.new(z,y,x)
  341.                 Player.Character:SetPrimaryPartCFrame(MANAFLY)
  342.             end
  343.         end
  344.     end
  345.     RunService:BindToRenderStep("MANAFLY",1,fly)
  346.     return module
  347. end)()
  348.  
  349. function updateui()
  350.     protective_call_wrapper(function()
  351.         if game.PlaceId == 6032399813 or game.PlaceId == 5735553160 or game.PlaceId == 8668476218 and NOFALL then
  352.             local stringformat = "=== Universal ===\nManaRun(M):\t%s\n\tSpeed:\t%.2f\nManaFly(K):\t%s\n\tSpeed:\t%.2f\nManaSoul(P):\t%s\nUnderCover(RCtrl):\t%s\n=== Deepwoken ===\nNo Fall(Y):\t%s"
  353.             if not NOFALL.Options then
  354.                 speedlabel.Text = stringformat:format(tostring(ManaRun.Options.Enabled),ManaRun.Options.speed,tostring(ManaFly.Options.Enabled),ManaFly.Options.speed,tostring(Noclip.Options.Enabled),tostring(UnderCover),"N/A")
  355.             else
  356.                 speedlabel.Text = stringformat:format(tostring(ManaRun.Options.Enabled),ManaRun.Options.speed,tostring(ManaFly.Options.Enabled),ManaFly.Options.speed,tostring(Noclip.Options.Enabled),tostring(UnderCover),tostring(NOFALL.Options.Enabled))
  357.             end
  358.         else
  359.             local stringformat = "=== Universal ===\nManaRun(M):\t%s\n\tSpeed:\t%.2f\nManaFly(K):\t%s\n\tSpeed:\t%.2f\nManaSoul(P):\t%s\nUnderCover(RCtrl):\t%s"
  360.             speedlabel.Text = stringformat:format(tostring(ManaRun.Options.Enabled),ManaRun.Options.speed,tostring(ManaFly.Options.Enabled),ManaFly.Options.speed,tostring(Noclip.Options.Enabled),tostring(UnderCover))
  361.         end
  362.     end)()
  363. end
  364.  
  365. function countnewline(str)
  366.     local lines = 1
  367.     for i = 1, #str do
  368.         local c = str:sub(i, i)
  369.         if c == '\n' then
  370.             lines = lines + 1
  371.         end
  372.     end
  373.     return lines
  374. end
  375.  
  376. local holdminus = false
  377. local holdplus = false
  378. updateui()
  379. speedlabel.Position = Vector2.new(0,(workspace.CurrentCamera.ViewportSize.Y/1.5) - (countnewline(speedlabel.Text)*speedlabel.Size))
  380. speedlabel.Visible = false
  381. game:GetService("UserInputService").InputBegan:Connect(function(input,gameProcessed)
  382.     if input.KeyCode == Enum.KeyCode.M then
  383.         if not ManaRun.Options.Enabled and not UnderCover then
  384.             if ManaFly.Options.Enabled then
  385.                 ManaFly:Disable()
  386.             end
  387.             ManaRun:Enable()
  388.         else
  389.             ManaRun:Disable()
  390.         end
  391.     elseif input.KeyCode == Enum.KeyCode.P and not UnderCover then
  392.         if not Noclip.Options.Enabled then
  393.             Noclip:Enable()
  394.         else
  395.             Noclip:Disable()
  396.         end
  397.     elseif input.KeyCode == Enum.KeyCode.K and not UnderCover then
  398.         if not ManaFly.Options.Enabled then
  399.             if ManaRun.Options.Enabled then
  400.                 ManaRun:Disable()
  401.             end
  402.             ManaFly:Enable()
  403.         else
  404.             ManaFly:Disable()
  405.         end
  406.     elseif input.KeyCode == Enum.KeyCode.Y then
  407.         if NOFALL then
  408.             if not NOFALL.Options.Enabled then
  409.                 NOFALL:Enable()
  410.             else
  411.                 NOFALL:Disable()
  412.             end
  413.         end
  414.     elseif input.KeyCode == Enum.KeyCode.RightControl then
  415.         UnderCover= not UnderCover
  416.         speedlabel.Visible = not UnderCover
  417.         if ManaRun.Options.Enabled then
  418.             ManaRun:Disable()
  419.         end
  420.         if ManaFly.Options.Enabled then
  421.             ManaFly:Disable()
  422.         end
  423.         if Noclip.Options.Enabled then
  424.            Noclip:Disable()
  425.         end
  426.     end
  427.     speedlabel.Visible = not UnderCover
  428.     if speedlabel.Visible then
  429.         if input.KeyCode == Enum.KeyCode.KeypadMinus then
  430.             holdminus = true
  431.             ManaRun.Options.speed = ManaRun.Options.speed - 1/100
  432.         end
  433.         if input.KeyCode == Enum.KeyCode.KeypadPlus then
  434.             holdplus = true
  435.             ManaRun.Options.speed = ManaRun.Options.speed + 1/100
  436.         end
  437.     end
  438. end)
  439. spawn(function()
  440.     while true do
  441.         updateui()
  442.         if holdminus then
  443.             ManaRun.Options.speed = ManaRun.Options.speed - 1/100
  444.         end
  445.         if holdplus then
  446.             ManaRun.Options.speed = ManaRun.Options.speed + 1/100
  447.         end
  448.         if ManaRun.Options.speed < 0 then
  449.             ManaRun.Options.speed = 0
  450.         end
  451.         ManaRun:SpeedChange()
  452.         ManaFly.Options.speed = ManaRun.Options.speed
  453.         ManaFly:SpeedChange(ManaRun.Options.speed)
  454.         for _=1,10 do
  455.             game:GetService("RunService").RenderStepped:Wait()
  456.         end
  457.     end
  458. end)
  459. game:GetService("UserInputService").InputEnded:Connect(function(input,gameProcessed)
  460.     if input.KeyCode == Enum.KeyCode.KeypadMinus then
  461.         holdminus = false
  462.     end
  463.     if input.KeyCode == Enum.KeyCode.KeypadPlus then
  464.         holdplus = false
  465.     end
  466. end)
  467. game.Close:Connect(function()
  468.     writef("ManaStuff.Json", JSONData)
  469. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement