Advertisement
zed_isJayTheLionJR

Untitled

Feb 22nd, 2018
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.45 KB | None | 0 0
  1. --Converted with ttyyuu12345's model to script plugin v4
  2. function sandbox(var,func)
  3. local env = getfenv(func)
  4. local newenv = setmetatable({},{
  5. __index = function(self,k)
  6. if k=="script" then
  7. return var
  8. else
  9. return env[k]
  10. end
  11. end,
  12. })
  13. setfenv(func,newenv)
  14. return func
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. Tool0 = Instance.new("Tool")
  19. Script1 = Instance.new("Script")
  20. Part2 = Instance.new("Part")
  21. SpecialMesh3 = Instance.new("SpecialMesh")
  22. Sound4 = Instance.new("Sound")
  23. Sound5 = Instance.new("Sound")
  24. Sound6 = Instance.new("Sound")
  25. Fire7 = Instance.new("Fire")
  26. LocalScript8 = Instance.new("LocalScript")
  27. Tool0.Name = "Joel's Flaming Super Death Sword"
  28. Tool0.Parent = mas
  29. Tool0.TextureId = "http://www.roblox.com/asset/?id=11444089"
  30. Tool0.GripForward = Vector3.new(-1, -0, -0)
  31. Tool0.GripPos = Vector3.new(0, 0, -1.70000005)
  32. Tool0.GripRight = Vector3.new(0, 1, 0)
  33. Tool0.GripUp = Vector3.new(0, 0, 1)
  34. Tool0.ToolTip = "Joel? Have you been downloading viruses again?"
  35. Script1.Name = "SwordScript"
  36. Script1.Parent = Tool0
  37. table.insert(cors,sandbox(Script1,function()
  38. -------- OMG HAX
  39.  
  40. r = game:service("RunService")
  41.  
  42.  
  43. local damage =99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
  44.  
  45.  
  46. local slash_damage = 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
  47. local lunge_damage = 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
  48.  
  49. sword = script.Parent.Handle
  50. Tool = script.Parent
  51.  
  52.  
  53. local SlashSound = Instance.new("Sound")
  54. SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
  55. SlashSound.Parent = sword
  56. SlashSound.Volume = .7
  57.  
  58. local LungeSound = Instance.new("Sound")
  59. LungeSound.SoundId = "rbxasset://sounds\\swordlunge.wav"
  60. LungeSound.Parent = sword
  61. LungeSound.Volume = .6
  62.  
  63. local UnsheathSound = Instance.new("Sound")
  64. UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav"
  65. UnsheathSound.Parent = sword
  66. UnsheathSound.Volume = 1
  67.  
  68.  
  69. function blow(hit)
  70. local humanoid = hit.Parent:findFirstChild("Humanoid")
  71. local vCharacter = Tool.Parent
  72. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  73. local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
  74. if humanoid~=nil and humanoid ~= hum and hum ~= nil then
  75. -- final check, make sure sword is in-hand
  76.  
  77. local right_arm = vCharacter:FindFirstChild("Right Arm")
  78. if (right_arm ~= nil) then
  79. local joint = right_arm:FindFirstChild("RightGrip")
  80. if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
  81. tagHumanoid(humanoid, vPlayer)
  82. humanoid:TakeDamage(damage)
  83. wait(1)
  84. untagHumanoid(humanoid)
  85. end
  86. end
  87.  
  88.  
  89. end
  90. end
  91.  
  92.  
  93. function tagHumanoid(humanoid, player)
  94. local creator_tag = Instance.new("ObjectValue")
  95. creator_tag.Value = player
  96. creator_tag.Name = "creator"
  97. creator_tag.Parent = humanoid
  98. end
  99.  
  100. function untagHumanoid(humanoid)
  101. if humanoid ~= nil then
  102. local tag = humanoid:findFirstChild("creator")
  103. if tag ~= nil then
  104. tag.Parent = nil
  105. end
  106. end
  107. end
  108.  
  109.  
  110. function attack()
  111. damage = slash_damage
  112. SlashSound:play()
  113. local anim = Instance.new("StringValue")
  114. anim.Name = "toolanim"
  115. anim.Value = "Slash"
  116. anim.Parent = Tool
  117. end
  118.  
  119. function lunge()
  120. damage = lunge_damage
  121.  
  122. LungeSound:play()
  123.  
  124. local anim = Instance.new("StringValue")
  125. anim.Name = "toolanim"
  126. anim.Value = "Lunge"
  127. anim.Parent = Tool
  128.  
  129.  
  130. force = Instance.new("BodyVelocity")
  131. force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80
  132. force.Parent = Tool.Parent.Torso
  133. wait(.2)
  134. swordOut()
  135. wait(.2)
  136. force.Parent = nil
  137. wait(.4)
  138. swordUp()
  139.  
  140. damage = slash_damage
  141. end
  142.  
  143. function swordUp()
  144. Tool.GripForward = Vector3.new(-1,0,0)
  145. Tool.GripRight = Vector3.new(0,1,0)
  146. Tool.GripUp = Vector3.new(0,0,1)
  147. end
  148.  
  149. function swordOut()
  150. Tool.GripForward = Vector3.new(0,0,1)
  151. Tool.GripRight = Vector3.new(0,1,0)
  152. Tool.GripUp = Vector3.new(1,0,0)
  153. end
  154.  
  155. function swordAcross()
  156. -- parry
  157. end
  158.  
  159.  
  160. Tool.Enabled = true
  161. local last_attack = 0
  162. function onActivated()
  163.  
  164. if not Tool.Enabled then
  165. return
  166. end
  167.  
  168. Tool.Enabled = false
  169.  
  170. local character = Tool.Parent;
  171. local humanoid = character.Humanoid
  172. if humanoid == nil then
  173. print("Humanoid not found")
  174. return
  175. end
  176.  
  177. t = r.Stepped:wait()
  178.  
  179. if (t - last_attack < .2) then
  180. lunge()
  181. else
  182. attack()
  183. end
  184.  
  185. last_attack = t
  186.  
  187. --wait(.5)
  188.  
  189. Tool.Enabled = true
  190. end
  191.  
  192.  
  193. function onEquipped()
  194. UnsheathSound:play()
  195. end
  196.  
  197.  
  198. script.Parent.Activated:connect(onActivated)
  199. script.Parent.Equipped:connect(onEquipped)
  200.  
  201.  
  202. connection = sword.Touched:connect(blow)
  203.  
  204.  
  205.  
  206. end))
  207. Part2.Name = "Handle"
  208. Part2.Parent = Tool0
  209. Part2.BrickColor = BrickColor.new("Dark stone grey")
  210. Part2.Reflectance = 0.40000000596046
  211. Part2.Rotation = Vector3.new(-90, 0, 89.9599991)
  212. Part2.FormFactor = Enum.FormFactor.Plate
  213. Part2.Size = Vector3.new(1, 0.800000012, 5)
  214. Part2.CFrame = CFrame.new(-4.40033627, 2.5, 1.49973083, 0.000673112052, -0.999999762, -5.82076609e-11, 7.12051502e-08, 3.19377025e-11, 1, -0.999999762, -0.000673112052, 4.74638355e-08)
  215. Part2.BottomSurface = Enum.SurfaceType.Smooth
  216. Part2.TopSurface = Enum.SurfaceType.Smooth
  217. Part2.Color = Color3.new(0.388235, 0.372549, 0.384314)
  218. Part2.Position = Vector3.new(-4.40033627, 2.5, 1.49973083)
  219. Part2.Orientation = Vector3.new(-90, 89.9599991, 0)
  220. Part2.Color = Color3.new(0.388235, 0.372549, 0.384314)
  221. SpecialMesh3.Parent = Part2
  222. SpecialMesh3.MeshId = "http://www.roblox.com/asset/?id=11442510"
  223. SpecialMesh3.Scale = Vector3.new(1.70000005, 1.70000005, 1.70000005)
  224. SpecialMesh3.TextureId = "http://www.roblox.com/asset/?id=236171900"
  225. SpecialMesh3.MeshType = Enum.MeshType.FileMesh
  226. SpecialMesh3.Scale = Vector3.new(1.70000005, 1.70000005, 1.70000005)
  227. Sound4.Parent = Part2
  228. Sound4.SoundId = "rbxasset://sounds/swordslash.wav"
  229. Sound4.Volume = 0.69999998807907
  230. Sound5.Parent = Part2
  231. Sound5.SoundId = "rbxasset://sounds/swordlunge.wav"
  232. Sound5.Volume = 0.60000002384186
  233. Sound6.Parent = Part2
  234. Sound6.SoundId = "rbxasset://sounds/unsheath.wav"
  235. Sound6.Volume = 1
  236. Fire7.Parent = Part2
  237. Fire7.Heat = 7
  238. LocalScript8.Name = "Local Gui"
  239. LocalScript8.Parent = Tool0
  240. for i,v in pairs(mas:GetChildren()) do
  241. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  242. pcall(function() v:MakeJoints() end)
  243. end
  244. mas:Destroy()
  245. for i,v in pairs(cors) do
  246. spawn(function()
  247. pcall(v)
  248. end)
  249. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement