Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.40 KB | None | 0 0
  1. --Made by N3xul
  2. local runDummyScript = function(f,scri)
  3. local oldenv = getfenv(f)
  4. local newenv = setmetatable({}, {
  5. __index = function(_, k)
  6. if k:lower() == 'script' then
  7. return scri
  8. else
  9. return oldenv[k]
  10. end
  11. end
  12. })
  13. setfenv(f, newenv)
  14. ypcall(function() f() end)
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. mas.Name = "CompiledModel"
  19. o1 = Instance.new("Tool")
  20. o2 = Instance.new("Part")
  21. o3 = Instance.new("SpecialMesh")
  22. o4 = Instance.new("Sound")
  23. o6 = Instance.new("LocalScript")
  24. o7 = Instance.new("Script")
  25. o1.Name = "GravityHammer"
  26. o1.Parent = mas
  27. o1.TextureId = "http://www.roblox.com/asset/?id=1256305"
  28. o1.GripForward = Vector3.new(-1, -0, -0)
  29. o1.GripPos = Vector3.new(0, 0, -3.25)
  30. o1.GripRight = Vector3.new(0, 1, 0)
  31. o1.GripUp = Vector3.new(0, 0, 1)
  32. o2.Name = "Handle"
  33. o2.Parent = o1
  34. o2.BrickColor = BrickColor.new("Dark stone grey")
  35. o2.Reflectance = 0.40000000596046
  36. o2.Position = Vector3.new(74.7000046, 0.500029981, -45.6999969)
  37. o2.Rotation = Vector3.new(0, 0, 90)
  38. o2.FormFactor = Enum.FormFactor.Plate
  39. o2.Size = Vector3.new(1, 0.800000012, 10)
  40. o2.CFrame = CFrame.new(74.7000046, 0.500029981, -45.6999969, 2.20537186e-06, -0.99999994, -5.53470159e-08, 0.99999994, 2.20537186e-06, 6.03775106e-07, -6.0377505e-07, -5.53483517e-08, 1)
  41. o2.BottomSurface = Enum.SurfaceType.Smooth
  42. o2.TopSurface = Enum.SurfaceType.Smooth
  43. o2.Color = Color3.new(0.388235, 0.372549, 0.384314)
  44. o2.Position = Vector3.new(74.7000046, 0.500029981, -45.6999969)
  45. o3.Parent = o2
  46. o3.MeshId = "http://www.roblox.com/asset/?id=1256290"
  47. o3.Scale = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
  48. o3.TextureId = "http://www.roblox.com/asset/?id=1256283"
  49. o3.MeshType = Enum.MeshType.FileMesh
  50. o4.Parent = o2
  51. o4.SoundId = "http://www.roblox.com/asset/?id=1255794"
  52. o4.Volume = 1
  53. o6.Name = "Local Gui"
  54. o6.Parent = o1
  55. table.insert(cors,coroutine.create(function()
  56. wait()
  57. runDummyScript(function()
  58.  
  59. end,o6)
  60. end))
  61. o7.Name = "SwordScript"
  62. o7.Parent = o1
  63. table.insert(cors,coroutine.create(function()
  64. wait()
  65. runDummyScript(function()
  66. -------- OMG HAX
  67.  
  68.  
  69.  
  70. r = game:service("RunService")
  71.  
  72.  
  73.  
  74.  
  75.  
  76. local damage = 5
  77.  
  78.  
  79.  
  80.  
  81.  
  82. local slash_damage = 10
  83.  
  84. local lunge_damage = 30
  85.  
  86.  
  87.  
  88. sword = script.Parent.Handle
  89.  
  90. Tool = script.Parent
  91.  
  92.  
  93.  
  94. SlashSound = sword.Sound
  95.  
  96.  
  97.  
  98. function blow(hit)
  99.  
  100. Grip = Tool.Parent["Right Arm"].RightGrip:clone()
  101.  
  102. humanoid = hit.Parent:findFirstChild("Humanoid")
  103.  
  104. if(humanoid ~= nil and humanoid.Parent.Name == Tool.Parent.Name) then --don't hit yourself
  105.  
  106. return
  107.  
  108. end
  109.  
  110.  
  111.  
  112. --if(Tool:findFirstChild("toolAnim") == nil) then return end
  113.  
  114. if(humanoid ~= nil) then --if it's a person, damage him and stop
  115.  
  116. propel(hit)
  117.  
  118. print(humanoid.Parent.Name)
  119.  
  120. humanoid.Health = humanoid.Health - 49
  121.  
  122. else
  123.  
  124. explode(hit) --explode only if it doesn't hit a person (ie, blowing holes through walls)
  125.  
  126. end
  127.  
  128.  
  129.  
  130. end
  131.  
  132.  
  133.  
  134. function propel(part)
  135.  
  136. if(part.Anchored) then return end --if it isn't anchored, make it flyyy
  137.  
  138. direction = (part.Position - Tool.Parent.Torso.Position).unit
  139.  
  140. direction = direction + Vector3.new(0,1,0)
  141.  
  142. direction = direction * 200
  143.  
  144. part.Velocity = part.Velocity + direction
  145.  
  146. end
  147.  
  148.  
  149.  
  150. debounce = true
  151.  
  152. function explode(part)
  153.  
  154. if not debounce then return end
  155.  
  156.  
  157.  
  158. debounce = false
  159.  
  160. direction = (part.Position - Tool.Parent.Torso.Position).unit
  161.  
  162. pos = direction * 12 + Tool.Parent.Torso.Position
  163.  
  164. explosion = Instance.new("Explosion")
  165.  
  166. explosion.BlastRadius = 4
  167.  
  168. explosion.BlastPressure = 1
  169.  
  170. explosion.Position = pos
  171.  
  172. explosion.Parent = game.Workspace
  173.  
  174. explosion.Hit:connect(function(part, distance) propel(part) end)
  175.  
  176. wait(.1)
  177.  
  178. Grip:clone().Parent = Tool.Parent["Right Arm"]
  179.  
  180. debounce = true
  181.  
  182. end
  183.  
  184.  
  185.  
  186. function attack()
  187.  
  188. SlashSound:play()
  189.  
  190. local anim = Instance.new("StringValue")
  191.  
  192. anim.Name = "toolanim"
  193.  
  194. anim.Value = "Slash"
  195.  
  196. anim.Parent = Tool
  197.  
  198. end
  199.  
  200.  
  201.  
  202. function lunge()
  203.  
  204. attack()
  205.  
  206. force = Instance.new("BodyPosition")
  207.  
  208. force.maxForce = Vector3.new(1e+005,1e+004,1e+005)
  209.  
  210. dir = Tool.Parent.Humanoid.targetPoint
  211.  
  212. if((dir - sword.Position).magnitude > 15) then return end
  213.  
  214. force.position = dir
  215.  
  216. force.Parent = sword
  217.  
  218. wait(.25)
  219.  
  220. force.Parent = nil
  221.  
  222. end
  223.  
  224.  
  225.  
  226. function swordUp()
  227.  
  228. Tool.GripForward = Vector3.new(-1,0,0)
  229.  
  230. Tool.GripRight = Vector3.new(0,1,0)
  231.  
  232. Tool.GripUp = Vector3.new(0,0,1)
  233.  
  234. end
  235.  
  236.  
  237.  
  238. function swordOut()
  239.  
  240. Tool.GripForward = Vector3.new(0,0,1)
  241.  
  242. Tool.GripRight = Vector3.new(0,-1,0)
  243.  
  244. Tool.GripUp = Vector3.new(-1,0,0)
  245.  
  246. end
  247.  
  248.  
  249.  
  250. function swordAcross()
  251.  
  252. -- parry
  253.  
  254. end
  255.  
  256.  
  257.  
  258.  
  259.  
  260. Tool.Enabled = true
  261.  
  262. local last_attack = 0
  263.  
  264. function onActivated()
  265.  
  266.  
  267.  
  268. if not Tool.Enabled then
  269.  
  270. return
  271.  
  272. end
  273.  
  274.  
  275.  
  276. Tool.Enabled = false
  277.  
  278.  
  279.  
  280. local character = Tool.Parent;
  281.  
  282. local humanoid = character.Humanoid
  283.  
  284. if humanoid == nil then
  285.  
  286. print("Humanoid not found")
  287.  
  288. return
  289.  
  290. end
  291.  
  292.  
  293.  
  294. t = r.Stepped:wait()
  295.  
  296. connection = sword.Touched:connect(blow)
  297.  
  298. lunge()
  299.  
  300.  
  301.  
  302. wait(.4)
  303.  
  304. connection:disconnect()
  305.  
  306. last_attack = t
  307.  
  308. Tool.Enabled = true
  309.  
  310.  
  311.  
  312.  
  313.  
  314. end
  315.  
  316. script.Parent.Activated:connect(onActivated)
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323. end,o7)
  324. end))
  325. mas.Parent = workspace
  326. mas:MakeJoints()
  327. local mas1 = mas:GetChildren()
  328. for i=1,#mas1 do
  329. mas1[i].Parent = game:GetService("Players").LocalPlayer.Backpack
  330. ypcall(function() mas1[i]:MakeJoints() end)
  331. end
  332. mas:Destroy()
  333. for i=1,#cors do
  334. coroutine.resume(cors[i])
  335. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement