Idisjsusus

Teste

Apr 4th, 2025
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.15 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local char = player.Character or player.CharacterAdded:Wait()
  3. local humanoid = char:FindFirstChildOfClass("Humanoid")
  4. local rootPart = char:FindFirstChild("HumanoidRootPart")
  5. local userInput = game:GetService("UserInputService")
  6. local runService = game:GetService("RunService")
  7. local tweenService = game:GetService("TweenService")
  8. local debris = game:GetService("Debris")
  9.  
  10. -- Tabela de animações principal
  11. local ANIMATIONS = {
  12. CrouchStart = "rbxassetid://98606150731314",
  13. CrouchIdle = "rbxassetid://74530436512522",
  14. CrouchWalk = "rbxassetid://94721495253171",
  15. CrouchRun = "rbxassetid://93499989310243",
  16. Stab = "rbxassetid://133133989835533",
  17. CrouchStab = "rbxassetid://119256819262245",
  18. Ritual = "rbxassetid://117339039533356",
  19. CrouchEnd = "rbxassetid://122093265676661",
  20. Stand = "rbxassetid://112995614541035",
  21. Hit = "rbxassetid://96032371062643",
  22. Respawn = "rbxassetid://75804462760596"
  23. }
  24.  
  25. -- Tabela de sons
  26. local SOUNDS = {
  27. ShadowStepDash = "93315212708186",
  28. ShadowStepHit = "100981628806546",
  29. ShadowStepImpact = "99820161736138",
  30. CrouchOn = "93315212708186",
  31. CrouchOff = "112995614541035",
  32. Ritual = "117339039533356",
  33. Mark = "100981628806546",
  34. Respawn = "84260460113659"
  35. }
  36.  
  37. -- Variáveis de estado
  38. local isCrouching = false
  39. local currentCrouchAnim = nil
  40. local crouchConnection = nil
  41. local shadowStepCooldown = false
  42. local ritualCooldown = false
  43. local crouchCooldown = false
  44. local ritualPosition = nil
  45. local originalWalkSpeed = humanoid.WalkSpeed
  46. local buttonsDraggable = true
  47. local abilityButtons = {}
  48. local cooldownLabels = {}
  49.  
  50. -- Cooldowns ajustados
  51. local COOLDOWNS = {
  52. Crouch = 1,
  53. ShadowStep = 25,
  54. Ritual = 60
  55. }
  56.  
  57. -- Verificar se o jogador está usando o personagem "TwoTime"
  58. local function isTwoTime()
  59. return char.Name == "TwoTime"
  60. end
  61.  
  62. -- Carregar o acessório da sombra
  63. local function loadKnifeAccessory()
  64. local knife = Instance.new("Accessory")
  65. knife.Name = "ShadowBladeAccessory"
  66.  
  67. local handle = Instance.new("Part")
  68. handle.Name = "Handle"
  69. handle.Size = Vector3.new(1, 1, 1)
  70. handle.CanCollide = false
  71. handle.Anchored = false
  72. handle.Transparency = 0.5
  73. handle.Color = Color3.new(0.1, 0.1, 0.1)
  74. handle.Parent = knife
  75.  
  76. local mesh = Instance.new("SpecialMesh")
  77. mesh.MeshId = "rbxassetid://18420062942"
  78. mesh.TextureId = "rbxassetid://12492575000"
  79. mesh.Parent = handle
  80.  
  81. local weld = Instance.new("Weld")
  82. weld.Part0 = handle
  83. weld.Part1 = char:FindFirstChild("Left Arm")
  84. weld.C0 = CFrame.new(-0.0130882263, 2.0306406, 0.595284879, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  85. weld.C1 = CFrame.new(0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  86. weld.Parent = handle
  87.  
  88. knife.Parent = char
  89. end
  90.  
  91. -- Função para carregar animações
  92. local function loadAnimation(animationId)
  93. local animation = Instance.new("Animation")
  94. animation.AnimationId = animationId
  95. return humanoid:LoadAnimation(animation)
  96. end
  97.  
  98. -- Carregar todas as animações
  99. local animations = {}
  100. for name, id in pairs(ANIMATIONS) do
  101. animations[name] = loadAnimation(id)
  102. end
  103.  
  104. -- Função para tocar sons
  105. local function playSound(soundId, parent, volume)
  106. local sound = Instance.new("Sound")
  107. sound.SoundId = "rbxassetid://" .. soundId
  108. sound.Volume = volume or 1
  109. sound.Parent = parent or workspace
  110. sound:Play()
  111. debris:AddItem(sound, sound.TimeLength + 1)
  112. end
  113.  
  114. -- Efeitos de fumaça
  115. local function createSmokeEffect(position)
  116. local smoke = Instance.new("Part")
  117. smoke.Size = Vector3.new(1, 1, 1)
  118. smoke.Position = position
  119. smoke.Transparency = 1
  120. smoke.CanCollide = false
  121. smoke.Anchored = true
  122. smoke.Parent = workspace
  123.  
  124. local particleEmitter = Instance.new("ParticleEmitter")
  125. particleEmitter.Size = NumberSequence.new(0.5, 2)
  126. particleEmitter.Texture = "rbxassetid://241840574"
  127. particleEmitter.Lifetime = NumberRange.new(1, 3)
  128. particleEmitter.Rate = 50
  129. particleEmitter.Speed = NumberRange.new(5, 10)
  130. particleEmitter.Parent = smoke
  131.  
  132. debris:AddItem(smoke, 3)
  133. end
  134.  
  135. -- Função para congelar/descongelar personagem
  136. local function setCharacterFrozen(freeze)
  137. if freeze then
  138. rootPart.Anchored = true
  139. humanoid.WalkSpeed = 0
  140. humanoid.JumpPower = 0
  141. else
  142. rootPart.Anchored = false
  143. humanoid.JumpPower = isCrouching and 0 or 50
  144. end
  145. end
  146.  
  147. -- Função para aumentar velocidade do jogador
  148. local function boostPlayerSpeed()
  149. local originalSpeed = humanoid.WalkSpeed
  150. humanoid.WalkSpeed = 35
  151. task.delay(3, function()
  152. if humanoid then
  153. humanoid.WalkSpeed = isCrouching and 16 or originalSpeed
  154. end
  155. end)
  156. end
  157.  
  158. -- Função de cooldown melhorada
  159. local function startCooldown(buttonName, duration, cooldownVar)
  160. cooldownVar = true
  161. abilityButtons[buttonName].Active = false
  162. cooldownLabels[buttonName].Visible = true
  163.  
  164. local endTime = os.time() + duration
  165. local cooldownLoop = runService.Heartbeat:Connect(function()
  166. local remaining = endTime - os.time()
  167. if remaining > 0 then
  168. cooldownLabels[buttonName].Text = tostring(math.ceil(remaining))
  169. else
  170. cooldownLabels[buttonName].Visible = false
  171. abilityButtons[buttonName].Active = true
  172. cooldownVar = false
  173. cooldownLoop:Disconnect()
  174. end
  175. end)
  176. end
  177.  
  178. -- Teleportar Survivors com Life2 para o ritual
  179. local function teleportSurvivorsToRitual(position)
  180. for _, survivor in ipairs(workspace.Players.Survivors:GetChildren()) do
  181. if survivor:FindFirstChild("Life2") then
  182. local hrp = survivor:FindFirstChild("HumanoidRootPart")
  183. if hrp then
  184. hrp.CFrame = position + Vector3.new(0, 3, 0)
  185. end
  186. end
  187. end
  188. end
  189.  
  190. -- Habilidade Crouch com cooldown
  191. local function toggleCrouch()
  192. if not crouchCooldown then
  193. startCooldown("Crouch", COOLDOWNS.Crouch, crouchCooldown)
  194.  
  195. if isCrouching then -- Desativar crouch
  196. setCharacterFrozen(true)
  197. playSound(SOUNDS.CrouchOff, char)
  198. animations.CrouchEnd:Play()
  199.  
  200. task.delay(animations.CrouchEnd.Length, function()
  201. setCharacterFrozen(false)
  202. isCrouching = false
  203. humanoid.WalkSpeed = originalWalkSpeed
  204. humanoid.JumpPower = 50
  205.  
  206. if currentCrouchAnim then
  207. currentCrouchAnim:Stop()
  208. end
  209.  
  210. if crouchConnection then
  211. crouchConnection:Disconnect()
  212. crouchConnection = nil
  213. end
  214. end)
  215. else -- Ativar crouch
  216. setCharacterFrozen(true)
  217. playSound(SOUNDS.CrouchOn, char)
  218. animations.CrouchStart:Play()
  219.  
  220. task.delay(animations.CrouchStart.Length, function()
  221. isCrouching = true
  222. humanoid.WalkSpeed = 16
  223. humanoid.JumpPower = 0
  224. setCharacterFrozen(false)
  225.  
  226. -- Iniciar animação de idle agachado
  227. animations.CrouchIdle:Play()
  228. currentCrouchAnim = animations.CrouchIdle
  229.  
  230. if crouchConnection then
  231. crouchConnection:Disconnect()
  232. end
  233.  
  234. -- Monitorar movimento enquanto agachado
  235. crouchConnection = humanoid.Running:Connect(function(speed)
  236. if currentCrouchAnim then
  237. currentCrouchAnim:Stop()
  238. end
  239.  
  240. if speed > 0 then
  241. if speed > 16 then
  242. animations.CrouchRun:Play()
  243. currentCrouchAnim = animations.CrouchRun
  244. else
  245. animations.CrouchWalk:Play()
  246. currentCrouchAnim = animations.CrouchWalk
  247. end
  248. else
  249. animations.CrouchIdle:Play()
  250. currentCrouchAnim = animations.CrouchIdle
  251. end
  252. end)
  253. end)
  254. end
  255. end
  256. end
  257.  
  258. -- Habilidade Shadow Step com cooldown e dash reduzido
  259. local function useShadowStep()
  260. if not shadowStepCooldown then
  261. startCooldown("ShadowStep", COOLDOWNS.ShadowStep, shadowStepCooldown)
  262.  
  263. local stabAnim = isCrouching and animations.CrouchStab or animations.Stab
  264. stabAnim:Play()
  265.  
  266. playSound(SOUNDS.ShadowStepDash, char)
  267. task.delay(0.5, function()
  268. playSound(SOUNDS.ShadowStepHit, char)
  269. end)
  270.  
  271. -- Dash reduzido (de 70 para 50)
  272. local dashVelocity = Instance.new("BodyVelocity")
  273. dashVelocity.Velocity = rootPart.CFrame.LookVector * 50
  274. dashVelocity.MaxForce = Vector3.new(1, 1, 1) * math.huge
  275. dashVelocity.Parent = rootPart
  276. debris:AddItem(dashVelocity, 0.25)
  277.  
  278. local hitbox = Instance.new("Part")
  279. hitbox.Size = Vector3.new(6, 6, 8)
  280. hitbox.CFrame = rootPart.CFrame + rootPart.CFrame.LookVector * 6
  281. hitbox.CanCollide = false
  282. hitbox.Transparency = 1
  283. hitbox.Parent = workspace
  284.  
  285. hitbox.Touched:Connect(function(hit)
  286. local targetPlayer = game.Players:GetPlayerFromCharacter(hit.Parent)
  287. if targetPlayer and (targetPlayer.Character.Name == "c00lkidd" or
  288. targetPlayer.Character.Name == "Jason" or
  289. targetPlayer.Character.Name == "JohnDoe" or
  290. targetPlayer.Character.Name == "1x1x1x1") then
  291.  
  292. local flingVelocity = Instance.new("BodyVelocity")
  293. flingVelocity.Velocity = rootPart.CFrame.LookVector * -25
  294. flingVelocity.MaxForce = Vector3.new(1, 1, 1) * math.huge
  295. flingVelocity.Parent = targetPlayer.Character.HumanoidRootPart
  296. debris:AddItem(flingVelocity, 0.6)
  297.  
  298. boostPlayerSpeed()
  299. playSound(SOUNDS.ShadowStepImpact, char)
  300. end
  301. end)
  302.  
  303. debris:AddItem(hitbox, 0.6)
  304. end
  305. end
  306.  
  307. -- Habilidade Ritual
  308. local function useRitual()
  309. if not ritualCooldown then
  310. startCooldown("Ritual", COOLDOWNS.Ritual, ritualCooldown)
  311.  
  312. playSound(SOUNDS.Ritual, char)
  313. animations.Ritual:Play()
  314.  
  315. ritualPosition = rootPart.CFrame - Vector3.new(0, 3, 0)
  316.  
  317. local ritualSymbol = Instance.new("Part")
  318. ritualSymbol.Size = Vector3.new(5, 0.2, 5)
  319. ritualSymbol.CFrame = ritualPosition
  320. ritualSymbol.Anchored = true
  321. ritualSymbol.CanCollide = false
  322. ritualSymbol.Transparency = 0.5
  323. ritualSymbol.Color = Color3.new(0, 0, 0)
  324.  
  325. -- Aplicar a textura personalizada
  326. local decal = Instance.new("Decal")
  327. decal.Texture = "rbxassetid://80566262142997"
  328. decal.Face = Enum.NormalId.Top
  329. decal.Parent = ritualSymbol
  330.  
  331. ritualSymbol.Parent = workspace
  332.  
  333. createSmokeEffect(ritualSymbol.Position)
  334.  
  335. -- Teleportar Survivors com Life2
  336. teleportSurvivorsToRitual(ritualPosition)
  337.  
  338. humanoid.Health = humanoid.Health + 20
  339. humanoid.WalkSpeed = humanoid.WalkSpeed + 3
  340. task.delay(7, function()
  341. humanoid.WalkSpeed = humanoid.WalkSpeed - 3
  342. end)
  343.  
  344. humanoid.Died:Connect(function()
  345. playSound(SOUNDS.Respawn, char)
  346. animations.Respawn:Play()
  347. task.delay(1.5, function()
  348. if ritualPosition then
  349. rootPart.CFrame = ritualPosition + Vector3.new(0, 3, 0)
  350. end
  351. end)
  352. end)
  353. end
  354. end
  355.  
  356. -- Função para criar botões de habilidade PERFEITAMENTE CIRCULARES
  357. local function createAbilityButtons()
  358. local screenGui = Instance.new("ScreenGui")
  359. screenGui.Name = "AbilityGUI"
  360. screenGui.ResetOnSpawn = false
  361. screenGui.Parent = player:WaitForChild("PlayerGui")
  362.  
  363. -- Função para criar um botão de habilidade circular
  364. local function createAbilityButton(name, position, callback)
  365. -- Container principal (invisível, apenas para posicionamento)
  366. local buttonContainer = Instance.new("Frame")
  367. buttonContainer.Name = name.."Container"
  368. buttonContainer.Size = UDim2.new(0.08, 0, 0.08, 0)
  369. buttonContainer.Position = position
  370. buttonContainer.BackgroundTransparency = 1
  371. buttonContainer.Parent = screenGui
  372.  
  373. -- Círculo externo (borda branca)
  374. local outerCircle = Instance.new("Frame")
  375. outerCircle.Name = "OuterCircle"
  376. outerCircle.Size = UDim2.new(1, 0, 1, 0)
  377. outerCircle.BackgroundColor3 = Color3.new(1, 1, 1)
  378. outerCircle.BackgroundTransparency = 0.7
  379. outerCircle.Parent = buttonContainer
  380.  
  381. -- Tornar PERFEITAMENTE circular
  382. local corner = Instance.new("UICorner")
  383. corner.CornerRadius = UDim.new(1, 0)
  384. corner.Parent = outerCircle
  385.  
  386. -- Círculo interno (fundo transparente)
  387. local innerCircle = Instance.new("Frame")
  388. innerCircle.Name = "InnerCircle"
  389. innerCircle.Size = UDim2.new(0.8, 0, 0.8, 0)
  390. innerCircle.Position = UDim2.new(0.1, 0, 0.1, 0)
  391. innerCircle.BackgroundColor3 = Color3.new(1, 1, 1)
  392. innerCircle.BackgroundTransparency = 0.9
  393. innerCircle.Parent = outerCircle
  394.  
  395. -- Tornar PERFEITAMENTE circular
  396. local innerCorner = Instance.new("UICorner")
  397. innerCorner.CornerRadius = UDim.new(1, 0)
  398. innerCorner.Parent = innerCircle
  399.  
  400. -- Texto do botão
  401. local label = Instance.new("TextLabel")
  402. label.Name = "Label"
  403. label.Size = UDim2.new(1, 0, 1, 0)
  404. label.BackgroundTransparency = 1
  405. label.Text = name
  406. label.TextColor3 = Color3.new(0, 0, 0)
  407. label.TextScaled = true
  408. label.Font = Enum.Font.GothamBold
  409. label.Parent = outerCircle
  410.  
  411. -- Label de cooldown
  412. local cooldownLabel = Instance.new("TextLabel")
  413. cooldownLabel.Name = "CooldownLabel"
  414. cooldownLabel.Size = UDim2.new(1, 0, 1, 0)
  415. cooldownLabel.BackgroundTransparency = 0.7
  416. cooldownLabel.BackgroundColor3 = Color3.new(0, 0, 0)
  417. cooldownLabel.Text = ""
  418. cooldownLabel.TextColor3 = Color3.new(1, 1, 1)
  419. cooldownLabel.TextScaled = true
  420. cooldownLabel.Font = Enum.Font.GothamBold
  421. cooldownLabel.Visible = false
  422. cooldownLabel.Parent = outerCircle
  423.  
  424. -- Adicionar funcionalidade de arrastar
  425. local dragStartPos, buttonStartPos
  426.  
  427. outerCircle.InputBegan:Connect(function(input)
  428. if input.UserInputType == Enum.UserInputType.MouseButton1 and buttonsDraggable then
  429. dragStartPos = Vector2.new(input.Position.X, input.Position.Y)
  430. buttonStartPos = buttonContainer.Position
  431. end
  432. end)
  433.  
  434. outerCircle.InputChanged:Connect(function(input)
  435. if input.UserInputType == Enum.UserInputType.MouseMovement and dragStartPos and buttonsDraggable then
  436. local delta = Vector2.new(input.Position.X, input.Position.Y) - dragStartPos
  437. buttonContainer.Position = UDim2.new(
  438. buttonStartPos.X.Scale,
  439. buttonStartPos.X.Offset + delta.X,
  440. buttonStartPos.Y.Scale,
  441. buttonStartPos.Y.Offset + delta.Y
  442. )
  443. end
  444. end)
  445.  
  446. outerCircle.InputEnded:Connect(function(input)
  447. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  448. dragStartPos = nil
  449. end
  450. end)
  451.  
  452. outerCircle.MouseButton1Click:Connect(function()
  453. if outerCircle.Active then
  454. callback()
  455. end
  456. end)
  457.  
  458. abilityButtons[name] = outerCircle
  459. cooldownLabels[name] = cooldownLabel
  460. return buttonContainer
  461. end
  462.  
  463. -- Criar botões de habilidades
  464. createAbilityButton("Crouch", UDim2.new(0.1, 0, 0.7, 0), toggleCrouch)
  465. createAbilityButton("ShadowStep", UDim2.new(0.2, 0, 0.7, 0), useShadowStep)
  466. createAbilityButton("Ritual", UDim2.new(0.3, 0, 0.7, 0), useRitual)
  467.  
  468. -- Botão de trava para arrastar
  469. local lockButton = Instance.new("TextButton")
  470. lockButton.Name = "LockButton"
  471. lockButton.Size = UDim2.new(0.05, 0, 0.05, 0)
  472. lockButton.Position = UDim2.new(0.95, 0, 0.05, 0)
  473. lockButton.BackgroundColor3 = Color3.new(1, 1, 1)
  474. lockButton.BackgroundTransparency = 0.5
  475. lockButton.TextColor3 = Color3.new(0, 0, 0)
  476. lockButton.Text = "🔓"
  477. lockButton.TextScaled = true
  478. lockButton.Parent = screenGui
  479.  
  480. -- Tornar o botão circular
  481. local corner = Instance.new("UICorner")
  482. corner.CornerRadius = UDim.new(1, 0)
  483. corner.Parent = lockButton
  484.  
  485. lockButton.MouseButton1Click:Connect(function()
  486. buttonsDraggable = not buttonsDraggable
  487. if buttonsDraggable then
  488. lockButton.Text = "🔓"
  489. else
  490. lockButton.Text = "🔒"
  491. end
  492.  
  493. for _, button in pairs(abilityButtons) do
  494. button.Draggable = buttonsDraggable
  495. end
  496. end)
  497.  
  498. return screenGui
  499. end
  500.  
  501. -- Função para mostrar/ocultar botões baseado no personagem
  502. local function updateAbilityButtonsVisibility()
  503. local abilityGUI = player.PlayerGui:FindFirstChild("AbilityGUI")
  504. if abilityGUI then
  505. local visible = isTwoTime()
  506. for _, button in pairs(abilityButtons) do
  507. button.Parent.Visible = visible
  508. end
  509. abilityGUI.LockButton.Visible = visible
  510. end
  511. end
  512.  
  513. -- Inicialização
  514. local function initialize()
  515. -- Carregar animações
  516. for name, id in pairs(ANIMATIONS) do
  517. animations[name] = loadAnimation(id)
  518. end
  519.  
  520. -- Criar GUI de habilidades
  521. createAbilityButtons()
  522.  
  523. -- Carregar faca se for TwoTime
  524. if isTwoTime() then
  525. loadKnifeAccessory()
  526. end
  527.  
  528. -- Atualizar visibilidade dos botões
  529. updateAbilityButtonsVisibility()
  530.  
  531. -- Monitorar mudanças de personagem
  532. player.CharacterAdded:Connect(function(newChar)
  533. char = newChar
  534. humanoid = char:FindFirstChildOfClass("Humanoid")
  535. rootPart = char:FindFirstChild("HumanoidRootPart")
  536. originalWalkSpeed = humanoid.WalkSpeed
  537.  
  538. -- Recarregar animações para o novo personagem
  539. for name, id in pairs(ANIMATIONS) do
  540. animations[name] = loadAnimation(id)
  541. end
  542.  
  543. -- Carregar faca se for TwoTime
  544. if isTwoTime() then
  545. loadKnifeAccessory()
  546. end
  547.  
  548. -- Atualizar visibilidade dos botões
  549. updateAbilityButtonsVisibility()
  550. end)
  551. end
  552.  
  553. -- Iniciar o script
  554. initialize()
Advertisement
Add Comment
Please, Sign In to add comment