Yingyang005

Reverse Flash

Oct 5th, 2025 (edited)
29
0
Never
7
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.98 KB | None | 0 0
  1. -- Character Ultimate Powers v1
  2. -- Reverse Lumière+, Stop Time+, Quantum Rift+, Astral Form
  3. -- UI, mobile-compatible, respawn-proof
  4.  
  5. -- ===================== Config =====================
  6. local Config = {
  7. Reverse = {
  8. speed = 300, -- walk speed while Reverse
  9. afterimageLife = 0.25,
  10. afterimageInterval = 0.06,
  11. trailColor = Color3.fromRGB(200,240,255),
  12. },
  13. StopTime = {
  14. toolName = "Time Clicker",
  15. teleportRange = 3000,
  16. freezeRadius = 1000, -- radius around player to freeze (large by default)
  17. slowEffectDuration = 0.6,
  18. teleportTrailLife = 0.25,
  19. teleportTrailColors = {Color3.fromRGB(255,255,200), Color3.fromRGB(255,220,80)},
  20. shockPulseRadius = 30,
  21. },
  22. QuantumRift = {
  23. color = Color3.fromRGB(180,0,255),
  24. floatHeight = 2,
  25. trailRate = 400,
  26. },
  27. Astral = {
  28. speed = 120,
  29. ghostTransparency = 0.6,
  30. ghostColor = Color3.fromRGB(120,200,255),
  31. },
  32. UI = { width = 300, height = 380, corner = 14 },
  33. EffectsFolderName = "_CharacterUltimateEffects"
  34. }
  35.  
  36. -- ===================== Services =====================
  37. local Players = game:GetService("Players")
  38. local RunService = game:GetService("RunService")
  39. local Debris = game:GetService("Debris")
  40. local UserInputService = game:GetService("UserInputService")
  41. local ContextActionService = game:GetService("ContextActionService")
  42. local Workspace = game:GetService("Workspace")
  43.  
  44. local LocalPlayer = Players.LocalPlayer
  45.  
  46. -- safe wait helper
  47. local function safeWait(t) if t and t>0 then task.wait(t) end end
  48.  
  49. -- ===================== Main initializer (respawn-proof) =====================
  50. local function init()
  51. -- try/catch style protection
  52. local ok, err = pcall(function()
  53. -- Player GUI / Character
  54. local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")
  55. local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
  56. local Humanoid = Character:WaitForChild("Humanoid")
  57. local Root = Character:WaitForChild("HumanoidRootPart")
  58.  
  59. -- effects folder
  60. local effectsFolder = Workspace:FindFirstChild(Config.EffectsFolderName)
  61. if not effectsFolder then
  62. effectsFolder = Instance.new("Folder")
  63. effectsFolder.Name = Config.EffectsFolderName
  64. effectsFolder.Parent = Workspace
  65. end
  66.  
  67. -- ===== state =====
  68. local reverseOn = false
  69. local reverseConn = nil
  70. local reverseTrail = nil
  71.  
  72. local stopTimeOn = false
  73. local frozenEntities = {} -- table to store original state to restore
  74. local stopTool = nil
  75.  
  76. local riftOn = false
  77. local riftParticle = nil
  78.  
  79. local astralOn = false
  80. local ghost = nil
  81. local ghostControlConn = nil
  82.  
  83. local afterimageTicker = 0
  84.  
  85. -- utility: create afterimage of current character (for Reverse)
  86. local function createAfterimageFor(model, color, life)
  87. local clone = Instance.new("Model")
  88. clone.Name = "Afterimage"
  89. local primaryPart
  90. for _, part in pairs(model:GetDescendants()) do
  91. if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
  92. local p = Instance.new("Part")
  93. p.Size = part.Size
  94. p.CFrame = part.CFrame
  95. p.Anchored = true
  96. p.CanCollide = false
  97. p.Material = Enum.Material.Neon
  98. p.Color = color
  99. p.Transparency = 0.4
  100. p.Parent = clone
  101. end
  102. end
  103. clone.Parent = effectsFolder
  104. Debris:AddItem(clone, life or Config.Reverse.afterimageLife)
  105. end
  106.  
  107. -- ===== Reverse Lumière =====
  108. local function startReverse()
  109. if reverseOn then return end
  110. reverseOn = true
  111. -- increase speed
  112. if Humanoid then pcall(function() Humanoid.WalkSpeed = Config.Reverse.speed end) end
  113. -- trail
  114. local a0 = Instance.new("Attachment", Root)
  115. local a1 = Instance.new("Attachment", Root)
  116. reverseTrail = Instance.new("Trail")
  117. reverseTrail.Attachment0 = a0
  118. reverseTrail.Attachment1 = a1
  119. reverseTrail.Color = ColorSequence.new(Config.Reverse.trailColor)
  120. reverseTrail.Lifetime = 0.18
  121. reverseTrail.Parent = Root
  122.  
  123. -- afterimages loop
  124. reverseConn = RunService.Heartbeat:Connect(function(dt)
  125. afterimageTicker = afterimageTicker + dt
  126. if afterimageTicker >= Config.Reverse.afterimageInterval then
  127. afterimageTicker = 0
  128. -- create afterimage (local)
  129. pcall(function()
  130. createAfterimageFor(Character, Config.Reverse.trailColor, Config.Reverse.afterimageLife)
  131. end)
  132. end
  133. end)
  134. end
  135.  
  136. local function stopReverse()
  137. reverseOn = false
  138. if reverseConn then reverseConn:Disconnect() reverseConn = nil end
  139. if reverseTrail then reverseTrail:Destroy() reverseTrail = nil end
  140. if Humanoid then pcall(function() Humanoid.WalkSpeed = 16 end) end
  141. end
  142.  
  143. -- ===== Stop Time =====
  144. -- store original states and freeze others in range
  145. local function freezeAround()
  146. frozenEntities = {}
  147. local myPos = Root.Position
  148. -- players
  149. for _, pl in pairs(Players:GetPlayers()) do
  150. if pl ~= LocalPlayer and pl.Character and pl.Character:FindFirstChild("HumanoidRootPart") then
  151. local c = pl.Character
  152. local hp = c:FindFirstChild("Humanoid")
  153. local hrp = c:FindFirstChild("HumanoidRootPart")
  154. if hrp and hp then
  155. local dist = (hrp.Position - myPos).Magnitude
  156. if dist <= Config.StopTime.freezeRadius then
  157. local entry = {player = pl}
  158. -- store properties
  159. pcall(function()
  160. entry.walkSpeed = hp.WalkSpeed
  161. entry.jumpPower = hp.JumpPower
  162. entry.platformStand = hp.PlatformStand
  163. entry.anchoredParts = {}
  164. for _, part in pairs(c:GetDescendants()) do
  165. if part:IsA("BasePart") then
  166. entry.anchoredParts[part] = part.Anchored
  167. part.Anchored = true
  168. end
  169. end
  170. hp.WalkSpeed = 0
  171. hp.JumpPower = 0
  172. hp.PlatformStand = true
  173. end)
  174. table.insert(frozenEntities, entry)
  175. end
  176. end
  177. end
  178. end
  179. -- NPCs / other humanoids (non-player)
  180. for _, obj in pairs(Workspace:GetDescendants()) do
  181. if obj:IsA("Model") and obj:FindFirstChild("Humanoid") and obj:FindFirstChild("HumanoidRootPart") then
  182. local ownerPlayer = Players:GetPlayerFromCharacter(obj)
  183. if not ownerPlayer then -- not a player
  184. local hrp = obj:FindFirstChild("HumanoidRootPart")
  185. local hum = obj:FindFirstChild("Humanoid")
  186. if hrp and hum then
  187. local dist = (hrp.Position - myPos).Magnitude
  188. if dist <= Config.StopTime.freezeRadius then
  189. local entry = {npc = obj}
  190. pcall(function()
  191. entry.walkSpeed = hum.WalkSpeed
  192. entry.platformStand = hum.PlatformStand
  193. entry.anchoredParts = {}
  194. for _, part in pairs(obj:GetDescendants()) do
  195. if part:IsA("BasePart") then
  196. entry.anchoredParts[part] = part.Anchored
  197. part.Anchored = true
  198. end
  199. end
  200. hum.WalkSpeed = 0
  201. hum.PlatformStand = true
  202. end)
  203. table.insert(frozenEntities, entry)
  204. end
  205. end
  206. end
  207. end
  208. end
  209. end
  210.  
  211. local function unfreezeAll()
  212. for _, entry in pairs(frozenEntities) do
  213. pcall(function()
  214. if entry.player and entry.player.Character and entry.player.Character:FindFirstChild("Humanoid") then
  215. local h = entry.player.Character:FindFirstChild("Humanoid")
  216. h.WalkSpeed = entry.walkSpeed or 16
  217. h.JumpPower = entry.jumpPower or 50
  218. h.PlatformStand = entry.platformStand or false
  219. for part, wasAnch in pairs(entry.anchoredParts or {}) do
  220. if part and part.Parent then
  221. part.Anchored = wasAnch
  222. end
  223. end
  224. elseif entry.npc and entry.npc:FindFirstChild("Humanoid") then
  225. local nh = entry.npc:FindFirstChild("Humanoid")
  226. nh.WalkSpeed = entry.walkSpeed or 0
  227. nh.PlatformStand = entry.platformStand or false
  228. for part, wasAnch in pairs(entry.anchoredParts or {}) do
  229. if part and part.Parent then
  230. part.Anchored = wasAnch
  231. end
  232. end
  233. end
  234. end)
  235. end
  236. frozenEntities = {}
  237. end
  238.  
  239. -- teleport trail effect helper
  240. local function spawnTeleportTrail(fromPos, toPos)
  241. -- create a part path and small trails along it
  242. local dir = (toPos - fromPos)
  243. local length = math.max(1, dir.Magnitude)
  244. local steps = math.clamp(math.floor(length / 6), 3, 30)
  245. for i = 0, steps do
  246. local t = i / steps
  247. local pos = fromPos:Lerp(toPos, t)
  248. local p = Instance.new("Part")
  249. p.Size = Vector3.new(1.5,1.5,1.5)
  250. p.CFrame = CFrame.new(pos)
  251. p.Anchored = true
  252. p.CanCollide = false
  253. p.Material = Enum.Material.Neon
  254. p.Color = Config.StopTime.teleportTrailColors[(i%#Config.StopTime.teleportTrailColors)+1]
  255. p.Transparency = 0.2
  256. p.Parent = effectsFolder
  257. Debris:AddItem(p, Config.StopTime.teleportTrailLife)
  258. end
  259. end
  260.  
  261. -- give teleport tool (Stop Time tool)
  262. local function giveTeleportTool()
  263. if LocalPlayer.Backpack:FindFirstChild(Config.StopTime.toolName) then return end
  264. if LocalPlayer.Character and LocalPlayer.Character:FindFirstChild(Config.StopTime.toolName) then return end
  265.  
  266. local tool = Instance.new("Tool")
  267. tool.Name = Config.StopTime.toolName
  268. tool.RequiresHandle = false
  269. tool.CanBeDropped = false
  270.  
  271. -- for mobile compatibility we rely on Tool.Activated + Mouse.Hit (works in many environments)
  272. tool.Activated:Connect(function()
  273. local mouse = LocalPlayer:GetMouse()
  274. if not mouse then return end
  275. local hit = mouse.Hit
  276. if not hit then return end
  277. local target = hit.p
  278. -- limit range
  279. local dist = (target - Root.Position).Magnitude
  280. if dist > Config.StopTime.teleportRange then
  281. -- clamp to max range towards target
  282. target = Root.Position + (target - Root.Position).Unit * Config.StopTime.teleportRange
  283. end
  284.  
  285. -- create teleport trail and sound/effect
  286. spawnTeleportTrail(Root.Position, target)
  287.  
  288. -- teleport and small upward offset to avoid getting stuck
  289. Root.CFrame = CFrame.new(target + Vector3.new(0, 3, 0))
  290. end)
  291.  
  292. tool.Parent = LocalPlayer.Backpack
  293. stopTool = tool
  294. end
  295.  
  296. -- Stop Time toggle on
  297. local function startStopTime()
  298. if stopTimeOn then return end
  299. stopTimeOn = true
  300. -- freeze others in range
  301. freezeAround()
  302.  
  303. -- optional visual: small ring shock at player's feet
  304. local ring = Instance.new("Part")
  305. ring.Size = Vector3.new(1,1,1)
  306. ring.Shape = Enum.PartType.Ball
  307. ring.Anchored = true
  308. ring.CanCollide = false
  309. ring.Material = Enum.Material.Neon
  310. ring.Color = Color3.fromRGB(255,230,170)
  311. ring.Transparency = 0.5
  312. ring.CFrame = Root.CFrame * CFrame.new(0, -2, 0)
  313. ring.Parent = effectsFolder
  314. Debris:AddItem(ring, 1)
  315.  
  316. -- give teleport tool
  317. giveTeleportTool()
  318. end
  319.  
  320. local function stopStopTime()
  321. if not stopTimeOn then return end
  322. stopTimeOn = false
  323. unfreezeAll()
  324. -- remove tool if exists
  325. if stopTool and stopTool.Parent then
  326. stopTool:Destroy()
  327. stopTool = nil
  328. end
  329. end
  330.  
  331. -- ===== Quantum Rift =====
  332. local function startRift()
  333. if riftOn then return end
  334. riftOn = true
  335. -- make character parts non-collidable so player can pass through things
  336. local colChanged = {}
  337. for _, p in pairs(Character:GetDescendants()) do
  338. if p:IsA("BasePart") then
  339. colChanged[p] = p.CanCollide
  340. p.CanCollide = false
  341. p.Material = Enum.Material.ForceField
  342. p.Color = Config.QuantumRift.color
  343. p.Transparency = 0.2
  344. end
  345. end
  346. -- particle emitter on root
  347. local p = Instance.new("ParticleEmitter")
  348. p.Name = "RiftParticles"
  349. p.Texture = "rbxassetid://6880519346"
  350. p.Color = ColorSequence.new(Config.QuantumRift.color)
  351. p.Lifetime = NumberRange.new(0.4, 0.9)
  352. p.Rate = Config.QuantumRift.trailRate
  353. p.Speed = NumberRange.new(0.5, 2)
  354. p.Parent = Root
  355. riftParticle = p
  356.  
  357. -- allow normal movement (humanoid control) while parts non-collidable -> can pass through
  358. -- store colChanged table to restore later
  359. riftOn = true
  360. -- save to closure for restoration
  361. riftOn = {colState = colChanged, particle = p}
  362. end
  363.  
  364. local function stopRift()
  365. if not riftOn then return end
  366. local state = riftOn
  367. riftOn = false
  368. if state and state.colState then
  369. for part, was in pairs(state.colState) do
  370. if part and part.Parent then
  371. part.CanCollide = was
  372. part.Material = Enum.Material.Plastic
  373. part.Transparency = 0
  374. end
  375. end
  376. end
  377. if state and state.particle and state.particle.Parent then
  378. state.particle:Destroy()
  379. end
  380. end
  381.  
  382. -- ===== Astral Form =====
  383. local function createGhost()
  384. if ghost then ghost:Destroy() ghost = nil end
  385. ghost = Character:Clone()
  386. ghost.Name = "AstralGhost"
  387. ghost.Parent = effectsFolder
  388. -- remove scripts/humanoids so it won't act like a player character
  389. for _, obj in pairs(ghost:GetDescendants()) do
  390. if obj:IsA("Humanoid") then obj:Destroy() end
  391. if obj:IsA("Script") or obj:IsA("LocalScript") then obj:Destroy() end
  392. if obj:IsA("BasePart") then
  393. obj.CanCollide = false
  394. obj.Transparency = Config.Astral.ghostTransparency
  395. obj.Material = Enum.Material.Neon
  396. obj.Color = Config.Astral.ghostColor
  397. end
  398. end
  399. -- create a simple controller: BodyVelocity on primary
  400. local hrp = ghost:FindFirstChild("HumanoidRootPart") or ghost.PrimaryPart
  401. if hrp then
  402. local bv = Instance.new("BodyVelocity")
  403. bv.MaxForce = Vector3.new(1e5, 1e5, 1e5)
  404. bv.Velocity = Vector3.new(0,0,0)
  405. bv.Parent = hrp
  406. hrp:SetNetworkOwner(nil) -- try to keep it local-movable (depends on executor)
  407. end
  408. -- anchor original character so it remains
  409. for _, part in pairs(Character:GetDescendants()) do
  410. if part:IsA("BasePart") then
  411. part.Anchored = true
  412. end
  413. end
  414. end
  415.  
  416. local function destroyGhostAndReturn()
  417. if not ghost then return end
  418. local hrpGhost = ghost:FindFirstChild("HumanoidRootPart") or ghost.PrimaryPart
  419. if hrpGhost then
  420. -- put original character near ghost and unanchor
  421. Character:MoveTo(hrpGhost.Position + Vector3.new(0, 3, 0))
  422. end
  423. -- unanchor original
  424. for _, part in pairs(Character:GetDescendants()) do
  425. if part:IsA("BasePart") then
  426. part.Anchored = false
  427. end
  428. end
  429. ghost:Destroy()
  430. ghost = nil
  431. end
  432.  
  433. local function startAstral()
  434. if astralOn then return end
  435. astralOn = true
  436. createGhost()
  437. -- control ghost with WASD / joystick -> use ContextActionService
  438. local function moveGhost(actionName, inputState, inputObject)
  439. if not ghost or not ghost.Parent then return end
  440. local hrp = ghost:FindFirstChild("HumanoidRootPart") or ghost.PrimaryPart
  441. if not hrp then return end
  442. -- read movement vector from UserInputService
  443. local moveVector = Vector3.new(0,0,0)
  444. local forward = (Workspace.CurrentCamera and Workspace.CurrentCamera.CFrame.LookVector) or Vector3.new(0,0,-1)
  445. local right = (Workspace.CurrentCamera and Workspace.CurrentCamera.CFrame.RightVector) or Vector3.new(1,0,0)
  446. -- WASD keys
  447. if UserInputService:IsKeyDown(Enum.KeyCode.W) then moveVector = moveVector + forward end
  448. if UserInputService:IsKeyDown(Enum.KeyCode.S) then moveVector = moveVector - forward end
  449. if UserInputService:IsKeyDown(Enum.KeyCode.D) then moveVector = moveVector + right end
  450. if UserInputService:IsKeyDown(Enum.KeyCode.A) then moveVector = moveVector - right end
  451. -- normalize
  452. if moveVector.Magnitude > 0 then
  453. moveVector = moveVector.Unit * Config.Astral.speed
  454. end
  455. local bv = hrp:FindFirstChildOfClass("BodyVelocity")
  456. if bv then bv.Velocity = moveVector end
  457. end
  458. ghostControlConn = RunService.Heartbeat:Co
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment