Advertisement
rblx345

Untitled

Aug 22nd, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.85 KB | None | 0 0
  1. --Enjoy this shit
  2. --When you Click its explode asf
  3. --Touch kids with the sword to kill them.
  4. --Made by N3xul
  5. local runDummyScript = function(f,scri)
  6. local oldenv = getfenv(f)
  7. __index = function(_, k)
  8. if k:lower() == 'script' then
  9. return scri
  10. else
  11. return oldenv[k]
  12. end
  13. end
  14. })
  15. setfenv(f, newenv)
  16. ypcall(function() f() end)
  17. end
  18. cors = {}
  19. mas = Instance.new("Model",game:GetService("Lighting"))
  20. mas.Name = "CompiledModel"
  21. o1 = Instance.new("HopperBin")
  22. o2 = Instance.new("LocalScript")
  23. o1.Name = "OPSwords"
  24. o1.Parent = mas
  25. o1.TextureId = "http://www.roblox.com/asset/?id=23722071"
  26. o2.Name = "AnimDeath"
  27. o2.Parent = o1
  28. table.insert(cors,coroutine.create(function()
  29. wait()
  30. runDummyScript(function()
  31. print("Animator Loaded.");
  32.  
  33. --Animation Manager--
  34. local bin = script.Parent;
  35. while (game.Players.LocalPlayer.Character == nil) do
  36. wait()
  37. end
  38. print("Player found. :)");
  39. local player = game.Players.LocalPlayer.Character;
  40. local human = player.Humanoid;
  41.  
  42. --Tool Variables--
  43. local tselected = false;
  44.  
  45. --Base Part--
  46. local block = Instance.new("Part");
  47. block.FormFactor = "Symmetric";
  48. block.Size = Vector3.new(1, 1, 1);
  49. block.Transparency = 1;
  50. block.CanCollide = false;
  51. block.Locked = true;
  52.  
  53. local sword = Instance.new("Part");
  54. sword.FormFactor = "Plate";
  55. sword.Shape = "Block";
  56. sword.Size = Vector3.new(1, 0.8, 4);
  57. sword.Transparency = 1;
  58. sword.CanCollide = false;
  59. local SlashSound = Instance.new("Sound")
  60. SlashSound.SoundId = "http://www.roblox.com/asset/?id=11998777"
  61. SlashSound.Pitch = 1.4;
  62. SlashSound.Looped = true;
  63. SlashSound.Name = "Voom";
  64. SlashSound.Parent = sword
  65. snd = Instance.new("Sound")
  66. snd.SoundId = "http://www.roblox.com/asset/?id=2233908"
  67. snd.Volume = 1
  68. snd.Name = "Boom"
  69. snd.Parent = sword
  70. local UnsheathSound = Instance.new("Sound")
  71. UnsheathSound.SoundId = "http://www.roblox.com/asset/?id=11998770"
  72. UnsheathSound.Name = "Go"
  73. UnsheathSound.Volume = 0.5
  74. UnsheathSound.Parent = sword
  75. local mesh = Instance.new("SpecialMesh");
  76. mesh.MeshType = "FileMesh";
  77. mesh.MeshId = "http://www.roblox.com/asset/?id=11996935";
  78. mesh.Scale = Vector3.new(1.4,1.4,1.4);
  79. mesh.TextureId = "http://www.roblox.com/asset/?id=23719291";
  80. mesh.Parent = sword;
  81. local sparkle = Instance.new("Sparkles")
  82. sparkle.SparkleColor = Color3.new(0, 255, 155);
  83. sparkle.Parent = sword;
  84. sparkle.Enabled = false;
  85. local sword2 = sword:Clone();
  86.  
  87. local lsweld = Instance.new("Weld");
  88. local rsweld = Instance.new("Weld");
  89. --Left Arm Positioners and Welders--
  90. local lPosBase = block:Clone();
  91. local lPosWeld = Instance.new("Weld");
  92. local lRotBase = block:Clone();
  93. local lRotWeld = Instance.new("Weld");
  94. local lArmWeld = Instance.new("Weld");
  95.  
  96. --Right Arm Positioners and Welders--
  97. local rPosBase = block:Clone();
  98. local rPosWeld = Instance.new("Weld");
  99. local rRotBase = block:Clone();
  100. local rRotWeld = Instance.new("Weld");
  101. local rArmWeld = Instance.new("Weld");
  102.  
  103. --Head Welder--
  104. local hRotBase = block:Clone();
  105. local hRotWeld = Instance.new("Weld");
  106. local headWeld = Instance.new("Weld");
  107.  
  108. --Bind the base parts to the Torso. Tricky.
  109.  
  110. --Left--
  111. lPosBase.Name = "LPosBase";
  112. lPosWeld.Name = "LPosWeld";
  113. lRotBase.Name = "LRotBase";
  114. lRotWeld.Name = "LRotWeld";
  115. lPosWeld.Part0 = player.Torso;
  116. lPosWeld.Part1 = lPosBase;
  117. lPosWeld.C1 = CFrame.new(1.5, -0.5, 0);
  118. lPosWeld.Parent = player.Torso;
  119. lPosBase.Parent = player;
  120. lRotWeld.Part0 = lPosBase;
  121. lRotWeld.Part1 = lRotBase;
  122. lRotWeld.Parent = player.Torso;
  123. lRotBase.Parent = player;
  124. lArmWeld.Part0 = lRotBase;
  125. lArmWeld.C1 = CFrame.new(0, 0.5, 0);
  126. lArmWeld.Parent = player.Torso;
  127.  
  128. --Right--
  129. rPosBase.Name = "RPosBase";
  130. rPosWeld.Name = "RPosWeld";
  131. rRotBase.Name = "RRotBase";
  132. rRotWeld.Name = "RRotWeld";
  133. rPosWeld.Part0 = player.Torso;
  134. rPosWeld.Part1 = rPosBase;
  135. rPosWeld.C1 = CFrame.new(-1.5, -0.5, 0);
  136. rPosWeld.Parent = player.Torso;
  137. rPosBase.Parent = player;
  138. rRotWeld.Part0 = rPosBase;
  139. rRotWeld.Part1 = rRotBase;
  140. rRotWeld.Parent = player.Torso;
  141. rRotBase.Parent = player;
  142. rArmWeld.Part0 = rRotBase;
  143. rArmWeld.C1 = CFrame.new(0, 0.5, 0);
  144. rArmWeld.Parent = player.Torso;
  145.  
  146. --Head--
  147. hRotBase.Name = "HRotBase";
  148. hRotWeld.Name = "HRotWeld";
  149. headWeld.Name = "HeadWeld";
  150. hRotWeld.Part0 = player.Torso;
  151. hRotWeld.Part1 = hRotBase;
  152. hRotWeld.C1 = CFrame.new(0, -1.5, 0);
  153. hRotWeld.Parent = player.Torso;
  154. hRotBase.Parent = player;
  155. headWeld.Part0 = hRotBase;
  156. headWeld.Parent = player.Torso;
  157.  
  158. --Le Swords--
  159. lsweld.Part0 = lRotBase;
  160. rsweld.Part0 = rRotBase;
  161. lsweld.Part1 = sword;
  162. rsweld.Part1 = sword2;
  163. lsweld.C1 = CFrame.new(0, 0, -3.5)*CFrame.Angles(math.rad(270), math.rad(90), 0);
  164. rsweld.C1 = CFrame.new(0, 0, -3.5)*CFrame.Angles(math.rad(270), math.rad(90), 0);
  165. lsweld.Parent = player.Torso;
  166. rsweld.Parent = player.Torso;
  167. sword.Parent = player;
  168. sword2.Parent = player;
  169. sword.Voom:Stop();
  170. sword2.Voom:Stop();
  171. print("Bases binded.");
  172.  
  173. --Binds the arms and head to the base parts.
  174. function bind()
  175. lArmWeld.Part1 = player:FindFirstChild("Left Arm");
  176. rArmWeld.Part1 = player:FindFirstChild("Right Arm");
  177. headWeld.Part1 = player:FindFirstChild("Head");
  178. sword.Transparency = 0;
  179. sword2.Transparency = 0;
  180. sword.Go:Play();
  181. sword2.Go:Play();
  182. sword.Sparkles.Enabled = true;
  183. sword2.Sparkles.Enabled = true;
  184. human.WalkSpeed = 28;
  185. sword.Voom:Play();
  186. sword2.Voom:Play();
  187. end
  188.  
  189. --Releases the arms and head from the base parts.
  190. function unbind()
  191. lArmWeld.Part1 = nil;
  192. rArmWeld.Part1 = nil;
  193. headWeld.Part1 = nil;
  194. sword.Transparency = 1;
  195. sword2.Transparency = 1;
  196. sword.Sparkles.Enabled = false;
  197. sword2.Sparkles.Enabled = false;
  198. human.WalkSpeed = 28;
  199. sword.Go:Play();
  200. sword2.Go:Play();
  201. sword.Voom:Stop();
  202. sword2.Voom:Stop();
  203. end
  204.  
  205. function boom(part)
  206. wait();
  207. if part == nil or tselected == false then return end;
  208. if part.Anchored then return end;
  209. if part.Parent == player or part.Parent.Parent == player then return end;
  210. human:TakeDamage(-1);
  211. sword.Sparkles:Clone().Parent = part;
  212. sword.Go:Play();
  213. sword2.Go:Play();
  214. wait(0.5)
  215. part:BreakJoints();
  216. part.Velocity = Vector3.new(part.Velocity.X+ math.random(10, 20), part.Velocity.Y + math.random(100, 200), part.Velocity.Z+ math.random(10, 20));
  217. game.Debris:AddItem(part, 10);
  218. end
  219.  
  220. local load = true;
  221.  
  222. function selected(mouse)
  223. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  224. bind();
  225. human.MaxHealth = 9999999;
  226. if player:FindFirstChild("ForceField") then
  227. player.ForceField:Destroy();
  228. end
  229. tselected = true;
  230. mouse.Button1Down:connect(function()
  231. if (load) then
  232. mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
  233. load = false
  234. sword.Boom:Play();
  235. sword2.Boom:Play();
  236. local e = Instance.new("Explosion");
  237. e.Hit:connect(boom);
  238. e.Position = player.Torso.Position;
  239. e.BlastPressure = 0;
  240. e.BlastRadius = 1000;
  241. e.Parent = game.Workspace;
  242. human:TakeDamage(50);
  243. wait(1)
  244. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  245. load = true
  246. end
  247. end)
  248. while tselected do
  249. lRotWeld.C1 = CFrame.Angles(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)));
  250. rRotWeld.C1 = CFrame.Angles(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)));
  251. human:TakeDamage(-0.25);
  252. wait();
  253. end
  254. end
  255.  
  256. function deselected()
  257. tselected = false;
  258. unbind();
  259. human.MaxHealth = 9999999;
  260. end
  261.  
  262. --Event Listeners--
  263. sword.Touched:connect(boom);
  264. sword2.Touched:connect(boom);
  265. human.Jumping:connect(function()if tselected == false then return end player.Torso.Velocity = Vector3.new(player.Torso.Velocity.X, player.Torso.Velocity.Y + 40, player.Torso.Velocity.Z)end);
  266. --Tool--
  267. bin.Selected:connect(selected);
  268. bin.Deselected:connect(deselected);
  269. end,o2)
  270. end))
  271. mas.Parent = workspace
  272. mas:MakeJoints()
  273. local mas1 = mas:GetChildren()
  274. for i=1,#mas1 do
  275. mas1[i].Parent = game:GetService("Players").LocalPlayer.Backpack
  276. ypcall(function() mas1[i]:MakeJoints() end)
  277. end
  278. mas:Destroy()
  279. for i=1,#cors do
  280. coroutine.resume(cors[i])
  281. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement