Advertisement
Ban43_GodOfEdits

test cap

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