Advertisement
UltimateMemeGOD

Untitled

Feb 15th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7.     print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8.     script.Parent = Player.Character
  9.  
  10.     --RemoteEvent for communicating
  11.     local Event = Instance.new("RemoteEvent")
  12.     Event.Name = "UserInput_Event"
  13.  
  14.     --Fake event to make stuff like Mouse.KeyDown work
  15.     local function fakeEvent()
  16.         local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17.         t.connect = t.Connect
  18.         return t
  19.     end
  20.  
  21.     --Creating fake input objects with fake variables
  22.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26.     end}
  27.     --Merged 2 functions into one by checking amount of arguments
  28.     CAS.UnbindAction = CAS.BindAction
  29.  
  30.     --This function will trigger the events that have been :Connect()'ed
  31.     local function te(self,ev,...)
  32.         local t = m[ev]
  33.         if t and t._fakeEvent and t.Function then
  34.             t.Function(...)
  35.         end
  36.     end
  37.     m.TrigEvent = te
  38.     UIS.TrigEvent = te
  39.  
  40.     Event.OnServerEvent:Connect(function(plr,io)
  41.         if plr~=Player then return end
  42.         if io.isMouse then
  43.             m.Target = io.Target
  44.             m.Hit = io.Hit
  45.         else
  46.             local b = io.UserInputState == Enum.UserInputState.Begin
  47.             if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48.                 return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49.             end
  50.             for _,t in pairs(CAS.Actions) do
  51.                 for _,k in pairs(t.Keys) do
  52.                     if k==io.KeyCode then
  53.                         t.Function(t.Name,io.UserInputState,io)
  54.                     end
  55.                 end
  56.             end
  57.             m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58.             UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59.         end
  60.     end)
  61.     Event.Parent = NLS([==[
  62.     local Player = game:GetService("Players").LocalPlayer
  63.     local Event = script:WaitForChild("UserInput_Event")
  64.  
  65.     local UIS = game:GetService("UserInputService")
  66.     local input = function(io,a)
  67.         if a then return end
  68.         --Since InputObject is a client-side instance, we create and pass table instead
  69.         Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70.     end
  71.     UIS.InputBegan:Connect(input)
  72.     UIS.InputEnded:Connect(input)
  73.  
  74.     local Mouse = Player:GetMouse()
  75.     local h,t
  76.     --Give the server mouse data 30 times every second, but only if the values changed
  77.     --If player is not moving their mouse, client won't fire events
  78.     while wait(1/30) do
  79.         if h~=Mouse.Hit or t~=Mouse.Target then
  80.             h,t=Mouse.Hit,Mouse.Target
  81.             Event:FireServer({isMouse=true,Target=t,Hit=h})
  82.         end
  83.     end]==],Player.Character)
  84.     Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87. print("Loaded Successfully!")
  88.     --[[Changeable Variables]]--
  89. local multiplier = 1 --Attack multiplier (default is 1)
  90. local soundlist = {
  91.     HardHit1 = "rbxassetid://565207203",
  92.     HardHit2 = "rbxassetid://541909913",
  93.     HardHit3 = "rbxassetid://541909983",
  94.     WeakHit1 = "rbxassetid://558642292",
  95.     WeakHit2 = "rbxassetid://541907812",
  96.     Slice1 = "rbxassetid://260429964",
  97.     Slice2 = "rbxassetid://260430015",
  98.     Explosion1 = "rbxassetid://138186576",
  99.     Explosion2 = "rbxassetid://157878578",
  100.     Woosh1 = "rbxassetid://541909867",
  101.     Woosh2 = "rbxassetid://541909763",
  102.     TimeSlow = "rbxassetid://615678808",
  103.     TimeStop = "rbxassetid://926382097",
  104.     TimeResume = "rbxassetid://894793352",
  105.     TimeFast = "rbxassetid://743499393",
  106.     TimeReverse = "rbxassetid://618737332",
  107.    
  108. }
  109.  
  110.     --[[Important Variables]]--
  111. local plr = owner
  112. local char = plr.Character
  113. local input = game:GetService('UserInputService')
  114. ----
  115. local joints = {"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip", "Neck", "RootJoint"}
  116. local torso,head,rootpart = char.Torso,char.Head,char.HumanoidRootPart
  117. local rs = torso["Right Shoulder"]
  118. local ls = torso["Left Shoulder"]
  119. local rh = torso["Right Hip"]
  120. local lh = torso["Left Hip"]
  121. local neck = torso.Neck
  122. local rj = rootpart["RootJoint"]
  123. ----
  124. local huge = Vector3.new(math.huge, math.huge, math.huge)
  125. local attacking = false
  126. local cananim = true
  127. local timestop = false
  128. local timeslow = false
  129. local timefast = false
  130. local reversing = false
  131. local unfreeze = {}
  132. local sounddata = {}
  133. local connections = {}
  134. local healthstuff = {}
  135.  
  136.     --[[ Functions ]]--
  137. function addattack(keycode, func)
  138.     input.InputBegan:connect(function(inp)
  139.         if inp.KeyCode == keycode and not input:GetFocusedTextBox() then
  140.             func()
  141.         end
  142.     end)
  143. end
  144. function attackend(keycode, func)
  145.     input.InputEnded:connect(function(inp)
  146.         if inp.KeyCode == keycode and not input:GetFocusedTextBox() then
  147.             func()
  148.         end
  149.     end)
  150. end
  151. function swait(t)
  152.     if t then
  153.         for i = 0, t do
  154.             game:GetService('RunService').Stepped:wait(0)
  155.         end
  156.     else
  157.         game:GetService('RunService').Stepped:wait(0)
  158.     end
  159.     return true
  160. end
  161. function fade(obj, dest, grow)
  162.     spawn(function()
  163.         local oldcf = obj.CFrame
  164.         for i = 0, 10 do
  165.             if grow then
  166.                 obj.Size = obj.Size +Vector3.new(1,1,1)
  167.                 obj.CFrame = oldcf
  168.             end
  169.             obj.Transparency = obj.Transparency +0.1
  170.             swait()
  171.         end
  172.         if dest then
  173.         obj:Destroy()
  174.         end
  175.     end)
  176. end
  177. function replacejoint(name)
  178.     local j = torso:FindFirstChild(name)
  179.     if not j then j = char.HumanoidRootPart:FindFirstChild(name) end
  180.     if j then
  181.         if true then
  182.             local already = j.Parent:FindFirstChild(j.Name.." Replacement")
  183.             local new = Instance.new("Weld")
  184.             local c0 = j.C0
  185.             local c1 = j.C1
  186.             new.Part0 = j.Part0
  187.             j.Part0 = nil
  188.             new.Name = j.Name.." Replacement"
  189.             if already then c0 = already.C0 c1 = already.C1 already:Destroy() end
  190.             new.Parent = j.Parent
  191.             new.Part1 = j.Part1
  192.             new.C0 = c0
  193.             new.C1 = c1
  194.             return new
  195.         end
  196.     end
  197. end
  198. function removejoint(name, fast)
  199.     local j = torso:FindFirstChild(name.." Replacement")
  200.     if not j then j = char.HumanoidRootPart:FindFirstChild(name.." Replacement") end
  201.     if j then
  202.         local p0 = j.Part0
  203.         if p0 ~= nil then
  204.         local c0 = j.C0
  205.         local c1 = j.C1
  206.         j:Destroy()
  207.         local new = p0:FindFirstChild(name)
  208.         local ac0 = new.C0
  209.         local ac1 = new.C1
  210.         new.Part0 = p0
  211.         new.C0 = c0
  212.         new.C1 = c1
  213.         spawn(function()
  214.             if name ~= "RootJoint" then
  215.             if not fast then
  216.             for i = 0, 0.6, 0.1 do
  217.                 new.C0 = new.C0:Lerp(ac0, 0.5)
  218.                 new.C1 = new.C1:lerp(ac1, 0.5)
  219.                 swait()
  220.             end
  221.             else
  222.                 new.C0 = new.C0:Lerp(ac0, 1)
  223.                 new.C1 = new.C1:lerp(ac1, 1)
  224.             end
  225.             end
  226.         end)
  227.         end
  228.     end
  229. end
  230. function fixalljoints(fast)
  231.     for i,v in pairs({"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip",  "Neck", "RootJoint"}) do
  232.         removejoint(v, fast)
  233.     end
  234. end
  235. function getnewjoints()
  236.     local rs = replacejoint("Right Shoulder")
  237.     local ls = replacejoint("Left Shoulder")
  238.     local rh = replacejoint("Right Hip")
  239.     local lh = replacejoint("Left Hip")
  240.     local neck = replacejoint("Neck")
  241.     local rj = replacejoint("RootJoint")
  242.     return rs,ls,rh,lh,neck,rj
  243. end
  244. function knockback(hit, force)
  245.     local bv = Instance.new("BodyVelocity")
  246.     bv.MaxForce = huge
  247.     bv.Velocity = force
  248.     bv.Parent = hit
  249.     game:GetService('Debris'):AddItem(bv, 0.15)
  250. end
  251. function soundeffect(id, volume, speed, parent, forcewait)
  252.     local func = function()
  253.         local s = LoadLibrary("RbxUtility").Create("Sound")()
  254.         s.Name = "SoundEffect"
  255.         s.Volume = volume
  256.         s.PlaybackSpeed = speed
  257.         s.SoundId = id
  258.         s.Name = "dont"
  259.         s.Looped = false
  260.         s.Parent = parent
  261.         s:Play()
  262.         repeat wait() until not s.Playing
  263.         s:Destroy()
  264.     end
  265.     if forcewait then
  266.         func()
  267.     else
  268.         spawn(func)
  269.     end
  270. end
  271. function getascendants(obj)
  272.     local par = obj
  273.     local ret = {}
  274.     pcall(function()
  275.         repeat
  276.             par = par.Parent
  277.             if par ~= nil then
  278.                 table.insert(ret, par)
  279.             end
  280.         until par == nil
  281.     end)
  282.     return ret
  283. end
  284. function findascendant(obj, class)
  285.     local par = obj
  286.     local ret = nil
  287.     pcall(function()
  288.         repeat
  289.             par = par.Parent
  290.             if par:IsA(class) then
  291.                 ret = par
  292.                 break
  293.             end
  294.         until par == nil
  295.     end)
  296.     return ret
  297. end
  298. function hurt(hit, dmg)
  299.     --pcall(function()
  300.         local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
  301.         if hum then
  302.             if hum.Parent ~= char then
  303.                 hum.Health = hum.Health - dmg
  304.                 hum.Health = hum.Health - dmg
  305.                 soundeffect(soundlist.Headshot, 1.5, 1, workspace.CurrentCamera)
  306.                 return true
  307.             end
  308.         end
  309.     --end)
  310. end
  311.     --[[ Actual script :OOOOOOOOOO ]]--
  312. addattack(Enum.KeyCode.G, function()
  313.     if not timeslow and not timefast and not reversing then
  314.         local p = Instance.new("Part")
  315.         p.Anchored = true
  316.         p.Material = "Glass"
  317.         p.Size = Vector3.new(0.1,0.1,0.1)
  318.         p.BrickColor = BrickColor.new("Toothpaste")
  319.         p.CanCollide = false
  320.         p.CFrame = char.HumanoidRootPart.CFrame
  321.         local m = Instance.new("SpecialMesh")
  322.         m.MeshType = "Sphere"
  323.         m.Parent = p
  324.         p.Parent = char
  325.         spawn(function()
  326.         for i = 1, 50 do
  327.             p.Transparency = i/50
  328.             p.Size = p.Size:Lerp(Vector3.new(40,40,40),0.1)
  329.             p.CFrame = char.HumanoidRootPart.CFrame
  330.             swait()
  331.         end
  332.         p:Destroy()
  333.         end)
  334.         if not timestop then
  335.             local s = Instance.new("Sound")
  336.             s.Volume = 3
  337.             s.Name = "dont"
  338.             s.SoundId = soundlist.TimeStop
  339.             s.Parent = char
  340.             s:Play()
  341.             dcon = workspace.DescendantAdded:connect(function(obj)
  342.             pcall(function()
  343.                 swait()
  344.                 local ok = true
  345.                 for i,v in pairs(getascendants(obj)) do
  346.                     if v.Name:lower():find("ignoremodel") then
  347.                         ok = false
  348.                     end
  349.                 end
  350.                 if obj:IsA("BasePart") and ok and not findascendant(obj, "Tool") and not findascendant(obj, "HopperBin") and not findascendant(obj, "Camera") then
  351.                     if not obj.Anchored and obj.Name ~= "HumanoidRootPart" then
  352.                         table.insert(unfreeze, obj)
  353.                         obj.Anchored = true
  354.                     end
  355.                 end
  356.                 if obj:IsA("Sound") and obj.Name ~= "dont" then
  357.                     if obj.Playing then
  358.                     obj:Pause()
  359.                     table.insert(unfreeze, obj)
  360.                     end
  361.                 end
  362.                 if obj:IsA("Humanoid") then
  363.                     local last = obj.Health
  364.                     local always = last
  365.                     local con = obj.HealthChanged:connect(function(health)
  366.                         if last-health > 0 then
  367.                         table.insert(healthstuff, {hum = obj, change = last-health})
  368.                         end
  369.                         last = health
  370.                         obj.Health = always
  371.                     end)
  372.                     table.insert(connections, con)
  373.                 end
  374.             end)
  375.         end)
  376.         for i,v in pairs(workspace:GetDescendants()) do
  377.             pcall(function()
  378.                 if v:IsA("BasePart") then
  379.                 local ok = true
  380.                 for i,e in pairs(getascendants(v)) do
  381.                     if e.Name:lower():find("ignore_model") then
  382.                         ok = false
  383.                     end
  384.                     if e:IsA("Camera") then
  385.                         ok = false
  386.                     end
  387.                 end
  388.                 if not v.Anchored and ok and v.Parent ~= char and not findascendant(v, "Camera") and not findascendant(v, "Tool") and not findascendant(v, "HopperBin") then
  389.                     local ok = true
  390.                     if v.Parent:IsA("Accessory") then ok = false end
  391.                     if ok and v.Name ~= "HumanoidRootPart" then
  392.                     v.Anchored = true
  393.                     table.insert(unfreeze, v)
  394.                     end
  395.                 end
  396.                 end
  397.             end)
  398.             pcall(function()
  399.                 if v:IsA("Sound") and v.Name ~= "dont" then
  400.                     if v.Playing then
  401.                     v:Pause()
  402.                     table.insert(unfreeze, v)
  403.                     end
  404.                 end
  405.             end)
  406.             pcall(function()
  407.                 if v:IsA("Humanoid") then
  408.                     local last = v.Health
  409.                     local always = last
  410.                     local con = v.HealthChanged:connect(function(health)
  411.                         if last-health > 0 then
  412.                         table.insert(healthstuff, {hum = v, change = last-health})
  413.                         end
  414.                         last = health
  415.                         v.Health = always
  416.                     end)
  417.                     table.insert(connections, con)
  418.                 end
  419.             end)
  420.         end
  421.         timestop = true
  422.         local cor = Instance.new("ColorCorrectionEffect")
  423.         cor.Name = "tstopef"
  424.         cor.Parent = game:GetService('Lighting')
  425.         for i = 1, 50 do
  426.             cor.Saturation = Vector3.new(cor.Saturation,0,0):Lerp(Vector3.new(-5,0,0), 0.05).X
  427.             swait()
  428.         end
  429.         game.Debris:AddItem(s, 2)
  430.     else
  431.         local s = Instance.new("Sound")
  432.         s.Volume = 7
  433.         s.Name = "dont"
  434.         s.SoundId = soundlist.TimeResume
  435.         s.Parent = char
  436.         s:Play()
  437.         local cor = game:GetService('Lighting'):FindFirstChild("tstopef")
  438.         if cor then
  439.         for i = 1, 50 do
  440.             cor.Saturation = Vector3.new(cor.Saturation,0,0):Lerp(Vector3.new(0,0,0), 0.05).X
  441.             swait()
  442.         end
  443.         cor:Destroy()
  444.         end
  445.         game.Debris:AddItem(s, 2)
  446.         timestop = false
  447.         for i,v in pairs(unfreeze) do
  448.             pcall(function()
  449.                 v.Anchored = false
  450.             end)
  451.             pcall(function()
  452.                 v:Resume()
  453.             end)
  454.         end
  455.         for i,v in pairs(connections) do
  456.             pcall(function()
  457.                 v:disconnect()
  458.             end)
  459.         end
  460.         for i,v in pairs(healthstuff) do
  461.             pcall(function()
  462.                 local hum = v.hum
  463.                 hum.Health = hum.Health - v.change
  464.                 if hum.Parent:FindFirstChild("Health") then
  465.                     pcall(function()
  466.                         hum.Parent.Health.Disabled = false
  467.                     end)
  468.                 end
  469.             end)
  470.         end
  471.         pcall(function()
  472.             dcon:disconnect()
  473.         end)
  474.                 healthstuff = {}
  475.         unfreeze = {}
  476.         end
  477.     end
  478. end)
  479. local humanoiddata = {}
  480. local bodymoverdata = {}
  481. local dcon2
  482. local connectionsdata = {}
  483. addattack(Enum.KeyCode.H, function()
  484.     if not timeslow and not timestop and not reversing then
  485.         local p = Instance.new("Part")
  486.         p.Anchored = true
  487.         p.Material = "Glass"
  488.         p.Size = Vector3.new(0.1,0.1,0.1)
  489.         p.BrickColor = BrickColor.new("Toothpaste")
  490.         p.CanCollide = false
  491.         p.CFrame = char.HumanoidRootPart.CFrame
  492.         local m = Instance.new("SpecialMesh")
  493.         m.MeshType = "Sphere"
  494.         m.Parent = p
  495.         p.Parent = char
  496.         spawn(function()
  497.         for i = 1, 50 do
  498.             p.Transparency = i/50
  499.             p.Size = p.Size:Lerp(Vector3.new(40,40,40),0.1)
  500.             p.CFrame = char.HumanoidRootPart.CFrame
  501.             swait()
  502.         end
  503.         p:Destroy()
  504.         end)
  505.         if not timefast then
  506.             timefast = true
  507.             soundeffect(soundlist.TimeFast, 1.5, 1, char)
  508.             for i,v in pairs(workspace:GetDescendants()) do
  509.                 if v:IsA("Humanoid") then
  510.                     table.insert(humanoiddata, {Hum = v, WS = v.WalkSpeed, JP = v.JumpPower})
  511.                     for _,track in pairs(v:GetPlayingAnimationTracks()) do
  512.                     end
  513.                     local con = v.AnimationPlayed:connect(function(track)
  514.                     end)
  515.                     table.insert(connections, con)
  516.                 end
  517.                 if v:IsA("BodyVelocity") then
  518.                     table.insert(bodymoverdata, {Mover = v, Vel = v.Velocity})
  519.                 end
  520.                 if v:IsA("BodyPosition") then
  521.                     table.insert(bodymoverdata, {Mover = v, Vel = v.P})
  522.                 end
  523.                 if v.Name == "HumanoidRootPart" and v:IsA("BasePart") then
  524.                 end
  525.                 if v:IsA("Sound") and v.Name ~= "dont" then
  526.                     table.insert(sounddata, {Sound = v, Speed = v.PlaybackSpeed})
  527.                 end
  528.             end
  529.             dcon2 = workspace.DescendantAdded:connect(function(v)
  530.                 swait(2)
  531.                 if v:IsA("Humanoid") then
  532.                     table.insert(humanoiddata, {Hum = v, WS = v.WalkSpeed, JP = v.JumpPower})
  533.                     for _,track in pairs(v:GetPlayingAnimationTracks()) do
  534.                         track:AdjustSpeed(1.4)
  535.                     end
  536.                     local con = v.AnimationPlayed:connect(function(track)
  537.                         track:AdjustSpeed(1.4)
  538.                     end)
  539.                     table.insert(connections, con)
  540.                 end
  541.                 if v:IsA("BodyVelocity") then
  542.                     table.insert(bodymoverdata, {Mover = v, Vel = v.Velocity})
  543.                 end
  544.                 if v:IsA("BodyPosition") then
  545.                     table.insert(bodymoverdata, {Mover = v, Vel = v.P})
  546.                 end
  547.                 if v.Name == "HumanoidRootPart" and v:IsA("BasePart") then
  548.                 end
  549.                 if v:IsA("Sound") and v.Name ~= "dont" then
  550.                     table.insert(sounddata, {Sound = v, Speed = v.PlaybackSpeed})
  551.                 end
  552.             end)
  553.         else
  554.             timefast = false
  555.             soundeffect(soundlist.TimeResume, 1.5, 1, char)
  556.             for i,v in pairs(humanoiddata) do
  557.                 pcall(function()
  558.                     v["Hum"].WalkSpeed = v["WS"]
  559.                     v["Hum"].JumpPower = v["JP"]
  560.                 end)
  561.             end
  562.             for i,v in pairs(bodymoverdata) do
  563.                 pcall(function()
  564.                     if v["Mover"]:IsA("BodyVelocity") then
  565.                         v["Mover"].Velocity = v["Vel"]
  566.                     end
  567.                     if v["Mover"]:IsA("BodyPosition") then
  568.                         v["Mover"].P = v["Vel"]
  569.                     end
  570.                 end)
  571.             end
  572.             for i,v in pairs(sounddata) do
  573.                 pcall(function()
  574.                     v["Sound"].PlaybackSpeed = v["Speed"]
  575.                 end)
  576.             end
  577.             for i,v in pairs(connections) do
  578.                 pcall(function()
  579.                     v:disconnect()
  580.                 end)
  581.             end
  582.             connections = {}
  583.             pcall(function()
  584.                 dcon2:disconnect()
  585.             end)
  586.             humanoiddata = {}
  587.         end
  588.     end
  589. end)
  590. local reversedata = {}
  591. local saved = false
  592. addattack(Enum.KeyCode.C, function()
  593.     if not timestop and not timeslow and not timefast then
  594.     if not saved then
  595.         saved = true
  596.         for i,v in pairs(workspace:GetDescendants()) do
  597.             end
  598.     else
  599.         reversing = true
  600.         saved = false
  601.         soundeffect(soundlist.TimeReverse, 2, 1, workspace)
  602.         for i = 1, 10 do
  603.             for _,v in pairs(reversedata) do
  604.                 local obj = v.obj
  605.                 local cf = v.cf                 obj.Anchored = true
  606.                 end
  607.             end
  608.             swait()
  609.         end
  610.         char.HumanoidRootPart.Velocity = Vector3.new(0,0,0)
  611.         reversedata = {}
  612.         reversing = false
  613.     end
  614.     end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement