Advertisement
idkwhatiam

Super Noob 64

May 1st, 2019
701
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 13.88 KB | None | 0 0
  1. 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 = {}
  2. do
  3.     script.Parent = owner.Character
  4.     local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  5.     local function NewFakeEvent()
  6.         local Bind = Instance.new("BindableEvent")
  7.         local Fake;Fake = {Connections = {},
  8.         fakeEvent=true;
  9.         Connect=function(self,Func)
  10.             Bind.Event:connect(Func)
  11.             self.Connections[Bind] = true
  12.             return setmetatable({Connected = true},{
  13.             __index = function (self,Index)
  14.                 if Index:lower() == "disconnect" then
  15.                     return function() Fake.Connections[Bind] = false;self.Connected = false end
  16.                 end
  17.                 return Fake[Index]
  18.             end;
  19.             __tostring = function() return "Connection" end;
  20.         })
  21.         end}
  22.         Fake.connect = Fake.Connect;return Fake;
  23.     end
  24.     local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  25.     local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  26.     local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  27.         self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  28.     end};ContextActionService.UnBindAction = ContextActionService.BindAction
  29.     local function TriggerEvent(self,Event,...)
  30.         local Trigger = Mouse[Event]
  31.         if Trigger and Trigger.fakeEvent and Trigger.Connections then
  32.             for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
  33.         end
  34.     end
  35.     Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
  36.     Event.OnServerEvent:Connect(function(FiredBy,Input)
  37.         if FiredBy.Name ~= owner.Name then return end
  38.         if Input.MouseEvent then
  39.             Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  40.         else
  41.             local Begin = Input.UserInputState == Enum.UserInputState.Begin
  42.             if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
  43.             for _,Action in pairs(ContextActionService.Actions) do
  44.                 for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  45.             end
  46.             Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  47.             UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  48.         end
  49.     end)
  50.     InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  51.     Event.Parent = NLS([[
  52.         local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
  53.         local Input = function(Input,gameProcessedEvent)
  54.             if gameProcessedEvent then return end
  55.             Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  56.         end
  57.         UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  58.         local Hit,Target
  59.         while wait(1/30) do
  60.             if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  61.                 Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  62.             end
  63.         end
  64.     ]],owner.Character)
  65. end
  66. RealGame = game;game = setmetatable({},{
  67.     __index = function (self,Index)
  68.         local Sandbox = function (Thing)
  69.             if Thing:IsA("Player") then
  70.                 local RealPlayer = Thing
  71.                 return setmetatable({},{
  72.                     __index = function (self,Index)
  73.                         local Type = type(RealPlayer[Index])
  74.                         if Type == "function" then
  75.                             if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  76.                                 return function (self)return InternalData["Mouse"] end
  77.                             end
  78.                             return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  79.                         end
  80.                         return RealPlayer[Index]
  81.                     end;
  82.                     __tostring = function(self) return RealPlayer.Name end
  83.                 })
  84.             end
  85.         end
  86.         if RealGame[Index] then
  87.             local Type = type(RealGame[Index])
  88.             if Type == "function" then
  89.                 if Index:lower() == "getservice" or Index:lower() == "service" then
  90.                     return function (self,Service)
  91.                         local FakeServices = {
  92.                             ["players"] = function()
  93.                                 return setmetatable({},{
  94.                                     __index = function (self2,Index2)
  95.                                         local RealService = RealGame:GetService(Service)
  96.                                         local Type2 = type(Index2)
  97.                                         if Type2 == "function" then
  98.                                             return function (self,...) return RealService[Index2](RealService,...)end
  99.                                         else
  100.                                             if Index2:lower() == "localplayer" then return Sandbox(owner) end
  101.                                             return RealService[Index2]
  102.                                         end
  103.                                     end;
  104.                                     __tostring = function(self) return RealGame:GetService(Service).Name end
  105.                                 })
  106.                             end;
  107.                             ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  108.                             ["userinputservice"] = function() return InternalData["UserInputService"] end;
  109.                             ["runservice"] = function()
  110.                                 return setmetatable({},{
  111.                                     __index = function(self2,Index2)
  112.                                         local RealService = RealGame:GetService(Service)
  113.                                         local Type2 = type(Index2)
  114.                                         if Type2 == "function" then
  115.                                             return function (self,...) return RealService[Index2](RealService,...) end
  116.                                         else
  117.                                             local RunServices = {
  118.                                                 ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  119.                                                 ["renderstepped"] = function() return RealService["Stepped"] end
  120.                                             }
  121.                                             if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  122.                                             return RealService[Index2]
  123.                                         end
  124.                                     end
  125.                                 })
  126.                             end
  127.                         }
  128.                         if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  129.                         return RealGame:GetService(Service)
  130.                     end
  131.                 end
  132.                 return function (self,...) return RealGame[Index](RealGame,...) end
  133.             else
  134.                 if game:GetService(Index) then return game:GetService(Index) end
  135.                 return RealGame[Index]
  136.             end
  137.         end
  138.         return nil
  139.     end
  140.         });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
  141.  
  142. --Super Noob 64--
  143.  
  144. --A phsycis + Character overhall--
  145.  
  146. --Made by youngmacka123, please don't steal.--
  147.  
  148. print("Super Noob 64 loaded!")
  149. print("Click to punch")
  150. print("N to mute music")
  151. print("M to unmute music")
  152.  
  153. --Player things--
  154.  
  155. plr = owner
  156. char = owner.Character
  157. hum = char.Humanoid
  158. mouse = plr:GetMouse()
  159. ws = hum.WalkSpeed
  160.  
  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.  
  175. --Smoother Physics--
  176. weld = Instance.new("Weld")
  177. weld.Parent = rightarm
  178. weld.Part0 = rightarm
  179. weld.Part1 = torso
  180.  
  181. weld.C0 = CFrame.new(-1.5,0,0)
  182. weld.C1 = CFrame.Angles(math.rad(-5),0,0)
  183.  
  184. weld1 = Instance.new("Weld")
  185. weld1.Parent = leftarm
  186. weld1.Part0 = leftarm
  187. weld1.Part1 = torso
  188.  
  189. weld1.C0 = CFrame.new(1.5,0,0)
  190. weld1.C1 = CFrame.Angles(math.rad(-5),0,0)
  191.  
  192.  
  193. --Apply Physics--
  194.  
  195. ws = 26
  196.  
  197. hammer = Instance.new("Part")
  198. hammer.Parent = char
  199. hammer.Name = "NoobHammer"
  200. hammer.Anchored = false
  201. hammer.CanCollide = false
  202. hammer.Size = Vector3.new(7, 21, 11)
  203. hammer.Position = rightarm.Position
  204. hammer.BrickColor = BrickColor.new("New Yeller")
  205. hammer.Transparency = 1
  206.  
  207. whammer = Instance.new("Weld")
  208. whammer.Parent = hammer
  209. whammer.Part0 = hammer
  210. whammer.Part1 = rightarm
  211. whammer.C0 = CFrame.new(0, -1, 1)
  212. whammer.C1 = CFrame.Angles(200,0,0)
  213.  
  214. --Change Character--
  215.  
  216. torso.BrickColor = BrickColor.new("Bright blue")
  217. rightarm.BrickColor = BrickColor.new("Bright yellow")
  218. leftarm.BrickColor = BrickColor.new("Bright yellow")
  219. rightleg.BrickColor = BrickColor.new("Br. yellowish green")
  220. leftleg.BrickColor = BrickColor.new("Br. yellowish green")
  221. head.BrickColor = BrickColor.new("Bright yellow")
  222. head.face.Texture = "http://www.roblox.com/asset/?id=65724729"
  223.  
  224. for i,v in pairs(char:children()) do
  225.     if v:IsA("Hat") then
  226.         v:Destroy()
  227.     end
  228. end
  229. for i,v in pairs(char:children()) do
  230.     if v:IsA("Accessory") then
  231.         v:Destroy()
  232.     end
  233. end
  234. for i,v in pairs(char:children()) do
  235.     if v:IsA("Hair") then
  236.         v:Destroy()
  237.     end
  238. end
  239. for i,v in pairs(char:children()) do
  240.     if v:IsA("Shirt") then
  241.         v:Destroy()
  242.     end
  243. end
  244. for i,v in pairs(char:children()) do
  245.     if v:IsA("Pants") then
  246.         v:Destroy()
  247.     end
  248. end
  249. for i,v in pairs(char:children()) do
  250.     if v:IsA("Graphic Shirt") then
  251.         v:Destroy()
  252.     end
  253. end
  254. for i,v in pairs(char:children()) do
  255.     if v:IsA("GraphicShirt") then
  256.         v:Destroy()
  257.     end
  258. end
  259.  
  260. for _,v in pairs(char:children()) do
  261. if v:IsA("Shirt") then
  262. v.ShirtTemplate = "rbxassetid://0"
  263. elseif v:IsA("Pants") then
  264. v.PantsTemplate = "rbxassetid://0"
  265. elseif v:IsA("ShirtGraphic") then
  266. v:Remove()
  267. wait(.1)
  268. torso.roblox:Remove()
  269. elseif v:IsA("Accessory") then
  270. v:Remove()
  271. end
  272. end
  273.  
  274. --Music--
  275.  
  276. music = Instance.new("Sound")
  277. music.Parent = head
  278. music.SoundId = "rbxassetid://1399386231"
  279. music.Playing = false
  280. music.Looped = true
  281.  
  282. --Attacks--
  283. charge = false
  284.  
  285. mouse.Button1Down:Connect(function()
  286.     if charge==false then
  287.         wait(0.0000000000000000000000000005)
  288.        
  289.         charge = true
  290.        
  291.         hitbox = Instance.new("Part")
  292.         hitbox.Parent = rightarm
  293.         hitbox.Size = rightarm.Size
  294.         hitbox.Anchored = false
  295.         hitbox.CanCollide = false
  296.         hitbox.Transparency = 1
  297.         hitbox.Locked = false
  298.         hitweld = Instance.new("Weld")
  299.         hitweld.Parent = hitbox
  300.         hitweld.Part0 = hitbox
  301.         hitweld.Part1 = leftarm
  302.         hitbox.Touched:connect(function(hit)
  303.             hum = hit.Parent:FindFirstChild("Humanoid")
  304.            
  305.             hum.Health = hum.Health - 25
  306.         end)
  307.        
  308.         punchsound = Instance.new("Sound")
  309.         punchsound.Parent = head
  310.         punchsound.Playing = true
  311.         punchsound.SoundId = "rbxassetid://367706115"
  312.         weld1.C1 = CFrame.Angles(math.rad(10),0,0)
  313.         wait(0.05)
  314.         weld1.C1 = CFrame.Angles(math.rad(15),0,0)
  315.         wait(0.05)
  316.         weld1.C1 = CFrame.Angles(math.rad(20),0,0)
  317.         wait(0.05)
  318.         weld1.C1 = CFrame.Angles(math.rad(25),0,0)
  319.         wait(0.05)
  320.         weld1.C1 = CFrame.Angles(math.rad(30),0,0)
  321.         wait(0.05)
  322.         weld1.C1 = CFrame.Angles(math.rad(35),0,0)
  323.         wait(0.05)
  324.         weld1.C1 = CFrame.Angles(math.rad(40),0,0)
  325.         wait(0.05)
  326.         weld1.C1 = CFrame.Angles(math.rad(45),0,0)
  327.         wait(0.05)
  328.         weld1.C1 = CFrame.Angles(math.rad(50),0,0)
  329.         wait(0.05)
  330.         weld1.C1 = CFrame.Angles(math.rad(55),0,0)
  331.         wait(0.05)
  332.         weld1.C1 = CFrame.Angles(math.rad(60),0,0)
  333.         wait(0.05)
  334.         weld1.C1 = CFrame.Angles(math.rad(65),0,0)
  335.         wait(0.05)
  336.         weld1.C1 = CFrame.Angles(math.rad(70),0,0)
  337.         wait(0.05)
  338.         weld1.C1 = CFrame.Angles(math.rad(65),0,0)
  339.         wait(0.05)
  340.         weld1.C1 = CFrame.Angles(math.rad(60),0,0)
  341.         wait(0.05)
  342.         weld1.C1 = CFrame.Angles(math.rad(55),0,0)
  343.         wait(0.05)
  344.         weld1.C1 = CFrame.Angles(math.rad(50),0,0)
  345.         wait(0.05)
  346.         weld1.C1 = CFrame.Angles(math.rad(45),0,0)
  347.         wait(0.05)
  348.         weld1.C1 = CFrame.Angles(math.rad(40),0,0)
  349.         wait(0.05)
  350.         weld1.C1 = CFrame.Angles(math.rad(35),0,0)
  351.         wait(0.05)
  352.         weld1.C1 = CFrame.Angles(math.rad(25),0,0)
  353.         wait(0.05)
  354.         weld1.C1 = CFrame.Angles(math.rad(20),0,0)
  355.         wait(0.05)
  356.         weld1.C1 = CFrame.Angles(math.rad(15),0,0)
  357.         wait(0.05)
  358.         weld1.C1 = CFrame.Angles(math.rad(10),0,0)
  359.         wait(0.05)
  360.         weld1.C1 = CFrame.Angles(math.rad(-5),0,0)
  361.         charge = false
  362.         hitbox:Destroy()
  363.         hitweld:Destroy()
  364.         punchsound:Destroy()
  365.     end
  366. end)
  367.  
  368. --Mute and unmute--
  369.  
  370. mouse.KeyDown:connect(function(Press)
  371. Press=Press:lower()
  372. if Press=='m' then
  373.     if music.Playing==false then
  374.             music.Playing = true
  375.         end
  376.     end
  377. end)
  378.  
  379. mouse.KeyDown:connect(function(Press)
  380. Press=Press:lower()
  381. if Press=='n' then
  382.     if music.Playing==true then
  383.             music.Playing = false
  384.         end
  385.     end
  386. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement