Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- do
- print("FE Compatibility code by Mokiros")
- script.Parent = Player.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Mouse = Player:GetMouse()
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- script.Parent = nil;
- local Player = owner
- local Character = Player.Character
- local Humanoid = Character:FindFirstChildOfClass('Humanoid')
- local HumanoidRootPart = Character:FindFirstChild('HumanoidRootPart')
- local Torso = Character:FindFirstChild('Torso') or Character:FindFirstChild('LowerTorso')
- local Players = game:GetService('Players')
- local Lighting = game:GetService('Lighting')
- local Debris = game:GetService('Debris')
- local TweenService = game:GetService('TweenService')
- local RunService = game:GetService('RunService')
- TimeErased = false
- CanTimeErase = true
- SoundTimeResume = 3290204074
- SoundTimeErase = 3268340509
- SoundRealTime = 3167092959
- function CreateSound(name, id, par, vol, pit, loop, destroyended)
- local S = Instance.new("Sound")
- S.Name = name
- S.Volume = vol
- S.Pitch = pit or 1
- S.SoundId = "rbxassetid://" ..id
- S.Parent = par or workspace
- S.Looped = loop
- S:Play()
- if (destroyended) then
- S.Ended:Connect(function()
- Debris:AddItem(S, 0)
- end)
- end
- return S
- end
- RemoveOutlines = function(part)
- part.BackSurface,part.BottomSurface,part.FrontSurface,part.LeftSurface,part.RightSurface,part.TopSurface = 10,10,10,10,10,10
- end
- function CreatePart(Parent, Material, Reflectance, Transparency, Anchored, CanCollide, RGBColor3, Name, Size)
- local Part = Instance.new("Part")
- Part.Parent = Parent
- Part.Reflectance = Reflectance
- Part.Transparency = Transparency
- Part.CanCollide = CanCollide
- Part.Anchored = Anchored
- Part.Locked = true
- Part.Color = RGBColor3
- Part.Name = Name
- Part.Size = Size
- Part.Material = Material
- RemoveOutlines(Part)
- return Part
- end
- function CreateWeld(Parent, Part0, Part1, C0, C1)
- local Weld = Instance.new("Weld")
- Weld.Parent = Parent
- Weld.Part0 = Part0
- Weld.Part1 = Part1
- Weld.C0 = C0
- Weld.C1 = C1
- return Weld
- end
- function FindAscendant(Oject, Class)
- local Current = Oject
- local Result = nil
- pcall(function()
- repeat
- Current = Current.Parent
- if Current:IsA(Class) then
- Result = Current
- break
- end
- until Current == nil
- end)
- return Result
- end
- function CamShake(Duration, Intensity)
- coroutine.wrap(function()
- for i = 1, Duration do
- Humanoid.CameraOffset = Humanoid.CameraOffset:Lerp(Vector3.new(math.random(-1, 1), math.random(-1, 1), math.random(-1, 1)), 0.1 * Intensity)
- RunService.RenderStepped:Wait()
- end
- Humanoid.CameraOffset = Vector3.new(0, 0, 0)
- end)()
- end
- Objects = {}
- function CharacterErasing()
- local FakeCharacter = Instance.new('Model', workspace)
- FakeCharacter.Name = 'FakeCharacter'
- table.insert(Objects, FakeCharacter)
- for _,v in pairs(Character:GetChildren()) do
- v:Clone().Parent = FakeCharacter
- end
- for _,parts in pairs(FakeCharacter:GetDescendants()) do
- if parts:IsA("BasePart") then
- parts.Anchored = true
- parts.CanCollide = false
- parts.Transparency = .5
- parts.Color = Color3.new(0.75, 0, 0)
- if parts:IsA("UnionOperation") then
- parts.UsePartColor = true
- end
- if string.find(string.lower(parts.Name),"root") then
- FakeCharacter.PrimaryPart = parts
- end
- elseif parts:IsA("SpecialMesh") then
- parts.TextureId = ""
- else
- if not parts:IsA("Accoutrement") then
- parts:Destroy()
- end
- end
- end
- end
- RealTime = nil
- Theme = nil
- MyWorkspace = nil
- MyLighting = nil
- FakeHumanoidRootPart = nil
- function TimeErase()
- CanTimeErase = false
- CreateSound('TimeErase', SoundTimeErase, Character, 4, 1, false, true)
- CharacterErasing()
- -- Freeze-Local | Method by basbas1234
- local MyPosition = HumanoidRootPart.Position
- if (Humanoid.RigType == Enum.HumanoidRigType.R6) then
- Character:MoveTo(MyPosition + Vector3.new(0, -50, 0))
- Torso.Anchored = true
- FakeHumanoidRootPart = HumanoidRootPart:Clone()
- HumanoidRootPart.Name = 'Fake'
- FakeHumanoidRootPart.Parent = Character
- FakeHumanoidRootPart.Name = 'HumanoidRootPart'
- Torso.Anchored = false
- Character:MoveTo(MyPosition)
- else
- Torso.Anchored = true
- HumanoidRootPart.Anchored = true
- local Root = Torso:WaitForChild('Root')
- FakeHumanoidRootPart = HumanoidRootPart:Clone()
- FakeHumanoidRootPart.Parent = Character
- HumanoidRootPart.Name = 'Fake'
- local Motor6D = Instance.new('Motor6D', HumanoidRootPart)
- Motor6D.Name = 'Fake'
- Motor6D.Part0 = HumanoidRootPart
- Motor6D.Part1 = FakeHumanoidRootPart
- Root.Part0 = FakeHumanoidRootPart
- FakeHumanoidRootPart.Anchored = false
- HumanoidRootPart.Anchored = false
- Torso.Anchored = false
- end
- -- Ball;
- local TimeEraseEffect = CreatePart(workspace, Enum.Material.ForceField, 0, 0, true, false, Color3.fromRGB(255, 255, 255), 'Effect', Vector3.new(0.05, 0.05, 0.05))
- TimeEraseEffect.CastShadow = false
- TimeEraseEffect.Shape = Enum.PartType.Ball
- TimeEraseEffect.CFrame = Torso.CFrame
- local TimeEraseEffectAnimateIn = TweenService:Create(
- TimeEraseEffect,
- TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false),
- {
- Transparency = 0.5;
- Size = Vector3.new(100, 100, 100)
- }
- )
- local TimeEraseEffectAnimateOut = TweenService:Create(
- TimeEraseEffect,
- TweenInfo.new(1.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false),
- {
- Transparency = 0;
- Color = Color3.fromRGB(200, 0, 0);
- Size = Vector3.new(0.05, 0.05, 0.05)
- }
- )
- spawn(function()
- wait(1)
- CreateSound('Effect', 3280066384, Character, 4, 1, false, true)
- end)
- spawn(function()
- Debris:AddItem(TimeEraseEffect, 10)
- TimeEraseEffectAnimateIn:Play();
- CamShake(30, 5)
- wait(0.5);
- wait(1)
- CamShake(120, 2.5)
- TimeEraseEffectAnimateOut:Play()
- end)
- wait(2.5)
- -- Lighting;
- if not (RealTime ~= nil) then
- RealTime = CreateSound('RealTime', SoundRealTime, Character, 0.5, 1, true, false)
- end
- wait(2)
- TimeErased = true
- end
- function TimeResume()
- TimeErased = false
- if (RealTime ~= nil) then
- RealTime:Stop()
- RealTime.Parent = nil
- RealTime = nil
- end
- CreateSound('TimeResume', SoundTimeResume, Character, 1, 1, false, true)
- -- Unfreeze-Local | Method by basbas1234
- if (Humanoid.RigType == Enum.HumanoidRigType.R6) then
- Torso.Anchored = true
- HumanoidRootPart.Name = 'HumanoidRootPart'
- FakeHumanoidRootPart.Parent = nil
- Torso.Anchored = false
- else
- Torso.Anchored = true
- HumanoidRootPart.Anchored = true
- FakeHumanoidRootPart.Parent = nil
- HumanoidRootPart.Name = 'HumanoidRootPart'
- local Motor6D = HumanoidRootPart:FindFirstChildOfClass('Motor6D')
- if (Motor6D) then
- Motor6D.Parent = nil
- end
- local Root = Torso:WaitForChild('Root')
- Root.Part0 = HumanoidRootPart
- Torso.Anchored = false
- HumanoidRootPart.Anchored = false
- end
- for Index, Self in pairs(Objects) do
- pcall(function()
- Self:Destroy();
- Self = nil
- end)
- end
- wait(5)
- CanTimeErase = true
- end
- Mouse.KeyDown:Connect(function(Key)
- if (Key:lower() == 't' and not TimeErased and CanTimeErase) then
- TimeErase()
- elseif (Key:lower() == 't' and TimeErased) then
- TimeResume()
- end
- end)
- Player.CharacterAdded:Connect(function(NewCharacter)
- Character = NewCharacter
- Humanoid = Character:FindFirstChildOfClass('Humanoid') or Character:WaitForChild('Humanoid')
- HumanoidRootPart = Character:FindFirstChild('HumanoidRootPart')
- Torso = Character:FindFirstChild('Torso') or Character:FindFirstChild('LowerTorso')
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement