Nudrius

Goku Script

Mar 3rd, 2018
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.49 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86. local h,t
  87. --Give the server mouse data every second frame, but only if the values changed
  88. --If player is not moving their mouse, client won't fire events
  89. local HB = game:GetService("RunService").Heartbeat
  90. while true do
  91. if h~=Mouse.Hit or t~=Mouse.Target then
  92. h,t=Mouse.Hit,Mouse.Target
  93. Event:FireServer({isMouse=true,Target=t,Hit=h})
  94. end
  95. --Wait 2 frames
  96. for i=1,2 do
  97. HB:Wait()
  98. end
  99. end]==],script)
  100.  
  101. ----Sandboxed game object that allows the usage of client-side methods and services
  102. --Real game object
  103. local RealGame = game
  104.  
  105. --Metatable for fake service
  106. local FakeService_Metatable = {
  107. __index = function(self,k)
  108. local s = rawget(self,"_RealService")
  109. if s then
  110. return typeof(s[k])=="function"
  111. and function(_,...)return s[k](s,...)end or s[k]
  112. end
  113. end,
  114. __newindex = function(self,k,v)
  115. local s = rawget(self,"_RealService")
  116. if s then s[k]=v end
  117. end
  118. }
  119. local function FakeService(t,RealService)
  120. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  121. return setmetatable(t,FakeService_Metatable)
  122. end
  123.  
  124. --Fake game object
  125. local FakeGame = {
  126. GetService = function(self,s)
  127. return rawget(self,s) or RealGame:GetService(s)
  128. end,
  129. Players = FakeService({
  130. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  131. },"Players"),
  132. UserInputService = FakeService(UIS,"UserInputService"),
  133. ContextActionService = FakeService(CAS,"ContextActionService"),
  134. RunService = FakeService({
  135. _btrs = {},
  136. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  137. BindToRenderStep = function(self,name,_,fun)
  138. self._btrs[name] = self.Heartbeat:Connect(fun)
  139. end,
  140. UnbindFromRenderStep = function(self,name)
  141. self._btrs[name]:Disconnect()
  142. end,
  143. },"RunService")
  144. }
  145. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  146. FakeGame.service = FakeGame.GetService
  147. FakeService(FakeGame,game)
  148. --Changing owner to fake player object to support owner:GetMouse()
  149. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  150. end
  151.  
  152. local p = game.Players.LocalPlayer
  153. local char = p.Character
  154. local mouse = p:GetMouse()
  155. local larm = char["Left Arm"]
  156. local rarm = char["Right Arm"]
  157. local lleg = char["Left Leg"]
  158. local rleg = char["Right Leg"]
  159. local hed = char.Head
  160. local torso = char.Torso
  161. local hum = char.Humanoid
  162. local cam = game.Workspace.CurrentCamera
  163. local root = char.HumanoidRootPart
  164. local deb = false
  165. local shot = 0
  166. local debris=game:service"Debris"
  167. local l = game:GetService("Lighting")
  168. local rs = game:GetService("RunService").RenderStepped
  169. ptz = {0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1}
  170. math.randomseed(os.time())
  171. for i,v in pairs(char:children()) do
  172. if v:IsA("Hat") then
  173. v:Destroy()
  174. end
  175. end
  176. for i,v in pairs (hed:GetChildren()) do
  177. if v:IsA("Sound") then
  178. v:Destroy()
  179. end
  180. end
  181. ----------------------------------------------------
  182. Debounces = {
  183. CanAttack = true;
  184. NoIdl = false;
  185. Slashing = false;
  186. Slashed = false;
  187. RPunch = false;
  188. RPunched = false;
  189. LPunch = false;
  190. LPunched = false;
  191. }
  192. local Touche = {char.Name, }
  193. ----------------------------------------------------
  194. hed.face.Texture = "rbxassetid://33395282"
  195. char["Body Colors"].HeadColor = BrickColor.new("Pastel brown")
  196. char["Body Colors"].TorsoColor = BrickColor.new("Pastel brown")
  197. char["Body Colors"].LeftArmColor = BrickColor.new("Pastel brown")
  198. char["Body Colors"].RightArmColor = BrickColor.new("Pastel brown")
  199. ----------------------------------------------------
  200. ypcall(function()
  201. char.Shirt:Destroy()
  202. char.Pants:Destroy()
  203. shirt = Instance.new("Shirt", char)
  204. shirt.Name = "Shirt"
  205. pants = Instance.new("Pants", char)
  206. pants.Name = "Pants"
  207. char.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=513620832"
  208. char.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=513621366"
  209. end)
  210. ----------------------------------------------------
  211. LoudVolume = false
  212. Submerged = false
  213. Music = true
  214. script.Name = "GOKU"
  215. Player = game.Players.LocalPlayer
  216. c = game.Players.LocalPlayer.Character
  217. Head = c.Head
  218. anim = c.Humanoid.Animator
  219. Humanoid = c:findFirstChild("Humanoid")
  220. Humanoid.Name = "InfiniteBeing"
  221. b23 = Instance.new("BoolValue", c)
  222. b23.Name = "InfiniteHuman"
  223. rage = false
  224. p = game.Players.LocalPlayer
  225. Music = false
  226. local Effects = {}
  227. attack = false
  228. local attacking = false
  229. vt = Vector3.new
  230. bc = BrickColor.new
  231. br = BrickColor.random
  232. it = Instance.new
  233. cf = CFrame.new
  234. euler = CFrame.fromEulerAnglesXYZ
  235. angles = CFrame.Angles
  236. matr = math.random
  237. mouse = Player:GetMouse()
  238. RSC0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  239. RSC1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  240. LSC0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  241. LSC1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  242. RHC0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  243. RHC1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  244. LHC0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  245. LHC1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  246. NC0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  247. NC1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  248. RJC0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  249. RJC1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  250. RS = c.Torso:FindFirstChild("Right Shoulder")
  251. LS = c.Torso:FindFirstChild("Left Shoulder")
  252. RH = c.Torso:FindFirstChild("Right Hip")
  253. LH = c.Torso:FindFirstChild("Left Hip")
  254. RJ = c.HumanoidRootPart:FindFirstChild("RootJoint")
  255. N = c.Torso:FindFirstChild("Neck")
  256. cf = CFrame.new
  257. ang = CFrame.Angles
  258. rd = math.rad
  259. rd2 = math.random
  260. function swait(num)
  261. if num == 0 or num == nil then
  262. game:service("RunService").Heartbeat:wait(0)
  263. else
  264. for i = 0, num do
  265. game:service("RunService").Heartbeat:wait(0)
  266. end
  267. end
  268. end
  269. function lerpz(joint, prop, cfrmz, alp)
  270. joint[prop] = joint[prop]:lerp(cfrmz, alp)
  271. end
  272. function resetlerp()
  273. RJ.C0 = RJC0
  274. RJ.C1 = RJC1
  275. N.C0 = NC0
  276. N.C1 = NC1
  277. RS.C0 = RSC0
  278. RS.C1 = RSC1
  279. LS.C0 = LSC0
  280. LS.C1 = LSC1
  281. RH.C0 = RHC0
  282. RH.C1 = RHC1
  283. LH.C0 = LHC0
  284. LH.C1 = LHC1
  285. end
  286. for _, c in pairs(c:children()) do
  287. if c.className == "Accessory" then
  288. c.Parent = nil
  289. end
  290. end
  291. local S2 = Instance.new("Sound", c.HumanoidRootPart)
  292. S2.SoundId = ""
  293. S2.Volume = 0
  294. S2.Looped = true
  295. local P = Instance.new("Part", c)
  296. P.CanCollide = false
  297. P.Size = Vector3.new(0.2, 0.2, 0.2)
  298. P.BrickColor = BrickColor.new("Really black")
  299. local M = Instance.new("SpecialMesh", P)
  300. M.MeshId = "rbxassetid://884095858"
  301. M.Scale = Vector3.new(0.04, 0.04, 0.04)
  302. M.Offset = Vector3.new(-0.225, 0.65, -0.1)
  303. local W = Instance.new("Weld", c.Head)
  304. W.Part0 = c.Head
  305. W.Part1 = P
  306. W.C0 = CFrame.Angles(0, math.rad(180), 0)
  307. trazx = Instance.new("ParticleEmitter")
  308. function New(Object, Parent, Name, Data)
  309. local Object = Instance.new(Object)
  310. for Index, Value in pairs(Data or {}) do
  311. Object[Index] = Value
  312. end
  313. Object.Parent = Parent
  314. Object.Name = Name
  315. return Object
  316. end
  317. Form = "None"
  318. function SSJB()
  319. if Form == "None" then
  320. Form = "SSJB"
  321. hed.face.Texture = "rbxassetid://439123785"
  322. attack = true
  323. anim.Parent = nil
  324. for i = 1, 35 do
  325. swait()
  326. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(-15), rd(0), rd(0)), 0.3)
  327. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(-15), rd(0), rd(0)), 0.3)
  328. lerpz(RS, "C0", RSC0 * cf(0, 0, -0.5) * ang(rd(-45), rd(0), rd(140)), 0.3)
  329. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.3)
  330. lerpz(LS, "C0", LSC0 * cf(0, 0, -0.5) * ang(rd(-45), rd(0), rd(-140)), 0.3)
  331. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.3)
  332. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(-15), rd(0), rd(-25)), 0.3)
  333. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.3)
  334. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(-15), rd(0), rd(25)), 0.3)
  335. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.3)
  336. end
  337. local S = Instance.new("Sound", c.HumanoidRootPart)
  338. S.SoundId = "rbxassetid://263260463"
  339. S.Volume = 1
  340. S:Play()
  341. local S2 = Instance.new("Sound", c.HumanoidRootPart)
  342. S2.SoundId = "rbxassetid://600060450"
  343. S2.Looped = true
  344. S2:Play()
  345. for i = 1, 15 do
  346. swait()
  347. lerpz(RJ, "C0", RJC0 * cf(0, 0, -0.35) * ang(rd(10), rd(0), rd(0)), 0.5)
  348. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(35), rd(0), rd(0)), 0.5)
  349. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(-5), rd(5), rd(45)), 0.5)
  350. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  351. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(-5), rd(-5), rd(-45)), 0.5)
  352. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  353. lerpz(RH, "C0", RHC0 * cf(0.35, 0.35, 0.05) * ang(rd(0), rd(-10), rd(10)), 0.5)
  354. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  355. lerpz(LH, "C0", LHC0 * cf(-0.35, 0.35, 0.05) * ang(rd(0), rd(10), rd(-10)), 0.5)
  356. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  357. end
  358. for i, v in pairs(c:children()) do
  359. if v.ClassName == "Part" then
  360. local tra = trazx:clone()
  361. tra.Parent = v
  362. tra.LightEmission = 1
  363. tra.Color = ColorSequence.new(Color3.new(0, 0.6666666666666666, 1))
  364. tra.Rate = 15
  365. tra.Rotation = NumberRange.new(-5, 5)
  366. tra.Lifetime = NumberRange.new(1.5, 2)
  367. tra.Size = NumberSequence.new({
  368. NumberSequenceKeypoint.new(0, 0.1, 0),
  369. NumberSequenceKeypoint.new(1, 0, 0)
  370. })
  371. tra.Transparency = NumberSequence.new({
  372. NumberSequenceKeypoint.new(0, 1, 0),
  373. NumberSequenceKeypoint.new(0.135, 0, 0),
  374. NumberSequenceKeypoint.new(0.875, 0, 0),
  375. NumberSequenceKeypoint.new(1, 1, 0)
  376. })
  377. tra.Speed = NumberRange.new(0.5)
  378. tra.VelocitySpread = 360
  379. tra.VelocityInheritance = 0.5
  380. tra.ZOffset = 2
  381. tra.Acceleration = Vector3.new(0, 2.5, 0)
  382. end
  383. end
  384. local tra = trazx:clone()
  385. tra.Parent = c.HumanoidRootPart
  386. tra.Texture = "rbxassetid://347730682"
  387. tra.LightEmission = 0.8
  388. tra.Color = ColorSequence.new(Color3.new(0, 0.6666666666666666, 1))
  389. tra.Rate = 250
  390. tra.Rotation = NumberRange.new(-5, 5)
  391. tra.Lifetime = NumberRange.new(0.75)
  392. tra.Size = NumberSequence.new({
  393. NumberSequenceKeypoint.new(0, 4.81, 0.875),
  394. NumberSequenceKeypoint.new(1, 2.13, 0.875)
  395. })
  396. tra.Transparency = NumberSequence.new({
  397. NumberSequenceKeypoint.new(0, 1, 0),
  398. NumberSequenceKeypoint.new(0.0399, 0.85, 0),
  399. NumberSequenceKeypoint.new(0.394, 0.9, 0),
  400. NumberSequenceKeypoint.new(0.699, 1, 0),
  401. NumberSequenceKeypoint.new(1, 1, 0)
  402. })
  403. tra.Speed = NumberRange.new(15)
  404. tra.VelocitySpread = 360
  405. tra.VelocityInheritance = 0.5
  406. tra.ZOffset = 3.5
  407. tra.Acceleration = Vector3.new(0, 25, 0)
  408. for i = 1, 25 do
  409. for i = 1, 3 do
  410. swait()
  411. lerpz(RJ, "C0", RJC0 * cf(0, 0, -0.4) * ang(rd(12), rd(0), rd(0)), 0.5)
  412. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(35), rd(0), rd(0)), 0.5)
  413. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(-15), rd(5), rd(50)), 0.5)
  414. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  415. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(-15), rd(-5), rd(-50)), 0.5)
  416. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  417. lerpz(RH, "C0", RHC0 * cf(0.35, 0.35, 0.05) * ang(rd(0), rd(-12), rd(12)), 0.5)
  418. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  419. lerpz(LH, "C0", LHC0 * cf(-0.35, 0.35, 0.05) * ang(rd(0), rd(12), rd(-12)), 0.5)
  420. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  421. end
  422. for i = 1, 3 do
  423. swait()
  424. lerpz(RJ, "C0", RJC0 * cf(0, 0, -0.35) * ang(rd(10), rd(0), rd(0)), 0.5)
  425. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(35), rd(0), rd(0)), 0.5)
  426. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(-15), rd(5), rd(45)), 0.5)
  427. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  428. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(-15), rd(-5), rd(-45)
Add Comment
Please, Sign In to add comment