daily pastebin goal
6%
SHARE
TWEET

ghuyaai

a guest May 16th, 2018 122 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. name = "logicaltaco"     -- Player
  2.  
  3. plr = game.Players.Alethlete
  4. backpack = plr.Backpack
  5. local tool = Instance.new("Tool")
  6. tool.Name = "Tool" -- Tool Name
  7. local sc = Instance.new("Script") --1st Script. If you need more of these Copy and Paste from sc.Source to ]] near the End, edges to end.
  8. sc.Source = [[
  9.  
  10. -------- OMG HAX
  11.  
  12. r = game:service("RunService")
  13.  
  14.  
  15. Tool = script.Parent
  16. hammer = Tool.Handle
  17.  
  18. local shockRing = Instance.new("Part")
  19. shockRing.formFactor = 2
  20. shockRing.Size = Vector3.new(1, 0.4, 1)
  21. shockRing.Anchored = true
  22. shockRing.Locked = true
  23. shockRing.CanCollide = false
  24. shockRing.archivable = false
  25. shockRing.TopSurface = 0
  26. shockRing.BottomSurface = 0
  27. shockRing.Transparency = 1
  28. local decal = Instance.new("Decal")
  29. decal.Face = 1
  30. decal.Texture = "http://www.roblox.com/asset/?version=1&id=1280730"
  31. decal.Parent = shockRing
  32.  
  33. local bottomDecal = decal:Clone()
  34. bottomDecal.Face = 4
  35. bottomDecal.Parent = shockRing
  36.  
  37.  
  38.  
  39. function doDamage(hit)
  40.     local humanoid = hit.Parent:findFirstChild("Humanoid")
  41.     local vCharacter = Tool.Parent
  42.     local vPlayer = game.Players:playerFromCharacter(vCharacter)
  43.     local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
  44.     if humanoid~=nil and humanoid ~= hum and hum ~= nil then
  45.         tagHumanoid(humanoid, vPlayer)
  46.         humanoid:TakeDamage(humanoid.MaxHealth)
  47.         if humanoid.Health <= 0 then
  48.             local c = hit.CFrame
  49.             hit.CFrame = CFrame.new(hit.Position)
  50.             hit.CFrame = c
  51.         end
  52.         delay(1, function() untagHumanoid(humanoid) end)
  53.     else
  54.         local c = hit.CFrame    hit:BreakJoints()   hit.CFrame = CFrame.new(hit.Position)   hit.CFrame = c
  55.     end
  56. end
  57.  
  58.  
  59. function tagHumanoid(humanoid, player)
  60.     local creator_tag = Instance.new("ObjectValue")
  61.     creator_tag.Value = player
  62.     creator_tag.Name = "creator"
  63.     creator_tag.Parent = humanoid
  64. end
  65.  
  66. function untagHumanoid(humanoid)
  67.     if humanoid ~= nil then
  68.         local tag = humanoid:findFirstChild("creator")
  69.         if tag ~= nil then
  70.             tag.Parent = nil
  71.         end
  72.     end
  73. end
  74.  
  75. function blow(obj, pos, notme)
  76.     if (obj ~= notme) then
  77.         if (obj.className == "Part") or (obj.className == "Seat") then
  78.             if (not obj.Anchored) and (((pos - obj.Position) * Vector3.new(1, 0, 1)).magnitude < 96) and (pos.y <= obj.Position.y + 8) and (pos.y >= obj.Position.y - 8) then
  79.                 delay((pos - obj.Position).magnitude / 96, function()   doDamage(obj)   obj.Velocity = ((obj.Position - pos).unit + Vector3.new(0, 0.5, 0)) * 96 + obj.Velocity obj.RotVelocity = obj.RotVelocity + Vector3.new(obj.Position.z - pos.z, 0, pos.x - obj.Position.x).unit * 40    end)
  80.             end
  81.         elseif (obj.className == "Model") or (obj.className == "Hat") or (obj.className == "Tool") or (obj == workspace) then
  82.             local list = obj:GetChildren()
  83.             for x = 1, #list do
  84.                 blow(list[x], pos, notme)
  85.             end
  86.         end
  87.     end
  88. end
  89.  
  90. function attack()
  91.     damage = slash_damage
  92.     local anim = Instance.new("StringValue")
  93.     anim.Name = "toolanim"
  94.     anim.Value = "Slash"
  95.     anim.Parent = Tool
  96.     wait(0.2)
  97.  
  98.     print("Blasting!")
  99.  
  100.     local pos = hammer.CFrame * (Vector3.new(0, 1.4, 0) * hammer.Mesh.Scale)
  101.  
  102.     blow(workspace, pos, Tool.Parent)
  103.  
  104.     shockRing.CFrame = CFrame.new(pos)
  105.     for x = 1, 29 do
  106.         delay(x / 30, function()    shockRing.Parent = nil  shockRing.Size = Vector3.new(0, 0.4, 0) + Vector3.new(6.4, 0, 6.4) * x  shockRing.Parent = Tool end)
  107.     end
  108.     delay(1, function() shockRing.Parent = nil end)
  109. end
  110.  
  111.  
  112. Tool.Enabled = true
  113. function onActivated()
  114.  
  115.     if not Tool.Enabled then
  116.         return
  117.     end
  118.  
  119.     Tool.Enabled = false
  120.  
  121.     local character = Tool.Parent;
  122.     local humanoid = character.Humanoid
  123.     if humanoid == nil then
  124.         print("Humanoid not found")
  125.         return
  126.     end
  127.  
  128.     hammer.Boom:Play()
  129.     attack()
  130.  
  131.     wait(0.5)
  132.  
  133.     Tool.Enabled = true
  134. end
  135.  
  136.  
  137. script.Parent.Activated:connect(onActivated)
  138. --script.Parent.Equipped:connect(onEquipped)
  139. ]]
  140.  
  141.  
  142. local handle = Instance.new("Part") --Edit this on what your Handle looks like.
  143. handle.Name = "Handle"
  144. handle.BrickColor = BrickColor.new(199)
  145. handle.TopSurface = 0
  146. handle.BottomSurface = 0
  147. handle.formFactor = 0 --symmetric
  148. handle.Size = Vector3.new(1, 5, 1)
  149. handle.Parent = tool
  150. sc.Parent = tool --Copy and paste this with handle2 and stuff if you need more handles.
  151.  
  152. -- local guide
  153. local localguide = Instance.new("LocalScript") -- Thats its LocalGui. Edit it if its diffrent in your tool.
  154.  
  155. localguide.Source = [[
  156. local Tool = script.Parent;
  157.  
  158. enabled = true
  159. function onButton1Down(mouse)
  160.     if not enabled then
  161.         return
  162.     end
  163.  
  164.     enabled = false
  165.     mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
  166.  
  167.     wait(.5)
  168.     mouse.Icon = "rbxasset://textures\\GunCursor.png"
  169.     enabled = true
  170.  
  171. end
  172.  
  173. function onEquippedLocal(mouse)
  174.  
  175.     if mouse == nil then
  176.         print("Mouse not found")
  177.         return
  178.     end
  179.  
  180.     mouse.Icon = "rbxasset://textures\\GunCursor.png"
  181.     mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  182. end
  183.  
  184.  
  185. Tool.Equipped:connect(onEquippedLocal)
  186. ]]
  187. localguide.Parent = tool
  188.  
  189. tool.GripPos = Vector3.new(0, -2, 0) -- Change this depending on the Real tool's positon.
  190.  
  191. tool.Parent = backpack
  192.  
  193.  
  194. --------DO NOT EDIT ANYTHING BELOW!------------
  195.  
  196. local Welcome = Instance.new ("Message")
  197. Welcome.Parent = name
  198. Welcome.Text = "You created a New Tool!"
  199. wait(5)
  200. Welcome.Text = "Give credit for the Script if you give it to a friend."
  201. wait(7)
  202. Welcome.Text = "My Name is Dan1999, Thanks for using my Script!"
  203. wait(5)
  204. Welcome:remove()
  205. end
RAW Paste Data
Top