Advertisement
KrYn0MoRe

32k sword + 10 totems

Apr 28th, 2020
1,095
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 25.63 KB | None | 0 0
  1. warn[[
  2. AlmightyToast's 32K Sword
  3.  
  4. Sharpness enchantment.level.32767
  5. Knockback X
  6. Fire Aspect enchantment.level.32767
  7. Looting X
  8. Sweeping Edge III
  9. Unbreaking enchantment.level.32767
  10. Mending
  11. Curse of Vanishing
  12.  
  13. When in main hand:
  14. 1.6 Attack Speed
  15. 16391 Attack Damage
  16. ]]
  17.  
  18. function spawn_32k()
  19. local plr = owner
  20. local char = plr.Character
  21. local hum = char:FindFirstChildOfClass("Humanoid")
  22. local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
  23. local head = char:FindFirstChild("Head")
  24.  
  25. if hum.RigType ~= Enum.HumanoidRigType.R6 then warn("turn r6 or it wont work lol") return end
  26.  
  27. local tool = Instance.new("Tool")
  28. local handle = Instance.new("Part")
  29. local SpecialMesh2 = Instance.new("SpecialMesh")
  30. tool.Name = "AlmightyToast's 32K Sword"
  31. tool.Parent = plr.Backpack
  32. tool.TextureId = 'rbxassetid:/4911466046'
  33. tool.ToolTip = [[
  34. AlmightyToast's 32K Sword
  35.  
  36. Sharpness enchantment.level.32767
  37. Knockback X
  38. Fire Aspect enchantment.level.32767
  39. Looting X
  40. Sweeping Edge III
  41. Unbreaking enchantment.level.32767
  42. Mending
  43. Curse of Vanishing
  44.  
  45. When in main hand:
  46. 1.6 Attack Speed
  47. 81917.5 Attack Damage
  48. ]]
  49. tool.Grip = CFrame.new(-1.10684741, 4.97379915e-14, 0.99055028, -3.20973932e-08, 0.734302819, 0.6788221, -1, -4.37113883e-08, 0, 2.96722487e-08, -0.6788221, 0.734302819)
  50. handle.Name = "Handle"
  51. handle.Parent = tool
  52. handle.Size = Vector3.new(3.1400001, 0.195999995, 3.1400001)
  53. handle.BottomSurface = Enum.SurfaceType.Smooth
  54. handle.CanCollide = false
  55. handle.TopSurface = Enum.SurfaceType.Smooth
  56. SpecialMesh2.Parent = handle
  57. SpecialMesh2.MeshId = "rbxassetid://3676810102"
  58. SpecialMesh2.Scale = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  59. SpecialMesh2.TextureId = "rbxassetid://3676810220"
  60. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  61.  
  62. for i,v in pairs(tool:GetChildren()) do
  63.     v.Massless = true
  64.     if v:IsA("Part") and v ~= handle then
  65.         local weld = Instance.new("Weld")
  66.         weld.Part0 = handle
  67.         weld.Part1 = v
  68.         weld.C0 = handle.CFrame:Inverse()
  69.         weld.C1 = v.CFrame:Inverse()
  70.         weld.Parent = v
  71.     end
  72. end
  73.  
  74. tool.Parent = char
  75.  
  76. local debris = game:GetService("Debris")
  77. local tween = game:GetService("TweenService")
  78.  
  79. local sword_meta = {sharpness = 32767, knockback = 10}
  80.  
  81. local using = false
  82. local equipped = false
  83. local holding = false
  84. local stamina = 100
  85. local dmg = 35 + (5 * sword_meta.sharpness)
  86. local kb = 25 + (3 * sword_meta.knockback)
  87. local ls = nil
  88. local blocking = false
  89. local combat_18 = true
  90. local first_person = true
  91.  
  92. local effects = {}
  93.  
  94. function effects.sandbox(var,func)
  95.     local env = getfenv(func)
  96.     local newenv = setmetatable({},{
  97.         __index = function(self,k)
  98.             if k=="script" then
  99.                 return var
  100.             else
  101.                 return env[k]
  102.             end
  103.         end,
  104.     })
  105.     setfenv(func,newenv)
  106.     return func
  107. end
  108.  
  109. local hitsound2 = Instance.new("Sound")
  110. hitsound2.SoundId = 'rbxassetid://3362346832'
  111. hitsound2.Volume = 1.5
  112. hitsound2.Parent = handle
  113.  
  114. local critsound = Instance.new("Sound")
  115. critsound.SoundId = 'rbxassetid://4801410586'
  116. critsound.Volume = 1.5
  117. critsound.Parent = handle
  118.  
  119. function effects.effect(par,tarhum,weld,damage,targtorso,crit)
  120.     local confirm = Instance.new("IntValue",par)
  121.     confirm.Name = plr.Name .. 'swordhit 32k'
  122.     confirm.Parent = par
  123.     if combat_18 then
  124.         debris:AddItem(confirm,0.05)
  125.     else
  126.         debris:AddItem(confirm,0.12)
  127.     end
  128.     if not par:FindFirstChild('fireaspect dmg') then
  129.         local fireconfirm = Instance.new("IntValue",par)
  130.         fireconfirm.Name = 'fireaspect dmg'
  131.         fireconfirm.Parent = par
  132.         debris:AddItem(fireconfirm,12)
  133.         for i,v in pairs(par:GetChildren()) do
  134.             if (v:IsA("Part") or v:IsA("WedgePart") or v:IsA("BasePart") or v:IsA("MeshPart") or v:IsA("UnionOperation")) and v.Name ~= "effects" then
  135.                 local fire = Instance.new("Fire")
  136.                 fire.Parent = v
  137.                 debris:AddItem(fire,12)
  138.             end
  139.         end
  140.         local clonehit = hitsound2:Clone()
  141.         clonehit.Parent = weld
  142.         spawn(function()
  143.             while fireconfirm and fireconfirm.Parent and tarhum and tarhum.Parent and tarhum.Health > 0 and clonehit and clonehit.Parent do
  144.                 wait(1)
  145.                 clonehit:Play()
  146.                 tarhum:TakeDamage(5)
  147.                 for i,v in pairs(par:GetDescendants()) do
  148.                     if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" and not v:IsDescendantOf(char) and not v.Parent:IsA("Tool") and v.Name ~= "fallblock" then
  149.                         spawn(function()
  150.                             local weld = Instance.new("Weld")
  151.                             local part = v:Clone()
  152.                             part.CanCollide = false
  153.                             part.Massless = true
  154.                             part.Anchored = false
  155.                             for i,n in pairs(part:GetDescendants()) do
  156.                                 if not n:IsA("SpecialMesh") then
  157.                                     n:Destroy()
  158.                                 end
  159.                                 if n:IsA("SpecialMesh") then
  160.                                     n.TextureId = ""
  161.                                     n.Scale = n.Scale * 1.001
  162.                                 end
  163.                             end
  164.                             weld.Part0 = part
  165.                             weld.Part1 = v
  166.                             weld.Parent = part
  167.                             part.BrickColor = BrickColor.new("Really red")
  168.                             part.Size = v.Size * 1.001
  169.                             part.Material = Enum.Material.SmoothPlastic
  170.                             part.CFrame = v.CFrame
  171.                             part.Parent = v.Parent
  172.                             part.Name = "hurtcolor"
  173.                             if 0.6 >= v.Transparency then
  174.                                 part.Transparency = 0.6
  175.                             end
  176.                             if v.Transparency > 0.6 then
  177.                                 part.Transparency = v.Transparency*1.5
  178.                             end
  179.                             part.CanCollide = false
  180.                             wait(0.1)
  181.                             part:Destroy()
  182.                         end)
  183.                     end
  184.                 end
  185.             end
  186.         end)
  187.     end
  188.     tarhum:TakeDamage(damage)
  189.     if not hitsound2 then
  190.         hitsound2 = Instance.new("Sound")
  191.         hitsound2.SoundId = 'rbxassetid://3362346832'
  192.         hitsound2.Volume = 1.5
  193.         hitsound2.Parent = handle
  194.     end
  195.     if not critsound then
  196.         critsound = Instance.new("Sound")
  197.         critsound.SoundId = 'rbxassetid://4801410586'
  198.         critsound.Volume = 1.5
  199.         critsound.Parent = handle
  200.     end
  201.     if math.random(1,2) == 1 and crit then
  202.         critsound.SoundId = 'rbxassetid://4801410586'
  203.     elseif math.random(1,2) == 2 and crit then
  204.         critsound.SoundId = 'rbxassetid://4801410149'
  205.     elseif math.random(1,2) == 1 then
  206.         hitsound2.SoundId = 'rbxassetid://3362346832'
  207.     else
  208.         hitsound2.SoundId = 'rbxassetid://3362337129'
  209.     end
  210.     if crit then
  211.         critsound:Play()
  212.     else
  213.         hitsound2:Play()
  214.     end
  215.     --[[
  216.     spawn(function()
  217.         repeat wait() until not hitsound2.IsPlaying
  218.         hitsound2.Parent = nil
  219.     end)
  220.     ]]
  221.     spawn(function()
  222.         local b = Instance.new("BodyVelocity")
  223.         b.Parent = targtorso
  224.         b.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  225.         b.Velocity = torso.CFrame.LookVector*(kb*1.25) + Vector3.new(0,9,0)
  226.         debris:AddItem(b,0.1)
  227.     end)
  228.     for i,v in pairs(par:GetDescendants()) do
  229.         if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" and not v:IsDescendantOf(char) and not v.Parent:IsA("Tool") and v.Name ~= "fallblock" then
  230.             spawn(function()
  231.                 local weld = Instance.new("Weld")
  232.                 local part = v:Clone()
  233.                 part.CanCollide = false
  234.                 part.Massless = true
  235.                 part.Anchored = false
  236.                 for i,n in pairs(part:GetDescendants()) do
  237.                     if not n:IsA("SpecialMesh") then
  238.                         n:Destroy()
  239.                     end
  240.                     if n:IsA("SpecialMesh") then
  241.                         n.TextureId = ""
  242.                         n.Scale = n.Scale * 1.001
  243.                     end
  244.                 end
  245.                 weld.Part0 = part
  246.                 weld.Part1 = v
  247.                 weld.Parent = part
  248.                 part.BrickColor = BrickColor.new("Really red")
  249.                 part.Size = v.Size * 1.001
  250.                 part.Material = Enum.Material.SmoothPlastic
  251.                 part.CFrame = v.CFrame
  252.                 part.Parent = v.Parent
  253.                 part.Name = "hurtcolor"
  254.                 if 0.6 >= v.Transparency then
  255.                     part.Transparency = 0.6
  256.                 end
  257.                 if v.Transparency > 0.6 then
  258.                     part.Transparency = v.Transparency*1.5
  259.                 end
  260.                 part.CanCollide = false
  261.                 wait(0.1)
  262.                 part:Destroy()
  263.             end)
  264.         end
  265.     end
  266.     if 0 >= tarhum.Health then
  267.         local targplr = game:GetService("Players"):GetPlayerFromCharacter(par)
  268.         if targplr then
  269.             for i,v in pairs(targplr['Backpack']:GetChildren()) do
  270.                 pcall(function()
  271.                     if v:IsA("Tool") then
  272.                         v.Parent = workspace
  273.                         v.Handle.CanCollide = true
  274.                         v.Handle.Position = weld.Position+Vector3.new(0,2,0)
  275.                     end
  276.                 end)
  277.             end
  278.         end
  279.         for i,v in pairs(par:GetChildren()) do
  280.             pcall(function()
  281.                 if v:IsA("Tool") then
  282.                     v.Parent = workspace
  283.                     v.Handle.CanCollide = true
  284.                     v.Handle.Position = weld.Position+Vector3.new(0,2,0)
  285.                 end
  286.             end)
  287.         end
  288.     end
  289. end
  290.  
  291. local stamina = 100
  292.  
  293. local function recharge()
  294.     if 100 > stamina then
  295.         stamina = stamina + 10
  296.     end
  297.     if stamina > 100 then
  298.         stamina = 100
  299.     end
  300. end
  301.  
  302. spawn(function()
  303.     while wait(0.06) do
  304.         wait(0.06)
  305.         recharge()
  306.     end
  307. end)
  308.  
  309. local isFalling = false
  310. hum.StateChanged:Connect(function(old,new)
  311.     if new == Enum.HumanoidStateType.Landed then
  312.         isFalling = false
  313.     elseif new == Enum.HumanoidStateType.Running then
  314.         isFalling = false
  315.     elseif new == Enum.HumanoidStateType.RunningNoPhysics then
  316.         isFalling = false
  317.     elseif new == Enum.HumanoidStateType.Jumping then
  318.         isFalling = true
  319.     elseif new == Enum.HumanoidStateType.FallingDown then
  320.         isFalling = true
  321.     elseif new == Enum.HumanoidStateType.Freefall then
  322.         isFalling = true
  323.     elseif new == Enum.HumanoidStateType.Climbing then
  324.         isFalling = false
  325.     end
  326. end)
  327.  
  328. local hitanimid = 0
  329.  
  330. local function hit(target,close)
  331.     spawn(function()
  332.         hitanimid = 1
  333.         if hitanimid == 1 then else return end
  334.         tween:Create(tool,TweenInfo.new(0.12),{Grip = CFrame.new(-1.12343681, 7.46069873e-14, 0.865265131, -2.96722469e-08, 0.678822041, -0.734302819, -1, -4.37113883e-08, 0, -3.20973932e-08, 0.734302819, 0.678822041)}):Play()
  335.         hitanimid = 2
  336.         wait(0.08)
  337.         if hitanimid == 2 then else return end
  338.         tween:Create(tool,TweenInfo.new(0.12),{Grip = CFrame.new(-0.825168073, -0.020077154, 1.00834012, -0.275093406, 0.960726619, -0.0364401713, -0.146487176, -0.0044247508, 0.989202619, 0.950192153, 0.277461171, 0.141951352)}):Play()
  339.         hitanimid = 3
  340.         wait(0.04)
  341.         if hitanimid == 3 then else return end
  342.         tween:Create(tool,TweenInfo.new(0.12),{Grip = CFrame.new(-1.10684741, 4.97379915e-14, 0.99055028, -3.20973932e-08, 0.734302819, 0.6788221, -1, -4.37113883e-08, 0, 2.96722487e-08, -0.6788221, 0.734302819)}):Play()
  343.     end)
  344.     if (combat_18 or (stamina > 30 and not combat_18)) and ((target and close) or not first_person) then else return end
  345.        
  346.     local temp_dmg = 0
  347.     local crit = false
  348.    
  349.     if combat_18 then
  350.         temp_dmg = dmg+(5 * (32000 + 1))
  351.     else
  352.         if isFalling then
  353.             temp_dmg = (dmg*1.57142857)+(5 * (32000 + 1))
  354.             crit = true
  355.         elseif stamina > 30 then
  356.             temp_dmg = dmg+(5 * (32000 + 1))
  357.         end
  358.         stamina = 0
  359.     end
  360.    
  361.     local connection
  362.    
  363.     if not first_person then
  364.         connection = handle.Touched:Connect(function(obj)
  365.             local targchar,targtorso,targhum
  366.             pcall(function()
  367.                 targchar = obj.Parent
  368.             end)
  369.             pcall(function()
  370.                 targtorso = targchar:FindFirstChild("Torso") or targchar:FindFirstChild("HumanoidRootPart")
  371.             end)
  372.             pcall(function()
  373.                 targhum = targchar:FindFirstChildOfClass("Humanoid")
  374.             end)
  375.             if targchar and targchar ~= char and targtorso and targhum then
  376.                 if targhum ~= nil then
  377.                     if targhum.Parent then
  378.                         if not targhum.Parent:FindFirstChild(plr.Name .. "swordhit 32k") and obj.Parent:IsA("Model") and targhum.Health > 0 then
  379.                             effects.effect(targhum.Parent,targhum,targchar.PrimaryPart,temp_dmg,targtorso,crit)
  380.                         end
  381.                     end
  382.                 end
  383.             end
  384.         end)
  385.     elseif first_person then
  386.         local targchar,targtorso,targhum
  387.         for i,v in pairs(workspace:GetChildren()) do
  388.             if target:IsDescendantOf(v) then
  389.                 targchar = v
  390.             end
  391.         end
  392.         --[[
  393.         pcall(function()
  394.             targchar = target.Parent
  395.         end)
  396.         ]]
  397.         pcall(function()
  398.             targtorso = targchar:FindFirstChild("Torso") or targchar:FindFirstChild("HumanoidRootPart")
  399.         end)
  400.         pcall(function()
  401.             targhum = targchar:FindFirstChildOfClass("Humanoid")
  402.         end)
  403.         if target and targchar and targchar ~= char and targtorso and targhum then
  404.             if targhum ~= nil then
  405.                 if targhum.Parent then
  406.                     if not targhum.Parent:FindFirstChild(plr.Name .. "swordhit 32k") and targchar:IsA("Model") and targhum.Health > 0 then
  407.                         effects.effect(targhum.Parent,targhum,targchar.PrimaryPart,temp_dmg,targtorso,crit)
  408.                     end
  409.                 end
  410.             end
  411.         end
  412.     end
  413.     if combat_18 then
  414.         wait(0.05)
  415.     else
  416.         wait(0.12)
  417.     end
  418.    
  419.     spawn(function()
  420.         wait(0.1)
  421.         connection:Disconnect()
  422.     end)
  423. end
  424.  
  425. local function CheckIfAlive()
  426.     local alive = false;
  427.     if (plr and plr.Parent and char and char.Parent and hum and hum.Parent and hum.Health > 0 and torso and torso.Parent and head and head.Parent) then
  428.         alive = true;
  429.     end;
  430.     return alive;
  431. end;
  432.  
  433. tool.Equipped:Connect(function()
  434.     char = tool.Parent;
  435.     plr = game:GetService("Players"):GetPlayerFromCharacter(char);
  436.     hum = char:FindFirstChildOfClass("Humanoid");
  437.     torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart");
  438.     head = char:FindFirstChild("Head");
  439.     if not CheckIfAlive() then tool.Parent = nil return end;
  440.     equipped = true
  441. end)
  442.  
  443. tool.Unequipped:Connect(function()
  444.     if 0 >= hum.Health then
  445.         tool:Destroy()
  446.     end
  447.     equipped = false
  448. end)
  449.  
  450. local mouseremote = Instance.new("RemoteEvent")
  451. mouseremote.Name = "mouseremote"
  452. mouseremote.Parent = tool
  453.  
  454. local code = [[
  455. workspace.Camera.FieldOfView = 90
  456. local plr = game:GetService("Players").LocalPlayer
  457. local char = plr.Character
  458. local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
  459. local hum = char:FindFirstChildOfClass("Humanoid")
  460. local mouse = plr:GetMouse()
  461. local remote = script.Parent:WaitForChild("mouseremote")
  462.  
  463. mouse.TargetFilter = char
  464. plr.CameraMode = Enum.CameraMode.LockFirstPerson
  465.  
  466. mouse.Button1Down:Connect(function()
  467.     local target = mouse.Target
  468.     local mag = nil
  469.     local close = false
  470.     if target and torso then
  471.         mag = (torso.Position - target.Position).magnitude
  472.     end
  473.     if mag and 8 >= mag then
  474.         close = true
  475.     end
  476.     remote:FireServer(1,target,close)
  477. end)
  478.  
  479. mouse.KeyDown:Connect(function(key)
  480.     if key == "e" then
  481.         remote:FireServer(2,true)
  482.     end
  483. end)
  484.  
  485. mouse.KeyUp:Connect(function(key)
  486.     if key == "e" then
  487.         remote:FireServer(2,false)
  488.     end
  489. end)
  490. ]]
  491.  
  492. NLS(code,tool)
  493.  
  494. mouseremote.OnServerEvent:Connect(function(plr,mode,data,data2)
  495.     if mode == 1 and equipped and not using and not blocking then
  496.         using = true
  497.         hit(data,data2)
  498.         using = false
  499.     end
  500.     if mode == 2 then
  501.         if data then
  502.             blocking = true
  503.             tool.Grip = CFrame.new(-0.825168073, -0.020077154, 1.00834012, -0.275093406, 0.960726619, -0.0364401713, -0.146487176, -0.0044247508, 0.989202619, 0.950192153, 0.277461171, 0.141951352)
  504.             --tween:Create(tool,TweenInfo.new(0.12),{Grip = CFrame.new(-0.825168073, -0.020077154, 1.00834012, -0.275093406, 0.960726619, -0.0364401713, -0.146487176, -0.0044247508, 0.989202619, 0.950192153, 0.277461171, 0.141951352)}):Play()
  505.         elseif not data then
  506.             blocking = false
  507.             tool.Grip = CFrame.new(-1.10684741, 4.97379915e-14, 0.99055028, -3.20973932e-08, 0.734302819, 0.6788221, -1, -4.37113883e-08, 0, 2.96722487e-08, -0.6788221, 0.734302819)
  508.             --tween:Create(tool,TweenInfo.new(0.12),{Grip = CFrame.new(-1.10684741, 4.97379915e-14, 0.99055028, -3.20973932e-08, 0.734302819, 0.6788221, -1, -4.37113883e-08, 0, 2.96722487e-08, -0.6788221, 0.734302819)}):Play()
  509.         end
  510.     end
  511. end)
  512.  
  513. local box = Instance.new("SelectionBox")
  514. box.Adornee = handle
  515. box.Parent = handle
  516. box.LineThickness = 0.025
  517.  
  518. local g = 0
  519. local b = 120
  520. local t = 0
  521. local increment = 4
  522. local increase1,increase2,increase3 = true,false,true
  523.  
  524. game:GetService("RunService").Stepped:Connect(function()
  525.     if g >= 120 then
  526.         g = 120
  527.         increase1 = false
  528.     elseif 0 >= g then
  529.         g = 0
  530.         increase1 = true
  531.     end
  532.     if increase1 then
  533.         g = g + increment
  534.     elseif not increase1 then
  535.         g = g - increment
  536.     end
  537.     if b >= 255 then
  538.         b = 255
  539.         increase2 = false
  540.     elseif 120 >= b then
  541.         b = 120
  542.         increase2 = true
  543.     end
  544.     if increase2 then
  545.         b = b + increment
  546.     elseif not increase2 then
  547.         b = b - increment
  548.     end
  549.     if t >= 255 then
  550.         t = 255
  551.         increase3 = false
  552.     elseif 150 >= t then
  553.         t = 150
  554.         increase3 = true
  555.     end
  556.     if increase3 then
  557.         t = t + increment
  558.     elseif not increase3 then
  559.         t = t - increment
  560.     end
  561.     box.Color3 = Color3.fromRGB(0,g,b)
  562.     box.SurfaceColor3 = Color3.fromRGB(0,g,b)
  563.     box.SurfaceTransparency = (t/255)
  564. end)
  565. end
  566.  
  567. warn([[
  568. AlmightyToast's Totem
  569. - press e to auto equip
  570. ]])
  571.  
  572. local totem = nil
  573. local left = 10
  574. local oldchar = nil
  575. local auto = false
  576. local oldpos = CFrame.new()
  577.  
  578. local remote = Instance.new("RemoteEvent")
  579. remote.Name = "KrY's Totem"
  580. remote.Parent = owner['PlayerGui']
  581.  
  582. local code = [[
  583. plr = game:GetService("Players").LocalPlayer
  584. mouse = plr:GetMouse()
  585. remote = script.Parent
  586.  
  587. mouse.KeyDown:Connect(function(k)
  588.     if k == 'e' then
  589.         remote:FireServer()
  590.     end
  591. end)
  592. ]]
  593.  
  594. NLS(code,remote)
  595.  
  596. remote.OnServerEvent:Connect(function(plr)
  597.     auto = not auto
  598. end)
  599.  
  600. function effect(p,h)
  601.     local Part0 = Instance.new("Part")
  602.     local ParticleEmitter1 = Instance.new("ParticleEmitter")
  603.     Part0.Name = "effects"
  604.     Part0.Parent = p
  605.     Part0.CFrame = CFrame.new(-5.20499992, 2.68487453, -24.0999928, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  606.     Part0.Position = Vector3.new(-5.20499992, 2.68487453, -24.0999928)
  607.     Part0.Transparency = 1
  608.     Part0.Size = Vector3.new(2.39999962, 5.17000914, 0.970000446)
  609.     Part0.BottomSurface = Enum.SurfaceType.Smooth
  610.     Part0.TopSurface = Enum.SurfaceType.Smooth
  611.     Part0.Anchored = false
  612.     ParticleEmitter1.Parent = Part0
  613.     ParticleEmitter1.Speed = NumberRange.new(2, 2)
  614.     ParticleEmitter1.Color = ColorSequence.new(Color3.new(0.666667, 0, 0),Color3.new(1, 0, 0),Color3.new(0.309804, 1, 0.898039))
  615.     ParticleEmitter1.LightEmission = 0.80000001192093
  616.     ParticleEmitter1.Texture = "http://www.roblox.com/asset/?id=241650934"
  617.     ParticleEmitter1.Size = NumberSequence.new(1,0)
  618.     ParticleEmitter1.Lifetime = NumberRange.new(1, 1)
  619.     ParticleEmitter1.LockedToPart = true
  620.     ParticleEmitter1.Rate = 250
  621.     ParticleEmitter1.SpreadAngle = Vector2.new(45, 45)
  622.     ParticleEmitter1.VelocitySpread = 45
  623.     local tempweld = Instance.new("Weld")
  624.     tempweld.Parent = Part0
  625.     tempweld.Part0 = p
  626.     tempweld.Part1 = Part0
  627.     tempweld.C0 = p.CFrame:Inverse()
  628.     tempweld.C1 = Part0.CFrame:Inverse()
  629.     tempweld.C0 = CFrame.new(0,0,0)
  630.     spawn(function()
  631.         ParticleEmitter1.Enabled = true
  632.         wait(1)
  633.         ParticleEmitter1.Rate = 100
  634.         wait(.5)
  635.         ParticleEmitter1.Rate = 50
  636.         wait(.5)
  637.         ParticleEmitter1.Rate = 0
  638.         wait(2)
  639.         Part0:Destroy()
  640.         tempweld:Destroy()
  641.         ParticleEmitter1.Enabled = false
  642.     end)
  643. end
  644.  
  645. function spawntotem()
  646.     local plr = owner
  647.     local char = plr.Character
  648.     local torso = char:FindFirstChild("HumanoidRootPart")
  649.     local hum = char:FindFirstChildOfClass("Humanoid")
  650.     local holding = auto
  651.     local died = false
  652.    
  653.     local function alive()
  654.         local alive = false
  655.         if char and char.Parent and torso and torso.Parent and hum and hum.Parent and hum.Health > 0 then
  656.             alive = true
  657.         end
  658.         return alive
  659.     end
  660.  
  661.     local function rebirth()
  662.         hum.BreakJointsOnDeath = false
  663.         plr:LoadCharacter()
  664.         repeat wait() until plr.Character
  665.         char = plr.Character
  666.         torso = char:FindFirstChild("HumanoidRootPart")
  667.         hum = char:FindFirstChildOfClass("Humanoid")
  668.         local ff = char:FindFirstChildOfClass("ForceField")
  669.         hum.Health = 20
  670.         if ff then
  671.             ff:Destroy()
  672.         end
  673.         if torso then
  674.             torso.Velocity = Vector3.new()
  675.             torso.CFrame = oldpos
  676.         end
  677.         if hum then
  678.             hum.Sit = false
  679.             hum.PlatformStand = false
  680.             hum:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
  681.             hum:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
  682.         end
  683.         spawn(function()
  684.             local o1 = Instance.new("Part")
  685.             local o2 = Instance.new("ParticleEmitter")
  686.             o1.Name = "effects"
  687.             o1.Parent = char
  688.             o1.Transparency = 1
  689.             o1.Rotation = Vector3.new(0.0500000007, 0, -0.0199999996)
  690.             o1.Size = Vector3.new(2.39999962, 5.17000914, 0.970000446)
  691.             o1.CFrame = CFrame.new(-0.00269600004, 2.58585, 0.00243000011, 0.99999994, 0.000345684297, 6.2623044e-06, -0.000345678796, 0.999999583, -0.000859424355, -6.5593913e-06, 0.000859422144, 0.999999642)
  692.             o1.BottomSurface = Enum.SurfaceType.Smooth
  693.             o1.TopSurface = Enum.SurfaceType.Smooth
  694.             o2.Parent = o1
  695.             o2.Size = NumberSequence.new(0.74999988079071,0.5,0)
  696.             o2.Color = ColorSequence.new(Color3.new(0.666667, 0.666667, 0.666667),Color3.new(0.666667, 0.666667, 0.666667))
  697.             o2.LightEmission = 0.80000001192093
  698.             o2.Texture = "rbxassetid://3552571288"
  699.             o2.Lifetime = NumberRange.new(2,2)
  700.             o2.Rate = 1
  701.             o2.RotSpeed = NumberRange.new(270,270)
  702.             o2.Speed = NumberRange.new(1.5,1.5)
  703.             o2.VelocitySpread = 45
  704.             o2.Color = ColorSequence.new(Color3.new(0.666667, 0.666667, 0.666667),Color3.new(0.666667, 0.666667, 0.666667))
  705.             local tempweld2 = Instance.new("Weld")
  706.             tempweld2.Parent = o1
  707.             tempweld2.Part0 = torso
  708.             tempweld2.Part1 = o1
  709.             game:GetService("Debris"):AddItem(o1,7)
  710.             local regen = true
  711.             spawn(function()
  712.                 while regen and (hum.Health > 0) do
  713.                     wait(0.25)
  714.                     hum.Health = hum.Health + 5
  715.                 end
  716.             end)
  717.             wait(5)
  718.             regen = false
  719.         end)
  720.         spawn(function()
  721.             local o1 = Instance.new("Part")
  722.             local o2 = Instance.new("Attachment")
  723.             local o3 = Instance.new("ParticleEmitter")
  724.             local o4 = Instance.new("ParticleEmitter")
  725.             o1.Parent = workspace
  726.             o1.Transparency = 1
  727.             o1.Anchored = true
  728.             o1.CanCollide = false
  729.             o1.Size = Vector3.new(25, 1, 25)
  730.             o1.Position = oldpos.Position - Vector3.new(0,2.5,0)
  731.             o1.BottomSurface = Enum.SurfaceType.Smooth
  732.             o1.TopSurface = Enum.SurfaceType.Smooth
  733.             o2.Parent = o1
  734.             o3.Parent = o2
  735.             o3.Size = NumberSequence.new(0.24999976158142,0.37499964237213,0)
  736.             o3.Color = ColorSequence.new(Color3.new(0.333333, 1, 0),Color3.new(0.333333, 1, 0),Color3.new(0, 0.666667, 0),Color3.new(0, 1, 0),Color3.new(0.333333, 1, 0.498039),Color3.new(0.519689, 1, 0.139219),Color3.new(1, 0.333333, 0),Color3.new(1, 1, 0),Color3.new(0.333333, 1, 0.498039),Color3.new(0, 1, 0),Color3.new(1, 0.666667, 0),Color3.new(1, 1, 0.498039))
  737.             o3.LightEmission = 0.75
  738.             o3.Texture = "rbxassetid://2434785466"
  739.             o3.Acceleration = Vector3.new(0, -25, 0)
  740.             o3.Lifetime = NumberRange.new(3,3)
  741.             o3.Rate = 300
  742.             o3.Speed = NumberRange.new(25,25)
  743.             o3.VelocitySpread = 45
  744.             o3.Color = ColorSequence.new(Color3.new(0.333333, 1, 0),Color3.new(0.333333, 1, 0),Color3.new(0, 0.666667, 0),Color3.new(0, 1, 0),Color3.new(0.333333, 1, 0.498039),Color3.new(0.519689, 1, 0.139219),Color3.new(1, 0.333333, 0),Color3.new(1, 1, 0),Color3.new(0.333333, 1, 0.498039),Color3.new(0, 1, 0),Color3.new(1, 0.666667, 0),Color3.new(1, 1, 0.498039))
  745.             o4.Parent = o1
  746.             o4.Size = NumberSequence.new(0.24999976158142,0.37499964237213,0)
  747.             o4.Color = ColorSequence.new(Color3.new(0.333333, 1, 0),Color3.new(0.333333, 1, 0),Color3.new(0, 0.666667, 0),Color3.new(0, 1, 0),Color3.new(0.333333, 1, 0.498039),Color3.new(0.519689, 1, 0.139219),Color3.new(1, 0.333333, 0),Color3.new(1, 1, 0),Color3.new(0.333333, 1, 0.498039),Color3.new(0, 1, 0),Color3.new(1, 0.666667, 0),Color3.new(1, 1, 0.498039))
  748.             o4.LightEmission = 0.75
  749.             o4.Texture = "rbxassetid://2434785466"
  750.             o4.Lifetime = NumberRange.new(3,3)
  751.             o4.Rate = 100
  752.             o4.Speed = NumberRange.new(0,0)
  753.             o4.Color = ColorSequence.new(Color3.new(0.333333, 1, 0),Color3.new(0.333333, 1, 0),Color3.new(0, 0.666667, 0),Color3.new(0, 1, 0),Color3.new(0.333333, 1, 0.498039),Color3.new(0.519689, 1, 0.139219),Color3.new(1, 0.333333, 0),Color3.new(1, 1, 0),Color3.new(0.333333, 1, 0.498039),Color3.new(0, 1, 0),Color3.new(1, 0.666667, 0),Color3.new(1, 1, 0.498039))
  754.             local sound = Instance.new("Sound")
  755.             sound.Parent = o1
  756.             sound.SoundId = "rbxassetid://3552283822"
  757.             sound.Volume = 1.5
  758.             sound:Play()
  759.             wait(2)
  760.             o4.Enabled = false
  761.             o3.Enabled = false
  762.         end)
  763.         --effect(torso,hum)
  764.         spawn_32k()
  765.         spawntotem()
  766.     end
  767.  
  768.     totem = Instance.new("Tool")
  769.     local o2 = Instance.new("Part")
  770.     local o3 = Instance.new("Decal")
  771.     local o4 = Instance.new("Decal")
  772.     local o5 = Instance.new("Part")
  773.     totem.Name = "Totem of Undying"
  774.     totem.Parent = plr.Backpack
  775.     o2.Name = "part"
  776.     o2.Parent = totem
  777.     o2.Transparency = 1
  778.     o2.Rotation = Vector3.new(-82.4100037, 1.04999995, 17.8500004)
  779.     o2.Size = Vector3.new(0.600000024, 0.0500000007, 1.25)
  780.     o2.CFrame = CFrame.new(14.8800182, 0.663631022, 12.8549995, 0.951727092, -0.306400239, 0.01828775, 0.0232320018, 0.131314978, 0.991068482, -0.306065023, -0.942801833, 0.132094339)
  781.     o2.BottomSurface = Enum.SurfaceType.Smooth
  782.     o2.TopSurface = Enum.SurfaceType.Smooth
  783.     o3.Parent = o2
  784.     o3.Texture = "rbxassetid://3551524140"
  785.     o3.Face = Enum.NormalId.Top
  786.     o4.Parent = o2
  787.     o4.Texture = "rbxassetid://3551524140"
  788.     o4.Face = Enum.NormalId.Bottom
  789.     o5.Name = "Handle"
  790.     o5.Parent = totem
  791.     o5.Transparency = 1
  792.     o5.Rotation = Vector3.new(-68.7200012, 5.36999989, -29.9599991)
  793.     o5.Size = Vector3.new(0.100000001, 0.100000001, 0.100000001)
  794.     o5.CFrame = CFrame.new(14.9258261, 0.462755978, 12.3108463, 0.862572074, 0.497210532, 0.0935470909, -0.256796867, 0.270954847, 0.927706182, 0.435918272, -0.824236095, 0.361400247)
  795.     o5.BottomSurface = Enum.SurfaceType.Smooth
  796.     o5.TopSurface = Enum.SurfaceType.Smooth
  797.    
  798.     for i,v in pairs(totem:GetDescendants()) do
  799.         if v:IsA("Part") then
  800.             v.CanCollide = false
  801.             v.Massless = true
  802.         end
  803.     end
  804.    
  805.     totem.CanBeDropped = false
  806.    
  807.     local w1 = Instance.new("Weld")
  808.     w1.Parent = o5
  809.     w1.Part0 = o5
  810.     w1.Part1 = o2
  811.     w1.C0 = o5.CFrame:Inverse()
  812.     w1.C1 = o2.CFrame:Inverse()
  813.     w1.C0 = CFrame.new(-15,0.2,-12.6)
  814.    
  815.     spawn(function()
  816.         while not died do
  817.             game:GetService("RunService").Heartbeat:Wait(1/30)
  818.             if alive() then
  819.                 oldpos = torso.CFrame
  820.             end
  821.             if totem and auto then
  822.                 totem.Parent = char
  823.             end
  824.             if not alive() then
  825.                 died = true
  826.             end
  827.             if not alive() and (holding or auto) and (left > 0) then
  828.                 left = left - 1
  829.                 rebirth()
  830.             end
  831.         end
  832.     end)
  833.    
  834.     totem.Unequipped:Connect(function()
  835.         holding = false
  836.     end)
  837.    
  838.     totem.Equipped:Connect(function()
  839.         holding = true
  840.     end)
  841. end
  842.  
  843. spawn_32k()
  844. spawntotem()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement