Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.28 KB | None | 0 0
  1.  
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4. do
  5. print("FE Compatibility code by Mokiros")
  6. script.Parent = Player.Character
  7.  
  8. --RemoteEvent for communicating
  9. local Event = Instance.new("RemoteEvent")
  10. Event.Name = "UserInput_Event"
  11.  
  12. --Fake event to make stuff like Mouse.KeyDown work
  13. local function fakeEvent()
  14. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  15. t.connect = t.Connect
  16. return t
  17. end
  18.  
  19. --Creating fake input objects with fake variables
  20. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  21. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  22. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  23. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  24. end}
  25. --Merged 2 functions into one by checking amount of arguments
  26. CAS.UnbindAction = CAS.BindAction
  27.  
  28. --This function will trigger the events that have been :Connect()'ed
  29. local function te(self,ev,...)
  30. local t = m[ev]
  31. if t and t._fakeEvent and t.Function then
  32. t.Function(...)
  33. end
  34. end
  35. m.TrigEvent = te
  36. UIS.TrigEvent = te
  37.  
  38. Event.OnServerEvent:Connect(function(plr,io)
  39. if plr~=Player then return end
  40. if io.isMouse then
  41. m.Target = io.Target
  42. m.Hit = io.Hit
  43. else
  44. local b = io.UserInputState == Enum.UserInputState.Begin
  45. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  46. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  47. end
  48. for _,t in pairs(CAS.Actions) do
  49. for _,k in pairs(t.Keys) do
  50. if k==io.KeyCode then
  51. t.Function(t.Name,io.UserInputState,io)
  52. end
  53. end
  54. end
  55. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  56. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  57. end
  58. end)
  59. Event.Parent = NLS([==[
  60. local Player = game:GetService("Players").LocalPlayer
  61. local Event = script:WaitForChild("UserInput_Event")
  62.  
  63. local UIS = game:GetService("UserInputService")
  64. local input = function(io,a)
  65. if a then return end
  66. --Since InputObject is a client-side instance, we create and pass table instead
  67. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  68. end
  69. UIS.InputBegan:Connect(input)
  70. UIS.InputEnded:Connect(input)
  71.  
  72. local Mouse = Player:GetMouse()
  73. local h,t
  74. --Give the server mouse data 30 times every second, but only if the values changed
  75. --If player is not moving their mouse, client won't fire events
  76. while wait(1/30) do
  77. if h~=Mouse.Hit or t~=Mouse.Target then
  78. h,t=Mouse.Hit,Mouse.Target
  79. Event:FireServer({isMouse=true,Target=t,Hit=h})
  80. end
  81. end]==],Player.Character)
  82. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  83. end
  84.  
  85. script.Parent = nil;
  86.  
  87. local Player = owner
  88. local Character = Player.Character
  89. local Humanoid = Character:FindFirstChildOfClass('Humanoid')
  90. local HumanoidRootPart = Character:FindFirstChild('HumanoidRootPart')
  91. local Torso = Character:FindFirstChild('Torso') or Character:FindFirstChild('LowerTorso')
  92.  
  93. local Players = game:GetService('Players')
  94. local Lighting = game:GetService('Lighting')
  95. local Debris = game:GetService('Debris')
  96. local TweenService = game:GetService('TweenService')
  97. local RunService = game:GetService('RunService')
  98.  
  99. TimeErased = false
  100. CanTimeErase = true
  101.  
  102. SoundTimeResume = 3290204074
  103. SoundTimeErase = 3268340509
  104. SoundRealTime = 3167092959
  105.  
  106. function CreateSound(name, id, par, vol, pit, loop, destroyended)
  107. local S = Instance.new("Sound")
  108. S.Name = name
  109. S.Volume = vol
  110. S.Pitch = pit or 1
  111. S.SoundId = "rbxassetid://" ..id
  112. S.Parent = par or workspace
  113. S.Looped = loop
  114. S:Play()
  115. if (destroyended) then
  116. S.Ended:Connect(function()
  117. Debris:AddItem(S, 0)
  118. end)
  119. end
  120. return S
  121. end
  122.  
  123. RemoveOutlines = function(part)
  124. part.BackSurface,part.BottomSurface,part.FrontSurface,part.LeftSurface,part.RightSurface,part.TopSurface = 10,10,10,10,10,10
  125. end
  126.  
  127. function CreatePart(Parent, Material, Reflectance, Transparency, Anchored, CanCollide, RGBColor3, Name, Size)
  128. local Part = Instance.new("Part")
  129. Part.Parent = Parent
  130. Part.Reflectance = Reflectance
  131. Part.Transparency = Transparency
  132. Part.CanCollide = CanCollide
  133. Part.Anchored = Anchored
  134. Part.Locked = true
  135. Part.Color = RGBColor3
  136. Part.Name = Name
  137. Part.Size = Size
  138. Part.Material = Material
  139. RemoveOutlines(Part)
  140. return Part
  141. end
  142.  
  143. function CreateWeld(Parent, Part0, Part1, C0, C1)
  144. local Weld = Instance.new("Weld")
  145. Weld.Parent = Parent
  146. Weld.Part0 = Part0
  147. Weld.Part1 = Part1
  148. Weld.C0 = C0
  149. Weld.C1 = C1
  150. return Weld
  151. end
  152.  
  153. function FindAscendant(Oject, Class)
  154. local Current = Oject
  155. local Result = nil
  156. pcall(function()
  157. repeat
  158. Current = Current.Parent
  159. if Current:IsA(Class) then
  160. Result = Current
  161. break
  162. end
  163. until Current == nil
  164. end)
  165. return Result
  166. end
  167.  
  168. function CamShake(Duration, Intensity)
  169. coroutine.wrap(function()
  170. for i = 1, Duration do
  171. Humanoid.CameraOffset = Humanoid.CameraOffset:Lerp(Vector3.new(math.random(-1, 1), math.random(-1, 1), math.random(-1, 1)), 0.1 * Intensity)
  172. RunService.RenderStepped:Wait()
  173. end
  174. Humanoid.CameraOffset = Vector3.new(0, 0, 0)
  175. end)()
  176. end
  177.  
  178. Objects = {}
  179.  
  180. function CharacterErasing()
  181. local FakeCharacter = Instance.new('Model', workspace)
  182. FakeCharacter.Name = 'FakeCharacter'
  183. table.insert(Objects, FakeCharacter)
  184. for _,v in pairs(Character:GetChildren()) do
  185. v:Clone().Parent = FakeCharacter
  186. end
  187. for _,parts in pairs(FakeCharacter:GetDescendants()) do
  188. if parts:IsA("BasePart") then
  189. parts.Anchored = true
  190. parts.CanCollide = false
  191. parts.Transparency = .5
  192. parts.Color = Color3.new(0.75, 0, 0)
  193. if parts:IsA("UnionOperation") then
  194. parts.UsePartColor = true
  195. end
  196. if string.find(string.lower(parts.Name),"root") then
  197. FakeCharacter.PrimaryPart = parts
  198. end
  199. elseif parts:IsA("SpecialMesh") then
  200. parts.TextureId = ""
  201. else
  202. if not parts:IsA("Accoutrement") then
  203. parts:Destroy()
  204. end
  205. end
  206. end
  207. end
  208.  
  209. RealTime = nil
  210. Theme = nil
  211. MyWorkspace = nil
  212. MyLighting = nil
  213. FakeHumanoidRootPart = nil
  214.  
  215. function TimeErase()
  216. CanTimeErase = false
  217. CreateSound('TimeErase', SoundTimeErase, Character, 4, 1, false, true)
  218. CharacterErasing()
  219. -- Freeze-Local | Method by basbas1234
  220. local MyPosition = HumanoidRootPart.Position
  221. if (Humanoid.RigType == Enum.HumanoidRigType.R6) then
  222. Character:MoveTo(MyPosition + Vector3.new(0, -50, 0))
  223. Torso.Anchored = true
  224. FakeHumanoidRootPart = HumanoidRootPart:Clone()
  225. HumanoidRootPart.Name = 'Fake'
  226. FakeHumanoidRootPart.Parent = Character
  227. FakeHumanoidRootPart.Name = 'HumanoidRootPart'
  228. Torso.Anchored = false
  229. Character:MoveTo(MyPosition)
  230. else
  231. Torso.Anchored = true
  232. HumanoidRootPart.Anchored = true
  233. local Root = Torso:WaitForChild('Root')
  234. FakeHumanoidRootPart = HumanoidRootPart:Clone()
  235. FakeHumanoidRootPart.Parent = Character
  236. HumanoidRootPart.Name = 'Fake'
  237. local Motor6D = Instance.new('Motor6D', HumanoidRootPart)
  238. Motor6D.Name = 'Fake'
  239. Motor6D.Part0 = HumanoidRootPart
  240. Motor6D.Part1 = FakeHumanoidRootPart
  241. Root.Part0 = FakeHumanoidRootPart
  242. FakeHumanoidRootPart.Anchored = false
  243. HumanoidRootPart.Anchored = false
  244. Torso.Anchored = false
  245. end
  246. -- Ball;
  247. 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))
  248. TimeEraseEffect.CastShadow = false
  249. TimeEraseEffect.Shape = Enum.PartType.Ball
  250. TimeEraseEffect.CFrame = Torso.CFrame
  251. local TimeEraseEffectAnimateIn = TweenService:Create(
  252. TimeEraseEffect,
  253. TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false),
  254. {
  255. Transparency = 0.5;
  256. Size = Vector3.new(100, 100, 100)
  257. }
  258. )
  259. local TimeEraseEffectAnimateOut = TweenService:Create(
  260. TimeEraseEffect,
  261. TweenInfo.new(1.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false),
  262. {
  263. Transparency = 0;
  264. Color = Color3.fromRGB(200, 0, 0);
  265. Size = Vector3.new(0.05, 0.05, 0.05)
  266. }
  267. )
  268. spawn(function()
  269. wait(1)
  270. CreateSound('Effect', 3280066384, Character, 4, 1, false, true)
  271. end)
  272. spawn(function()
  273. Debris:AddItem(TimeEraseEffect, 10)
  274. TimeEraseEffectAnimateIn:Play();
  275. CamShake(30, 5)
  276. wait(0.5);
  277. wait(1)
  278. CamShake(120, 2.5)
  279. TimeEraseEffectAnimateOut:Play()
  280. end)
  281. wait(2.5)
  282. -- Lighting;
  283.  
  284. if not (RealTime ~= nil) then
  285. RealTime = CreateSound('RealTime', SoundRealTime, Character, 0.5, 1, true, false)
  286. end
  287. wait(2)
  288. TimeErased = true
  289. end
  290.  
  291. function TimeResume()
  292. TimeErased = false
  293. if (RealTime ~= nil) then
  294. RealTime:Stop()
  295. RealTime.Parent = nil
  296. RealTime = nil
  297. end
  298.  
  299. CreateSound('TimeResume', SoundTimeResume, Character, 1, 1, false, true)
  300. -- Unfreeze-Local | Method by basbas1234
  301. if (Humanoid.RigType == Enum.HumanoidRigType.R6) then
  302. Torso.Anchored = true
  303. HumanoidRootPart.Name = 'HumanoidRootPart'
  304. FakeHumanoidRootPart.Parent = nil
  305. Torso.Anchored = false
  306. else
  307. Torso.Anchored = true
  308. HumanoidRootPart.Anchored = true
  309. FakeHumanoidRootPart.Parent = nil
  310. HumanoidRootPart.Name = 'HumanoidRootPart'
  311. local Motor6D = HumanoidRootPart:FindFirstChildOfClass('Motor6D')
  312. if (Motor6D) then
  313. Motor6D.Parent = nil
  314. end
  315. local Root = Torso:WaitForChild('Root')
  316. Root.Part0 = HumanoidRootPart
  317. Torso.Anchored = false
  318. HumanoidRootPart.Anchored = false
  319. end
  320. for Index, Self in pairs(Objects) do
  321. pcall(function()
  322. Self:Destroy();
  323. Self = nil
  324. end)
  325. end
  326. wait(5)
  327. CanTimeErase = true
  328. end
  329.  
  330. Mouse.KeyDown:Connect(function(Key)
  331. if (Key:lower() == 't' and not TimeErased and CanTimeErase) then
  332. TimeErase()
  333. elseif (Key:lower() == 't' and TimeErased) then
  334. TimeResume()
  335. end
  336. end)
  337.  
  338. Player.CharacterAdded:Connect(function(NewCharacter)
  339. Character = NewCharacter
  340. Humanoid = Character:FindFirstChildOfClass('Humanoid') or Character:WaitForChild('Humanoid')
  341. HumanoidRootPart = Character:FindFirstChild('HumanoidRootPart')
  342. Torso = Character:FindFirstChild('Torso') or Character:FindFirstChild('LowerTorso')
  343. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement