Advertisement
idkwhatiam

Noob Hammer V1

Apr 27th, 2019
857
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 16.32 KB | None | 0 0
  1. --noob hammer by youngmacka123--
  2.  
  3. --no leak--
  4.  
  5. --fe thing--
  6. if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by youngmacka123");InternalData = {}
  7. do
  8.     script.Parent = owner.Character
  9.     local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  10.     local function NewFakeEvent()
  11.         local Bind = Instance.new("BindableEvent")
  12.         local Fake;Fake = {Connections = {},
  13.         fakeEvent=true;
  14.         Connect=function(self,Func)
  15.             Bind.Event:connect(Func)
  16.             self.Connections[Bind] = true
  17.             return setmetatable({Connected = true},{
  18.             __index = function (self,Index)
  19.                 if Index:lower() == "disconnect" then
  20.                     return function() Fake.Connections[Bind] = false;self.Connected = false end
  21.                 end
  22.                 return Fake[Index]
  23.             end;
  24.             __tostring = function() return "Connection" end;
  25.         })
  26.         end}
  27.         Fake.connect = Fake.Connect;return Fake;
  28.     end
  29.     local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  30.     local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  31.     local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  32.         self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  33.     end};ContextActionService.UnBindAction = ContextActionService.BindAction
  34.     local function TriggerEvent(self,Event,...)
  35.         local Trigger = Mouse[Event]
  36.         if Trigger and Trigger.fakeEvent and Trigger.Connections then
  37.             for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
  38.         end
  39.     end
  40.     Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
  41.     Event.OnServerEvent:Connect(function(FiredBy,Input)
  42.         if FiredBy.Name ~= owner.Name then return end
  43.         if Input.MouseEvent then
  44.             Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  45.         else
  46.             local Begin = Input.UserInputState == Enum.UserInputState.Begin
  47.             if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
  48.             for _,Action in pairs(ContextActionService.Actions) do
  49.                 for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  50.             end
  51.             Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  52.             UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  53.         end
  54.     end)
  55.     InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  56.     Event.Parent = NLS([[
  57.         local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
  58.         local Input = function(Input,gameProcessedEvent)
  59.             if gameProcessedEvent then return end
  60.             Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  61.         end
  62.         UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  63.         local Hit,Target
  64.         while wait(1/30) do
  65.             if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  66.                 Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  67.             end
  68.         end
  69.     ]],owner.Character)
  70. end
  71. RealGame = game;game = setmetatable({},{
  72.     __index = function (self,Index)
  73.         local Sandbox = function (Thing)
  74.             if Thing:IsA("Player") then
  75.                 local RealPlayer = Thing
  76.                 return setmetatable({},{
  77.                     __index = function (self,Index)
  78.                         local Type = type(RealPlayer[Index])
  79.                         if Type == "function" then
  80.                             if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  81.                                 return function (self)return InternalData["Mouse"] end
  82.                             end
  83.                             return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  84.                         end
  85.                         return RealPlayer[Index]
  86.                     end;
  87.                     __tostring = function(self) return RealPlayer.Name end
  88.                 })
  89.             end
  90.         end
  91.         if RealGame[Index] then
  92.             local Type = type(RealGame[Index])
  93.             if Type == "function" then
  94.                 if Index:lower() == "getservice" or Index:lower() == "service" then
  95.                     return function (self,Service)
  96.                         local FakeServices = {
  97.                             ["players"] = function()
  98.                                 return setmetatable({},{
  99.                                     __index = function (self2,Index2)
  100.                                         local RealService = RealGame:GetService(Service)
  101.                                         local Type2 = type(Index2)
  102.                                         if Type2 == "function" then
  103.                                             return function (self,...) return RealService[Index2](RealService,...)end
  104.                                         else
  105.                                             if Index2:lower() == "localplayer" then return Sandbox(owner) end
  106.                                             return RealService[Index2]
  107.                                         end
  108.                                     end;
  109.                                     __tostring = function(self) return RealGame:GetService(Service).Name end
  110.                                 })
  111.                             end;
  112.                             ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  113.                             ["userinputservice"] = function() return InternalData["UserInputService"] end;
  114.                             ["runservice"] = function()
  115.                                 return setmetatable({},{
  116.                                     __index = function(self2,Index2)
  117.                                         local RealService = RealGame:GetService(Service)
  118.                                         local Type2 = type(Index2)
  119.                                         if Type2 == "function" then
  120.                                             return function (self,...) return RealService[Index2](RealService,...) end
  121.                                         else
  122.                                             local RunServices = {
  123.                                                 ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  124.                                                 ["renderstepped"] = function() return RealService["Stepped"] end
  125.                                             }
  126.                                             if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  127.                                             return RealService[Index2]
  128.                                         end
  129.                                     end
  130.                                 })
  131.                             end
  132.                         }
  133.                         if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  134.                         return RealGame:GetService(Service)
  135.                     end
  136.                 end
  137.                 return function (self,...) return RealGame[Index](RealGame,...) end
  138.             else
  139.                 if game:GetService(Index) then return game:GetService(Index) end
  140.                 return RealGame[Index]
  141.             end
  142.         end
  143.         return nil
  144.     end
  145.         });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
  146.  
  147. --print controls--
  148. print("Noob Hammer by youngmacka123")
  149. print("Click to swing hammer")
  150. print("Press E to do the mega hammer attack")
  151. print("Press J to do the still chill emote")
  152. print("Press V to do the somebody toucha my spaghet emote")
  153. print("The chat was removed since you can get banned from the chat.")
  154.  
  155. --player variables--
  156. plr = owner
  157. char = owner.Character
  158. mouse = plr:GetMouse()
  159.  
  160. --body parts--
  161. torso = char["Torso"]
  162. rightarm = char["Right Arm"]
  163. leftarm = char["Left Arm"]
  164. head = char["Head"]
  165. leftleg = char["Left Leg"]
  166. rightleg = char["Right Leg"]
  167. bc = BrickColor
  168.  
  169. Left_Shoulder = torso:WaitForChild("Left Shoulder")
  170. Right_Shoulder = torso:WaitForChild("Right Shoulder")
  171. Left_Hip = torso:WaitForChild("Left Hip")
  172. Right_Hip = torso:WaitForChild("Right Hip")
  173. Neck = torso:WaitForChild("Neck")
  174. hum = char.Humanoid
  175. hum.WalkSpeed = 50
  176.  
  177. --create hammer--
  178. hammer = Instance.new("Part")
  179. hammer.Parent = char
  180. hammer.Name = "NoobHammer"
  181. hammer.Anchored = false
  182. hammer.CanCollide = false
  183. hammer.Size = Vector3.new(0,2,3)
  184. hammer.Position = rightarm.Position
  185. hammer.BrickColor = BrickColor.new("New Yeller")
  186. mhammer = Instance.new("SpecialMesh")
  187. mhammer.Parent = hammer
  188. mhammer.MeshId = "rbxassetid://10604848"
  189. mhammer.Scale = Vector3.new(0.5, 0.5, 0.5)
  190. whammer = Instance.new("Weld")
  191. whammer.Parent = hammer
  192. whammer.Part0 = hammer
  193. whammer.Part1 = rightarm
  194. whammer.C0 = CFrame.new(0, -1, 1)
  195. whammer.C1 = CFrame.Angles(200,0,0)
  196.  
  197. --end create hammer--
  198.  
  199. --music--
  200. music = Instance.new("Sound")
  201. music.Parent = hammer
  202. music.Playing = true
  203. music.Looped = true
  204. music.Volume = 10
  205. music.SoundId = "rbxassetid://1110421128"
  206.  
  207. --start animations--
  208. char:FindFirstChild("Animate"):Destroy()
  209. Right_Shoulder.C0 = CFrame.new(1.5,0,-0.5)
  210. Right_Shoulder.C1 = CFrame.Angles(math.rad(1000),0,0)
  211.  
  212. --start attacks n stuff--
  213. mouse.Button1Down:Connect(function()
  214.     oof = Instance.new("Sound")
  215.     oof.Parent = hammer
  216.     oof.Playing = true
  217.     oof.SoundId = "rbxassetid://2965731038"
  218.     oof.Volume = 10
  219.     oof.TimePosition = 0.4
  220.     Right_Shoulder.C1 = CFrame.Angles(math.rad(-50),0,0)
  221.     wait(0.05)
  222.     Right_Shoulder.C1 = CFrame.Angles(math.rad(-30),0,0)
  223.     wait(0.05)
  224.     Right_Shoulder.C1 = CFrame.Angles(math.rad(-10),0,0)
  225.     wait(0.05)
  226.     Right_Shoulder.C1 = CFrame.Angles(math.rad(-5),0,0)
  227.     wait(0.05)
  228.     Right_Shoulder.C1 = CFrame.Angles(math.rad(-0),0,0)
  229.     wait(0.05)
  230.     Right_Shoulder.C1 = CFrame.Angles(math.rad(-5),0,0)
  231.     ex = Instance.new("Explosion")
  232.     ex.Parent = hammer
  233.     ex.Visible = false
  234.     ex.Position = hammer.Position
  235.     ff = Instance.new("ForceField")
  236.     ff.Parent = char
  237.     ff.Visible = false
  238.     wait(0.05)
  239.     ff:Destroy()
  240.     ex:Destroy()
  241.     Right_Shoulder.C1 = CFrame.Angles(math.rad(-10),0,0)
  242.     wait(0.05)
  243.     Right_Shoulder.C1 = CFrame.Angles(math.rad(-30),0,0)
  244.     wait(0.05)
  245.     Right_Shoulder.C1 = CFrame.Angles(math.rad(1000),0,0)
  246.     oof:Destroy()
  247. end)
  248.  
  249. mouse.KeyDown:connect(function(Press)
  250.     Press=Press:lower()
  251.     if Press=='j' then
  252.         chill = Instance.new("Decal")
  253.         chill.Parent = head
  254.         chill.Face = "Front"
  255.         chill.Texture = "rbxassetid://7863486"
  256.         head.face.Transparency = 1
  257.         schill = Instance.new("Sound")
  258.         schill.Volume = 10
  259.         schill.Parent = head
  260.         schill.Playing = true
  261.         schill.SoundId = "rbxassetid://2834969263"
  262.         Right_Shoulder.C1 = CFrame.Angles(math.rad(1000),0,0)
  263.         wait(0.05)
  264.         Right_Shoulder.C1 = CFrame.Angles(math.rad(900),1,0)
  265.         wait(0.05)
  266.         Right_Shoulder.C1 = CFrame.Angles(math.rad(950),10,1)
  267.         wait(0.05)
  268.         Right_Shoulder.C1 = CFrame.Angles(math.rad(450),100,50)
  269.         wait(0.05)
  270.         Right_Shoulder.C1 = CFrame.Angles(math.rad(800),50,70)
  271.         wait(0.05)
  272.         Right_Shoulder.C1 = CFrame.Angles(math.rad(1500),1050,700)
  273.         wait(0.05)
  274.         Right_Shoulder.C1 = CFrame.Angles(math.rad(1000),0,0)
  275.         wait(0.05)
  276.         Right_Shoulder.C1 = CFrame.Angles(math.rad(1000),0,0)
  277.         wait(0.05)
  278.         Right_Shoulder.C1 = CFrame.Angles(math.rad(900),1,0)
  279.         wait(0.05)
  280.         Right_Shoulder.C1 = CFrame.Angles(math.rad(950),10,1)
  281.         wait(0.05)
  282.         Right_Shoulder.C1 = CFrame.Angles(math.rad(450),100,50)
  283.         wait(0.05)
  284.         Right_Shoulder.C1 = CFrame.Angles(math.rad(800),50,70)
  285.         wait(0.05)
  286.         Right_Shoulder.C1 = CFrame.Angles(math.rad(1500),1050,700)
  287.         wait(0.05)
  288.         Right_Shoulder.C1 = CFrame.Angles(math.rad(1000),0,0)
  289.         chill:Destroy()
  290.         head.face.Transparency = 0
  291.         schill:Destroy()
  292.     end
  293. end)
  294.    
  295.     mouse.KeyDown:connect(function(Press)
  296.     Press=Press:lower()
  297.     if Press=='e' then
  298.         mhammer.Scale = Vector3.new(2, 2, 2)
  299.         hammer.Size = Vector3.new(7, 21, 11)
  300.         ff3 = Instance.new("ForceField")
  301.         ff3.Parent = char
  302.         ff3.Visible = false
  303.         Right_Shoulder.C1 = CFrame.Angles(math.rad(1000),0,0)
  304.         ex = Instance.new("Explosion")
  305.         ex.Parent = hammer
  306.         ex.Position = hammer.Position
  307.         ex.Visible = false
  308.         wait(0.05)
  309.         Right_Shoulder.C1 = CFrame.Angles(math.rad(1000),5,0)
  310.         ex = Instance.new("Explosion")
  311.         ex.Parent = hammer
  312.         ex.Position = hammer.Position
  313.         ex.Visible = false
  314.         wait(0.05)
  315.         Right_Shoulder.C1 = CFrame.Angles(math.rad(1000),10,0)
  316.         ex = Instance.new("Explosion")
  317.         ex.Parent = hammer
  318.         ex.Position = hammer.Position
  319.         ex.Visible = false
  320.         wait(0.05)
  321.         Right_Shoulder.C1 = CFrame.Angles(math.rad(1000),20,0)
  322.         ex = Instance.new("Explosion")
  323.         ex.Parent = hammer
  324.         ex.Position = hammer.Position
  325.         ex.Visible = false
  326.         wait(0.05)
  327.         Right_Shoulder.C1 = CFrame.Angles(math.rad(1000),25,0)
  328.         ex = Instance.new("Explosion")
  329.         ex.Parent = hammer
  330.         ex.Position = hammer.Position
  331.         ex.Visible = false
  332.         wait(0.05)
  333.         Right_Shoulder.C1 = CFrame.Angles(math.rad(1000),30,0)
  334.         ex = Instance.new("Explosion")
  335.         ex.Parent = hammer
  336.         ex.Position = hammer.Position
  337.         ex.Visible = false
  338.         wait(0.05)
  339.         ff3:Destroy()
  340.         hammer.Size = Vector3.new(0,2,3)
  341.         mhammer.Scale = Vector3.new(0.5, 0.5, 0.5)
  342.         Right_Shoulder.C0 = CFrame.new(1.5,0,-0.5)
  343.         Right_Shoulder.C1 = CFrame.Angles(math.rad(1000),0,0)
  344.     end
  345. end)
  346.  
  347. mouse.KeyDown:connect(function(Press)
  348.         Press=Press:lower()
  349.         if Press=="v" then
  350.         spts = Instance.new("Sound")
  351.         spts.Parent = head
  352.         spts.TimePosition = 3
  353.         spts.Volume = 1000000000
  354.         spts.Playing = true
  355.         spts.SoundId = "rbxassetid://1309594851"
  356.         spts2 = Instance.new("Sound")
  357.         spts2.Parent = head
  358.         spts2.TimePosition = 3
  359.         spts2.Volume = 1000000000
  360.         spts2.Playing = true
  361.         spts2.SoundId = "rbxassetid://1309594851"
  362.         spts3 = Instance.new("Sound")
  363.         spts3.Parent = head
  364.         spts3.TimePosition = 3
  365.         spts3.Volume = 1000000000
  366.         spts3.Playing = true
  367.         spts3.SoundId = "rbxassetid://1309594851"
  368.         spts4 = Instance.new("Sound")
  369.         spts4.Parent = head
  370.         spts4.TimePosition = 3
  371.         spts4.Volume = 1000000000
  372.         spts4.Playing = true
  373.         spts4.SoundId = "rbxassetid://1309594851"
  374.         spts5 = Instance.new("Sound")
  375.         spts5.Parent = head
  376.         spts5.TimePosition = 3
  377.         spts5.Volume = 1000000000
  378.         spts5.Playing = true
  379.         spts5.SoundId = "rbxassetid://1309594851"
  380.  
  381.         music.Playing = false
  382.         Left_Shoulder.C0 = CFrame.new(-1.5,1,0)
  383.         Left_Shoulder.C1 = CFrame.Angles(math.rad(45),0,0)
  384.         wait(0.12)
  385.         Left_Shoulder.C0 = CFrame.new(-1.6,1.1,0.1)
  386.         Left_Shoulder.C1 = CFrame.Angles(math.rad(45),0.1,0)
  387.         wait(0.12)
  388.         Left_Shoulder.C0 = CFrame.new(-1.5,1,0)
  389.         Left_Shoulder.C1 = CFrame.Angles(math.rad(45),0,0)
  390.         wait(0.12)
  391.         Left_Shoulder.C0 = CFrame.new(-1.6,1.1,0.1)
  392.         Left_Shoulder.C1 = CFrame.Angles(math.rad(45),0.1,0)
  393.         wait(0.12)
  394.         Left_Shoulder.C0 = CFrame.new(-1.5,1,0)
  395.         Left_Shoulder.C1 = CFrame.Angles(math.rad(45),0,0)
  396.         wait(0.12)
  397.         Left_Shoulder.C0 = CFrame.new(-1.6,1.1,0.1)
  398.         Left_Shoulder.C1 = CFrame.Angles(math.rad(45),0.1,0)
  399.         wait(0.12)
  400.         Left_Shoulder.C0 = CFrame.new(-1.5,1,0)
  401.         Left_Shoulder.C1 = CFrame.Angles(math.rad(45),0,0)
  402.         wait(0.12)
  403.         Left_Shoulder.C0 = CFrame.new(-1.5,0,0)
  404.         Left_Shoulder.C1 = CFrame.Angles(math.rad(45),0.1,0)
  405.         wait(0.12)
  406.         Left_Shoulder.C0 = CFrame.new(-1.5,0,0)
  407.         Left_Shoulder.C1 = CFrame.Angles(math.rad(0),0,0)
  408.         music.Playing = true
  409.     end
  410. end)
  411.  
  412. --END OF SCRIPT--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement