Advertisement
Ban43_GodOfEdits

the captain

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