Advertisement
Ban43_GodOfEdits

eqe

Aug 4th, 2018
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 33.56 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code by Mokiros")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local Mouse = Player:GetMouse()
  66. local UIS = game:GetService("UserInputService")
  67. local input = function(io,a)
  68. if a then return end
  69. --Since InputObject is a client-side instance, we create and pass table instead
  70. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  71. end
  72. UIS.InputBegan:Connect(input)
  73. UIS.InputEnded:Connect(input)
  74.  
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84.  
  85. ----Sandboxed game object that allows the usage of client-side methods and services
  86. --Real game object
  87. local _rg = game
  88.  
  89. --Metatable for fake service
  90. local fsmt = {
  91. __index = function(self,k)
  92. local s = rawget(self,"_RealService")
  93. if s then return s[k] end
  94. end,
  95. __newindex = function(self,k,v)
  96. local s = rawget(self,"_RealService")
  97. if s then s[k]=v end
  98. end,
  99. __call = function(self,...)
  100. local s = rawget(self,"_RealService")
  101. if s then return s(...) end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return self[s]
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. }
  120. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  121. g.service = g.GetService
  122.  
  123. g.RunService = FakeService({
  124. RenderStepped = _rg:GetService("RunService").Heartbeat,
  125. BindToRenderStep = function(self,name,_,fun)
  126. self._btrs[name] = self.Heartbeat:Connect(fun)
  127. end,
  128. UnbindFromRenderStep = function(self,name)
  129. self._btrs[name]:Disconnect()
  130. end,
  131. },"RunService")
  132.  
  133. setmetatable(g,{
  134. __index=function(self,s)
  135. return _rg:GetService(s) or typeof(_rg[s])=="function"
  136. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  137. end,
  138. __newindex = fsmt.__newindex,
  139. __call = fsmt.__call
  140. })
  141. --Changing owner to fake player object to support owner:GetMouse()
  142. game,owner = g,g.Players.LocalPlayer
  143. end
  144. -- pcall(function()
  145. -- script.DSource.Value = ""
  146. -- script.DSource:Destroy()
  147. -- end)
  148. -- script.Parent = nil
  149.  
  150. game:service'RunService':UnbindFromRenderStep('Mug_Anims')
  151. ply=game:service'Players'.LocalPlayer
  152.  
  153. repeat wait()until ply~=nil
  154.  
  155. char=ply.Character
  156. torso=char.Torso
  157.  
  158. rarm,larm=char['Right Arm'],char['Left Arm']
  159. rleg,lleg=char['Right Leg'],char['Left Leg']
  160. rshl,lshl=torso['Right Shoulder'],torso['Left Shoulder']
  161. rhip,lhip=torso['Right Hip'],torso['Left Hip']
  162.  
  163. bcol=BrickColor.new
  164. cfn,md,mr,v3n=CFrame.new,math.rad,math.random,Vector3.new
  165. ang=function(x,y,z)return CFrame.Angles(x or 0,y or 0,z or 0)end
  166. Debris=game:service'Debris'
  167. m={}
  168. m.tau=math.pi*2
  169. m.floatforce = 196.25
  170. numkp=NumberSequenceKeypoint.new
  171.  
  172. hum_root=char.HumanoidRootPart
  173.  
  174. mouse=ply:GetMouse()
  175.  
  176. function l(a,x,y,z,xx,yy,zz)
  177. if string.find(tostring(a),',') == nil then
  178. return (a.CFrame*CFrame.new(x or 0,y or 0,z or 0))*CFrame.Angles(xx or 0,yy or 0, zz or 0)
  179. else return (a * CFrame.new(x or 0,y or 0,z or 0))*CFrame.Angles(xx or 0,yy or 0,zz or 0)
  180. end
  181. end
  182.  
  183. local running = false
  184.  
  185. function getTool()
  186. for _, kid in ipairs(script.Parent:GetChildren()) do
  187. if kid.className == "Tool" then return kid end
  188. end
  189. return nil
  190. end
  191.  
  192.  
  193. mouse.KeyDown:connect(function (key) -- Run function
  194. key = string.lower(key)
  195. if string.byte(key) == 48 then
  196. running = true
  197. local keyConnection = mouse.KeyUp:connect(function (key)
  198. if string.byte(key) == 48 then
  199. running = false
  200. end
  201. end)
  202. for i = 1,5 do
  203. game.Workspace.CurrentCamera.FieldOfView = (70+(i*2))
  204. wait()
  205. end
  206. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 150
  207. repeat wait () until running == false
  208. keyConnection:disconnect()
  209. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
  210. for i = 1,5 do
  211. game.Workspace.CurrentCamera.FieldOfView = (80-(i*2))
  212. wait()
  213. end
  214. end
  215. end)
  216.  
  217. --------------------------------------
  218. plr=game:service'Players'.LocalPlayer
  219. chr=plr.Character
  220. local ms = plr:GetMouse()
  221. CV="Bright red"
  222.  
  223. local txt = Instance.new("BillboardGui", chr)
  224. txt.Adornee = chr.Head
  225. txt.Name = "_status"
  226. txt.Size = UDim2.new(4, 0, 2.5, 0)
  227. txt.StudsOffset = Vector3.new(-4, 2, 0)
  228. local text = Instance.new("TextLabel", txt)
  229. text.Size = UDim2.new(3, 0, 0.5, 0)
  230. text.FontSize = "Size24"
  231. text.TextScaled = true
  232. text.TextTransparency = 0
  233. text.BackgroundTransparency = 1
  234. text.TextTransparency = 0
  235. text.TextStrokeTransparency = 0
  236. text.Font = "SciFi"
  237. text.TextStrokeColor3 = Color3.new(0,0,0)
  238. text.Text = "The Captain"
  239. --------------------------------------
  240. plr=game:service'Players'.LocalPlayer
  241. chr=plr.Character
  242. local ms = plr:GetMouse()
  243. CV="Bright red"
  244.  
  245. local txt = Instance.new("BillboardGui", chr)
  246. txt.Adornee = chr.Head
  247. txt.Name = "_status"
  248. txt.Size = UDim2.new(4, 0, 2.5, 0)
  249. txt.StudsOffset = Vector3.new(-4, 1.5, 0)
  250. local text = Instance.new("TextLabel", txt)
  251. text.Size = UDim2.new(3, 0, 0.5, 0)
  252. text.FontSize = "Size24"
  253. text.TextScaled = false
  254. text.TextTransparency = 0
  255. text.BackgroundTransparency = 1
  256. text.TextTransparency = 0
  257. text.TextStrokeTransparency = 0
  258. text.Font = "SciFi"
  259. text.TextStrokeColor3 = Color3.new(128,128,128)
  260. text.Text = "By bannaboy43"
  261. ----------------------------------------------bepsiii
  262.  
  263.  
  264. ----------------------Clothes-------------------------------
  265. --[Quicksilver edit by Bannaboy43 (only make edits cant stcipt ihml if this gets leaked tell people to send me scripts to make edits)
  266. wait(1 / 60)
  267. p = game.Players.LocalPlayer
  268. char = p.Character
  269. torso = char.Torso
  270. neck = char.Torso.Neck
  271. hum = char.Humanoid
  272.  
  273. wait()
  274. hum.Health =hum.MaxHealth
  275. char.Head.face.Texture = "rbxassetid://166951215"
  276.  
  277.  
  278.  
  279. z = Instance.new("Sound", char)
  280. z.SoundId = "rbxassetid://1689407690" -- Put Music ID Here.
  281. z.Looped = true
  282. z.Volume = 2
  283. wait(.1)
  284. z:Play()
  285.  
  286.  
  287. --Hat = Instance.new("Model")
  288. --Hat.Parent = char
  289. --Hat.Name = "Hat"
  290. --rh = Instance.new("Part")
  291. --rh.Parent = Hat
  292. --rh.BrickColor = BrickColor.new("Brown")
  293. --rh.Locked = true
  294. --rh.CanCollide = false
  295. --mesh = Instance.new("SpecialMesh")
  296. --rh.formFactor = "Symmetric"
  297. --mesh.MeshType = "FileMesh"
  298. --mesh.MeshId = "rbxassetid://323386572"
  299. --mesh.Parent = rh
  300. --local weld = Instance.new("Weld")
  301. --weld.Parent = rh
  302. --weld.Part0 = rh
  303. --weld.Part1 =char.Head
  304. --weld.C0 = CFrame.new(0,.16,.35)*CFrame.Angles(0, 0, 0)
  305. --mesh.Scale = Vector3.new(1,1,1)
  306. ----------------------------------------------------
  307. -------------Head---------------------------------
  308. char:FindFirstChildOfClass'Humanoid'.JumpPower = 100
  309.  
  310. Head = Instance.new("Part", char)
  311. Head.Size = Vector3.new(1,1,1)
  312. Headmesh = Instance.new("SpecialMesh", Head)
  313. Headmesh.MeshId = "rbxassetid://81504052"
  314. Headmesh.Scale = Vector3.new(1, 1.1, 1)
  315. Headmesh.TextureId = "rbxassetid://81504106"
  316. Head.Transparency = 0
  317. Head.CanCollide = false
  318. Head.Name = "plrHead"
  319. Head.Anchored = false
  320. Head.BrickColor = BrickColor.new("Really black")
  321. Weld = Instance.new("Weld", char)
  322. Weld.Part0 = char["Head"]
  323. Weld.Part1 = Head
  324. Weld.C1 = CFrame.new(0,-.3,0.2)*CFrame.Angles(0,(0),0)
  325. -------------Shield---------------------------------
  326. char:FindFirstChildOfClass'Humanoid'.JumpPower = 100
  327.  
  328. Shield = Instance.new("Part", char)
  329. Shield.Size = Vector3.new(1,1,1)
  330. Shieldmesh = Instance.new("SpecialMesh", Shield)
  331. Shieldmesh.MeshId = "rbxassetid://1587982010"
  332. Shieldmesh.Scale = Vector3.new(1,1,1)
  333. Shieldmesh.TextureId = "rbxassetid://1587981480"
  334. Shield.Transparency = 0
  335. Shield.CanCollide = false
  336. Shield.Name = "plrShield"
  337. Shield.Anchored = false
  338. Shield.BrickColor = BrickColor.new("Really black")
  339. Weld = Instance.new("Weld", char)
  340. Weld.Part0 = char["Left Arm"]
  341. Weld.Part1 = Shield
  342. Weld.C1 = CFrame.new(0,.5,0.5)*CFrame.Angles(0,4.7,0)
  343. -------------Shield---------------------------------
  344. char:FindFirstChildOfClass'Humanoid'.JumpPower = 100
  345.  
  346. Shield = Instance.new("Part", char)
  347. Shield.Size = Vector3.new(1,1,1)
  348. Shieldmesh = Instance.new("SpecialMesh", Shield)
  349. Shieldmesh.MeshId = "rbxassetid://1587982010"
  350. Shieldmesh.Scale = Vector3.new(1,1,1)
  351. Shieldmesh.TextureId = "rbxassetid://1587981480"
  352. Shield.Transparency = 0
  353. Shield.CanCollide = false
  354. Shield.Name = "plrShield"
  355. Shield.Anchored = false
  356. Shield.BrickColor = BrickColor.new("Really black")
  357. Weld = Instance.new("Weld", char)
  358. Weld.Part0 = char["Right Arm"]
  359. Weld.Part1 = Shield
  360. Weld.C1 = CFrame.new(0,.5,0.5)*CFrame.Angles(0,-4.7,0)
  361. -----------------------tail----------------------
  362. tail = Instance.new("Part", char)
  363. tail.Size = Vector3.new(.5,.5,.5)
  364. tailmesh = Instance.new("SpecialMesh", tail)
  365. tailmesh.MeshId = "rbxassetid://157959108"
  366. tailmesh.Scale = Vector3.new(0.55, 0.55, 0.55)
  367. tailmesh.TextureId = "rbxassetid://157924575"
  368. tail.Transparency = 0
  369. tail.CanCollide = false
  370. tail.Name = "plrtail"
  371. tail.Anchored = false
  372. tail.BrickColor = BrickColor.new("Really black")
  373. Weld = Instance.new("Weld", char)
  374. Weld.Part0 = char["Head"]
  375. Weld.Part1 = tail
  376. Weld.C1 = CFrame.new(0,0.2,0.3)*CFrame.Angles(0,(0),0)
  377. for _, a in pairs(char:children()) do
  378. if a:IsA'Accessory' or a:IsA'CharacterMesh' or a:IsA'Pants' or a:IsA'Shirt' then
  379. a:Destroy()
  380. end
  381. end
  382. local s = Instance.new('Shirt', char)
  383. s.ShirtTemplate = "rbxassetid://1211063223"
  384. local p = Instance.new('Pants', char)
  385. p.PantsTemplate = "rbxassetid://1211063435"
  386.  
  387. Instance.new("ForceField",char).Visible = false
  388. local poo = Instance.new("IntValue",char)
  389. poo.Name = "haha nope"
  390. char.Humanoid.MaxHealth = math.huge
  391. wait()
  392. char.Humanoid.Health = math.huge
  393. Instance.new("ForceField",char).Visible = false
  394.  
  395.  
  396. pcall(function() char.Stick:Destroy() end) --- Destroys Physical Tool
  397. Weapon = Instance.new("Model",char) Weapon.Name = 'Stick'
  398. Instance.new('BoolValue',Weapon).Name='Mug_Did'
  399. do --UTILITIES
  400.  
  401. function Create(ClassName)
  402. local obj=Instance.new(ClassName)
  403. return function(props)
  404. obj.Parent=Weapon
  405. for key,val in pairs(props)do
  406. if key=='_P'then
  407. obj['Parent']=val
  408. elseif i=='_C'then
  409. obj[val[1]]:connect(val[2])
  410. else
  411. obj[key]=val
  412. end
  413. end
  414. return obj
  415. end
  416. end
  417.  
  418. do --CREATION
  419.  
  420. Weld = function(p0,p1,x,y,z,rx,ry,rz,par)
  421. p0.Position = p1.Position
  422. local w = Instance.new('Motor',game:service'JointsService')
  423. w.Part0 = p1
  424. w.Part1 = p0
  425. w.C0 = CFrame.new(x or 0,y or 0,z or 0)*CFrame.Angles(rx or 0,ry or 0,rz or 0)
  426. w.MaxVelocity = .1
  427. return w
  428. end
  429. Cur_Parent=nil
  430. current_mat=nil
  431. anchor=false
  432. Part = function(x,y,z,color,tr,cc,an,parent)
  433. local p = Instance.new('Part',parent or Cur_Parent or Weapon)
  434. p.formFactor = 'Custom'
  435. p.Locked = true
  436. p.Position=torso.Position
  437. p.Size = Vector3.new(x,y,z)
  438. p.BrickColor = BrickColor.new(color or 'Dirt brown')
  439. p.CanCollide = cc or false
  440. p.Anchored = an or anchor or false
  441. p.Transparency = tr or 0
  442. p.Material=current_mat or'SmoothPlastic'
  443. for i,v in pairs{'TopSurface','BottomSurface','FrontSurface','BackSurface','LeftSurface','RightSurface'}do
  444. p[v]=10
  445. end
  446. return p
  447. end
  448. Wedge = function(x,y,z,color,tr,cc,an,parent)
  449. local p = Instance.new('WedgePart',parent or Cur_Parent or Weapon)
  450. p.formFactor = 'Custom'
  451. p.Size = Vector3.new(x,y,z)
  452. p.BrickColor = BrickColor.new(color or 'White')
  453. p.CanCollide = cc or false
  454. p.Anchored = an or false
  455. p.Transparency = tr or 0
  456. p.Material=current_mat or'SmoothPlastic'
  457. for i,v in pairs{'TopSurface','BottomSurface','FrontSurface','BackSurface','LeftSurface','RightSurface'}do
  458. p[v]=10
  459. end
  460. return p
  461. end
  462.  
  463. Meshes = {Diamond='9756362';Spikeball='9982590';Table='111868131';
  464. Egg='1527559';Ring='3270017';Bullet='2697549';Grass='1080954';
  465. Shark='82821384';Sword='12221720';Crown='10688643';Spike='1033714';
  466. Leaf='48100239';Fist='65322375';Chakram='19251107';Crown='20329976';Spring='9753878';
  467. Tree='8564125';Fireball='10587413';DiamondBall='10917418'}
  468.  
  469. Textures = {Leaf='rbxassetid://48047287';White='rbxassetid://5736319'}
  470.  
  471. Mesh = function(par,num,x,y,z,tex)
  472. local msh = _
  473. if num == 1 then msh = Instance.new("CylinderMesh",par)
  474. elseif num == 2 then msh = Instance.new("SpecialMesh",par) msh.MeshType = 3
  475. elseif num == 3 then msh = Instance.new("SpecialMesh",par) msh.MeshType = 6
  476. elseif num == 4 then msh = Instance.new("SpecialMesh",par) msh.MeshType = 'Wedge'
  477. elseif type(num) == 'string' then msh = Instance.new("SpecialMesh",par)
  478. if num=='Torso'then msh.MeshType=1 else
  479. msh.MeshId = string.find(num,'://') == nil and 'rbxassetid://'..Meshes[num] or num end
  480. end
  481. msh.Scale = Vector3.new(x or 1,y or 1,z or 1)
  482. if tex then
  483. msh.TextureId = Textures[tex] or tex or ''
  484. end
  485. return msh
  486. end
  487.  
  488. end
  489.  
  490. function HSVtoRGB(h, s, v)
  491. h = (h % 1) * 6
  492. local f = h % 1
  493. local p = v * (1 - s)
  494. local q = v * (1 - s * f)
  495. local t = v * (1 - s * (1 - f))
  496. if h < 1 then
  497. return v, t, p
  498. elseif h < 2 then
  499. return q, v, p
  500. elseif h < 3 then
  501. return p, v, t
  502. elseif h < 4 then
  503. return p, q, v
  504. elseif h < 5 then
  505. return t, p, v
  506. else
  507. return v, p, q
  508. end
  509. end
  510.  
  511. function Edit(obj,props)
  512. local objects={}
  513. if type(obj)=='table'then objects=obj
  514. return function(props)
  515. obj.Parent=Weapon
  516. for _,obj in pairs(objects)do
  517. for key,val in pairs(props)do
  518. if key=='_P'then
  519. obj['Parent']=val
  520. elseif i=='_F'then
  521. val(objects)()
  522. else
  523. succes,err=pcall(function()return obj[key]end)
  524. if succes then
  525. obj[key]=val
  526. end
  527. end
  528. end
  529. end
  530. end
  531. end
  532.  
  533. end
  534.  
  535. function calcgrav(obj)
  536. local total=0
  537. local function add(a)
  538. for i,v in pairs(a:children())do
  539. if v:IsA'BasePart'then
  540. total=total+v:GetMass()*m.floatforce
  541. elseif v:IsA'Hat'then
  542. total=total+v.Handle:GetMass()*m.floatforce
  543. else add(v)end
  544. end
  545. end
  546. add(obj or char)
  547. return total
  548. end
  549.  
  550. function findHum(pos,rad,hum2)
  551. local hums={}
  552. function check(a)
  553. local res=false
  554. for i,ho in pairs(hums)do
  555. if a==ho then res=true end
  556. end
  557. return res
  558. end
  559. for i,v in pairs(Workspace:children())do
  560. if v:IsA'Model'and v~=char and v~=(hum2 or char) then
  561. for i,q in pairs(v:children())do
  562. if q:IsA'Humanoid' and q.Parent:FindFirstChild'Torso'and(q.Torso.Position-pos).magnitude < rad then
  563. if not check(q)then
  564. table.insert(hums,q)
  565. end
  566. end
  567. end
  568. end
  569. end
  570. return hums,pos
  571. end
  572.  
  573. udim=function(a,b,c,d)
  574. if type(a)=='string'then
  575. x,y=tostring(a):match('(%d*%.*%d*),(%d*%.*%d*)')
  576. return UDim2.new(x or 0,x2 or 0,y or 0,y2 or 0)
  577. else
  578. return UDim2.new(a or 0,c or 0,b or 0,d or 0)
  579. end end
  580.  
  581. function getHum(what,b)local res
  582. for i,v in pairs(what:children())do
  583. if v:IsA'Humanoid' then
  584. res=v
  585. end
  586. end
  587. return res
  588. end
  589.  
  590. end
  591.  
  592. do --ANIMATIONSYSTEM DECLARATIONS
  593. cont_anim=true
  594.  
  595. rarm,larm=char['Right Arm'],char['Left Arm']
  596. rleg,lleg=char['Right Leg'],char['Left Leg']
  597.  
  598. torw=char.HumanoidRootPart.RootJoint
  599. neck=torso.Neck
  600. rs,ls=torso['Right Shoulder'],torso['Left Shoulder']
  601. rh,lh=torso['Right Hip'],torso['Left Hip']
  602.  
  603. ort=cfn(0,0,0,-1,0,0,0,0,1,0,1,-0)
  604. norig=cfn(0,1,0,-1,-0,-0,0,0,1,0,1,0)
  605.  
  606. rw,lw=nil,nil
  607. arms=nil
  608.  
  609. r_shl_c0=cfn(1,0.5,0)--,0,0,1,0,1,0,-1,-0,-0)
  610. r_shl_c1=cfn(-0.5,0.5,0)--,0,0,1,0,1,0,-1,-0,-0)
  611.  
  612. l_shl_c0=cfn(-1,0.5,0)--,0,0,1,0,1,0,-1,-0,-0)
  613. l_shl_c1=cfn(0.5,0.5,0)--,0,0,1,0,1,0,-1,-0,-0)
  614.  
  615. -- l_shl_c0=cfn(-1,0.5,0)--,-0,-0,-1,0,1,0,1,0,0)
  616. -- l_shl_c1=cfn(0.5,0.5,0)--,-0,-0,-1,0,1,0,1,0,0)
  617.  
  618. r_hip_c0=cfn(1,-1,0)--,0,0,1,0,1,0,-1,-0,-0)
  619. r_hip_c1=cfn(0.5,1,0)--,0,0,1,0,1,0,-1,-0,-0)
  620.  
  621. l_hip_c0=cfn(-1,-1,0)--,-0,-0,-1,0,1,0,1,0,0)
  622. l_hip_c1=cfn(-0.5,1,0)--,-0,-0,-1,0,1,0,1,0,0)
  623.  
  624.  
  625. orig_rhip_c0=cfn(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  626. orig_lhip_c0=cfn(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  627.  
  628. rw_cf=r_shl_c0
  629. lw_cf=l_shl_c0
  630.  
  631. rw2_cf=r_hip_c0
  632. lw2_cf=l_hip_c0
  633. end
  634.  
  635. do ---ANIMATIONSYSTEM
  636. function Lock(which)
  637. arms={char:FindFirstChild'Right Arm',char:FindFirstChild'Left Arm'}
  638. legs={char:FindFirstChild'Right Leg',char:FindFirstChild'Left Leg'}
  639. local sh={torso:FindFirstChild'Right Shoulder',torso:FindFirstChild'Left Shoulder'}
  640. local sh2={torso:FindFirstChild'Right Hip',torso:FindFirstChild'Left Hip'}
  641. -- print(unpack(sh),unpack(arms))
  642. if arms and torso and sh and legs and sh2 then
  643. if which=='R'then
  644. if not rw then
  645. sh[1].Part1=nil
  646. rw=Instance.new('Weld')
  647. rw.Part0=torso
  648. rw.Parent=torso
  649. rw.Part1=arms[1]
  650. rw.C0=rw_cf
  651. rw.C1=r_shl_c1
  652. else
  653. rw:Destroy() rw=nil
  654. sh[1].Part0=torso sh[1].Part1=arms[1]
  655. end
  656. elseif which=='L'then
  657. if not lw then
  658. sh[2].Part1=nil
  659. lw=Instance.new('Weld')
  660. lw.Part0=torso
  661. lw.Parent=torso
  662. lw.Part1=arms[2]
  663. lw.C0=lw_cf
  664. lw.C1=l_shl_c1
  665. else
  666. lw:Destroy()lw=nil
  667. sh[2].Part0=torso sh[2].Part1=arms[2]
  668. end
  669. end
  670. if which=='RR'then
  671. if not rw2 then
  672. sh2[1].Part1=nil
  673. rw2=Instance.new('Weld')
  674. rw2.Part0=torso
  675. rw2.Parent=torso
  676. rw2.Part1=legs[1]
  677. rw2.C0=rw2_cf
  678. rw2.C1=r_hip_c1
  679. else
  680. rw2.Parent=nil rw2=nil
  681. sh2[1].Part0=torso sh2[1].Part1=legs[1]
  682. end
  683. elseif which=='LL'then
  684. if not lw2 then
  685. sh2[2].Part1=nil
  686. lw2=Instance.new('Weld')
  687. lw2.Part0=torso
  688. lw2.Parent=torso
  689. lw2.Part1=legs[2]
  690. lw2.C0=lw2_cf
  691. lw2.C1=l_hip_c1
  692. else
  693. lw2.Parent=nil lw2=nil
  694. sh2[2].Part0=torso sh2[2].Part1=legs[2]
  695. end
  696. end
  697. end
  698. end
  699.  
  700. function Anim(what)
  701. local weld=getfenv()[what]
  702. return function(where)
  703. if weld then
  704. target_pos[what]=def_pos[what]*where
  705. -- waitfor(weld,where)
  706. end
  707. end
  708. end
  709.  
  710. char_hum=getHum(char)
  711.  
  712. spd={
  713. rw=.1;lw=.1;rw2=.1;lw2=.1;torw=.1;neck=.1;hw=.1;
  714. }
  715. setmetatable(spd,{
  716. __newindex=function(tab,i,v)
  717. if i=='all'then
  718. for o,q in pairs(spd)do
  719. spd[o]=v
  720. end
  721. end end
  722. })
  723. def_pos={
  724. rw=rw_cf;
  725. lw=lw_cf;
  726. rw2=rw2_cf;
  727. lw2=lw2_cf;
  728. torw=ort;
  729. neck=norig;
  730. hw=cfn();
  731. -- shield_w=cfn(-.25,0,0)*ang(math.pi,math.pi/2);
  732. }
  733. target_pos={
  734. rw=rw_cf;
  735. lw=lw_cf;
  736. rw2=def_pos.rw2;
  737. lw2=def_pos.lw2;
  738. torw=def_pos.torw;
  739. neck=def_pos.neck;
  740. hw=cfn();
  741. }
  742. can_anim={
  743. rw=true;lw=true;rw2=true;lw2=true;torw=true;neck=true;
  744. }
  745. game:service'RunService':BindToRenderStep('Mug_Anims',5,function()
  746. if cont_anim then
  747. if rw and can_anim.rw then
  748. rw.C0=rw.C0:lerp(target_pos.rw,spd.rw)
  749. end
  750. if lw and can_anim.lw then
  751. lw.C0=lw.C0:lerp(target_pos.lw,spd.lw)
  752. end
  753. if rw2 and can_anim.rw2 then
  754. rw2.C0=rw2.C0:lerp(target_pos.rw2,spd.rw2)
  755. end
  756. if lw2 and can_anim.lw2 then
  757. lw2.C0=lw2.C0:lerp(target_pos.lw2,spd.lw2)
  758. end
  759. if torw and can_anim.torw then
  760. torw.C0=torw.C0:lerp(target_pos.torw,spd.torw)
  761. end
  762. if neck and can_anim.neck then
  763. neck.C0=neck.C0:lerp(target_pos.neck,spd.neck)
  764. end
  765. if hw then
  766. hw.C1=hw.C1:lerp(target_pos.hw,spd.hw)
  767. end
  768. end
  769. end)
  770. end
  771.  
  772. function tag(a,b)
  773. if type(b)=='string'then
  774. if not getfenv()[b]then
  775. getfenv()[b]={}
  776. end
  777. table.insert(getfenv()[b],a)
  778. else
  779. table.insert(b,a)
  780. end
  781. end
  782. hinge=Part(.25,.5,.25)Mesh(hinge,1)
  783. hw=Weld(hinge,torso,.9,-.85,0,0,-math.pi/2,math.pi/2)
  784. restpos=hw.C0
  785.  
  786. d=Part(.1,.1,.1,'Black')Weld(d,hinge,0,.25)Mesh(d,1,1,.1)
  787. d=Part(.1,.1,.1,'Black')Weld(d,hinge,0,-.25)Mesh(d,1,1,.1)
  788.  
  789. p=Part(.75,.5,.1)Mesh(p,3,1,1,.75)
  790. Create'Motor'{_P=p;Part0=p;Part1=hinge;
  791. C0=cfn(.75/2,0,0)*ang(math.pi/2);
  792. C1=cfn(0,0,0)*ang(math.pi/2);
  793. MaxVelocity=.1
  794. }
  795.  
  796. p=Part(.75,.5,.1)Mesh(p,3,1,1,.5)
  797. mo=Create'Motor'{_P=p;Part0=p;Part1=hinge;
  798. C0=cfn(-.75/2,0,0)*ang(-math.pi/2,0);
  799. C1=cfn(0,0,-.15/2)*ang(-math.pi/2,0,md'45'+md'135');
  800. MaxVelocity=.15
  801. }
  802.  
  803. local tas={}
  804.  
  805. Spawn(function()
  806. while wait()do
  807. for e,o in ipairs(tas)do
  808. if o[2].Parent~=nil then
  809. o[1]=o[1]*ang(0,md'5')
  810. for i,v in ipairs(o[2]:children())do
  811. if v:IsA'Part'then
  812. v.CFrame=l(o[1],math.cos(i*m.tau/6)*o[2].MVal.Value,0,math.sin(i*m.tau/6)*o[2].MVal.Value)
  813. end
  814. end
  815. else
  816. table.remove(tas,e)
  817. end
  818. end
  819. end
  820. end)
  821. whirr_snd=Create'Sound'{_P=Weapn;SoundId='rbxassetid://278329638';Pitch=1.5;Volume=1}
  822. droning_snd=Create'Sound'{_P=Weapon;SoundId='rbxassetid://275641634';Pitch=1.75;Volume=.1;Looped=true}
  823. function lol()
  824. Lock'R'
  825.  
  826. whirr_snd:Play()
  827. Anim'rw'(ang(md'75')*ang(0,md'90'))
  828. hw.Part0=rarm hw.C0=cfn(0,-1.1,0)*ang(-math.pi/2,md'25')
  829. mo.DesiredAngle=md'-135'
  830. wait'.25'
  831. cone=Part(1,1,1,'Cyan',.5)msh=Mesh(cone,'Spike',0,0,0)
  832. w=Weld(cone,p,0,0,0,math.pi/2)
  833. for i=0,1,.1 do
  834. w.C0=cfn(0,0,-1.75*i)*ang(math.pi/2)
  835. msh.Scale=v3n(i*.75,i*4.5,i*.75)
  836. wait()
  837. end
  838. wait()
  839. local obj,pos=Workspace:FindPartOnRay(Ray.new(l(cone).p,v3n(0,-10,0)),char)
  840. if obj and pos then
  841. local r=.75
  842. local ps={}
  843. local center=cfn(pos)
  844. local model=Create'Model'{_P=Weapon}
  845. for i=0,m.tau,m.tau/6 do
  846. local p=Part(.1,.1,.1) p.Anchored=true Mesh(p,2).Name='m'
  847. p.Color=Color3.new(HSVtoRGB(0,0,1))
  848. p.Parent=model
  849. p.CFrame=l(center,math.cos(i)*r,0,math.sin(i)*r)
  850.  
  851. end
  852. local rv=Create'NumberValue'{_P=model;Name='MVal'}rv.Value=r
  853. local t={center,model}
  854. local snd=Create'Sound'{_P=model;SoundId='http://www.roblox.com/Asset/?id=15666462';
  855. Pitch=.5;Looped=true}
  856. local snd2=Create'Sound'{_P=model;SoundId='http://www.roblox.com/Asset/?id=2101157';Pitch=1.15}
  857. local snd3=Create'Sound'{_P=model;SoundId='http://www.roblox.com/Asset/?id=2974249';Pitch=2}
  858.  
  859. Edit{snd,snd2,snd3}{Volume=.25}
  860.  
  861. Spawn(function()
  862. snd:Play()
  863. local ptick=tick()
  864. repeat
  865. snd.Pitch=snd.Pitch+(.05*3)
  866. wait()
  867. until (tick()-ptick)>1
  868. snd:Stop()snd3:Play()
  869. for i=0,1,.1 do
  870. for _,v in pairs(model:children())do
  871. if v:IsA'Part'then
  872. -- v.Transparency=i
  873. v.Color=Color3.new(HSVtoRGB(.5,0,1-i))
  874. end
  875. end
  876. wait()
  877. end
  878. snd2:Play()
  879. for i=0,1,.05 do
  880. rv.Value=rv.Value+.5
  881. local pillar=Part(rv.Value,1,rv.Value,'Black',.75)local msh=Mesh(pillar,1)pillar.Anchored=true
  882. local cf=center*ang(mr(-5,5),mr(-5,5),mr(-5,5))
  883. pillar.CFrame=cf
  884. Spawn(function()
  885. for i=0,1,.1 do
  886. pillar.Size=v3n(rv.Value,10*i,rv.Value)
  887. pillar.CFrame=cf*cfn(0,pillar.Size.y/2,0)
  888. pillar.Transparency=.75+i*(1-.75)
  889. wait()
  890. end
  891. end)
  892. for _,v in pairs(model:children())do
  893. if v:IsA'Part'then
  894. v.Transparency=i
  895. v.m.Scale=v3n(1+i*30,1+i*30,1+i*30)
  896. -- v.Color=Color3.new(HSVtoRGB(0,.5,1-i*.5))
  897. end
  898. end
  899. for i,v in pairs(findHum(center.p,rv.Value))do
  900. v:TakeDamage'10'
  901. end
  902. wait()
  903. end
  904. model:Destroy()
  905. end)
  906. table.insert(tas,t)
  907. end
  908. wait(.15)
  909. for i=1,0,-.1 do
  910. w.C0=cfn(0,0,-1.75*i)*ang(math.pi/2)
  911. msh.Scale=v3n(i*.75,i*4.5,i*.75)
  912. wait()
  913. end cone:destroy()
  914. whirr_snd:Play()
  915. Anim'rw'(cfn())
  916. mo.DesiredAngle=0
  917. wait'.25'
  918. hw.Part0=torso hw.C0=cfn(.9,-.85,0)*ang(0,-math.pi/2,math.pi/2)
  919. Lock'R'
  920. end
  921.  
  922. local pd_snd=Create'Sound'{_P=Weapon;SoundId='http://www.roblox.com/Asset/?id=2785493';Pitch=1.35}
  923. function lol2()
  924. Lock'R'
  925. Anim'rw'(ang(md'135',0,md'15')*ang(0,md'15'))
  926. hw.Part0=rarm hw.C0=cfn(0,-1.1,0)*ang(math.pi,md'-10')
  927. wait'.15'
  928. mo.DesiredAngle=md'-90'
  929. wait'.5'
  930. local laz=Part(.5,1,.5,'Cyan',.5)laz.Material='Neon'local msh=Mesh(laz,2)
  931. pd_snd:Play()
  932.  
  933. laz.Anchored=true
  934. spos=l(hinge,0,0)
  935. laz.CFrame=spos
  936.  
  937. local ignorelist={}
  938. for i=0,1,.25 do spos=l(hinge,0,0)
  939. table.insert(ignorelist,char)
  940. local hit,pos=Workspace:FindPartOnRayWithIgnoreList(Ray.new(l(laz,0,0,-laz.Size.z/2).p,l(laz).lookVector*4),ignorelist)
  941. if hit and pos then
  942. for lo=1,1 do
  943. if hit:IsDescendantOf(char)then break end
  944. local sx,sy,sz=hit.Size.X,hit.Size.y,hit.Size.z
  945. local as=(sx+sy+sz)/3
  946. if as>20 then break end
  947. table.insert(ignorelist,hit)
  948. Create'ParticleEmitter'{_P=hit;
  949. Size=NumberSequence.new{numkp(0,as*.1);numkp(1,as*.5)};
  950. Transparency=NumberSequence.new{numkp(0,0);numkp(1,1)};
  951. Color=ColorSequence.new(bcol'Cyan'.Color,bcol'Deep blue'.Color);
  952. Lifetime=NumberRange.new(.1,.4);
  953. VelocitySpread=360;
  954. Speed=NumberRange.new(as*.5);
  955. }
  956. Spawn(function()
  957. for i=hit.Transparency,1,.05 do
  958. hit.Transparency=i wait()
  959. end hit:Destroy()end)
  960. end
  961. end
  962.  
  963. tpos=l(torso,0,0,-7)
  964. local mag=(spos.p-tpos.p).magnitude
  965. laz.Size=v3n(.5,.5,mag*i)
  966. laz.CFrame=cfn(spos.p,tpos.p)*cfn(0,0,(-mag/2)*i)
  967. wait()
  968. end
  969. local cf=laz.CFrame
  970. for i=0,1,.1 do
  971. msh.Scale=v3n(1-i,1-i,1)
  972. laz.Transparency=.5+i*.5
  973. wait()
  974. end laz:Destroy()
  975. mo.DesiredAngle=0
  976. wait'.25'
  977. Anim'rw'(cfn())
  978. wait'.25'
  979. hw.Part0=torso hw.C0=restpos
  980. Lock'R'
  981. end
  982.  
  983. shoot_snd=Create'Sound'{_P=Weapon;SoundId='rbxassetid://384105511';Pitch=1.15}
  984. function kiball()
  985. holding=true
  986. local ptick=tick()
  987. local bg=Create'BodyGyro'{_P=torso;maxTorque=v3n(1,1,1)*9e+008;P=9e+006}
  988. Lock'L'Anim'lw'(ang(0,0,md'-90'))wait'.25'
  989. while holding do
  990. bg.cframe=cfn(l(torso).p,v3n(mouse.hit.x,l(torso).y,mouse.hit.z))*ang(0,-math.pi/2,0)
  991.  
  992. if (tick()-ptick)>.25 then shoot_snd:Play()
  993. local ki=Part(1,1,1)ki.Anchored=true ki.CFrame=l(bl) local msh=Mesh(ki,3)
  994. tar=mouse.hit
  995. local dir=mr(-1,1)
  996. Spawn(function()
  997. for i=0,1,.1 do
  998. ki.CFrame=ki.CFrame*cfn(-math.abs(math.sin((tick()+1)))*3,0,0)
  999. ki.CFrame=ki.CFrame:lerp(tar,i)
  1000. wait()
  1001. end
  1002. for i=0,1,.1 do
  1003. Edit{msh,ki}{Transparency=i;Size=v3n(1+i*3,1+i*3,1+i*3)}
  1004. wait()
  1005. end ki:destroy()
  1006. end)
  1007. ptick=tick()
  1008. end
  1009. wait()
  1010. end bg:Destroy() Anim'lw'(cfn())wait'.5'Lock'L'
  1011. end
  1012.  
  1013. function getAverageSize(val)
  1014. local value_is_object=pcall(function()return val.className end)
  1015. local x,y,z
  1016. if value_is_object then
  1017. x,y,z=val.Size.x,val.Size.y,val.Size.z
  1018. else
  1019. x,y,z=val.x,val.y,val.z
  1020. end
  1021. return (x+y+z)/3
  1022. end
  1023.  
  1024. bl=Part(.1,.1,.1,'New Yeller')Mesh(bl,2)Weld(bl,larm,-.25,-.6)
  1025. function lol3()
  1026. Lock'L'
  1027. Anim'lw'(cfn(.2,0,-.15)*ang(md'25',0,md'65')*ang(0,md'-75'))
  1028. wait'.25'bl.Material='Glass'
  1029. local shield=Part(10,6,.1,'',.75)shield.Material='Glass'shield.Anchored=true
  1030. shield.CanCollide=true
  1031. -- shield.Parent=Workspace.CurrentCamera
  1032. shield.Touched:connect(function(a)
  1033. if a.Parent and (not a:IsDescendantOf(char)) then
  1034. -- a:BreakJoints()
  1035. for i,v in pairs(a:children())do
  1036. if v:IsA'BodyMover'then v:Destroy()end
  1037. end
  1038.  
  1039. end
  1040. end)
  1041.  
  1042. local msh=Mesh(shield,3,0,0,0)
  1043. shield.CFrame=l(torso)
  1044. droning_snd:Play()
  1045. for i=0,1,.1 do
  1046. shield.CFrame=shield.CFrame:lerp(l(torso,0,0,-3),.8)
  1047. shield.Velocity=shield.CFrame.lookVector*400
  1048. msh.Scale=v3n(i,i,i)
  1049. wait()
  1050. end
  1051. holding=true
  1052. local ptick=tick()
  1053. local dir=1
  1054. local bol=false
  1055.  
  1056. while holding do
  1057. if (tick()-ptick)>.5 then dir=dir*-1 ptick=tick()end
  1058. shield.Transparency=1
  1059. shield.CFrame=shield.CFrame:lerp(l(torso,0,0,-3),.8)
  1060. shield.Velocity=shield.CFrame.lookVector*400
  1061. local pp=Part(.1,.1,.1,'',.75)pp.Material='Glass'Mesh(pp,3,.5,.5,.5)
  1062. pp.CFrame=l(bl)
  1063. Create'BodyPosition'{_P=pp;position=l(shield,mr(-2.5,2.5),mr(-2.5,2.5),0).p}
  1064. Debris:AddItem(pp,1)
  1065.  
  1066. wait()
  1067. end
  1068. droning_snd:Stop()
  1069. for i=1,0,-.1 do
  1070. shield.CFrame=shield.CFrame:lerp(l(torso,0,0,-3),.8)
  1071. msh.Scale=v3n(i,i,i)
  1072. wait()
  1073. end
  1074. shield:Destroy()
  1075. bl.Material='Plastic'
  1076. Anim'lw'(cfn())
  1077. wait'.25'Lock'L'
  1078. end
  1079.  
  1080. klist={
  1081. f=lol2;
  1082. e=lol;
  1083. cq=lol3;
  1084. rq=kiball;
  1085. }
  1086.  
  1087. local con,con2
  1088. con=mouse.KeyUp:connect(function(key)
  1089. for i,v in pairs(klist)do
  1090. if key==i:sub(1,1) and i:sub(2,2)=='q'then
  1091. holding=false
  1092. end
  1093. end
  1094. end)
  1095. con2=mouse.KeyDown:connect(function(key)
  1096. if attacking then return end
  1097. attacking=true
  1098. for i,v in pairs(klist)do
  1099. if key==i:sub(1,1) then
  1100. v()
  1101. end
  1102. end
  1103. attacking=false
  1104. end)
  1105. tag(con,'cons')tag(con2,'cons')
  1106.  
  1107. char.ChildAdded:connect(function(a)
  1108. if a:IsA'Script'then for i,v in pairs(cons)do v:disconnect()end end end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement