Advertisement
coolgoldboy166

school shooter v2

Dec 5th, 2017
1,932
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 33.31 KB | None | 0 0
  1. --[[This was just a animation remake of School ShooterV2 Made by rufus12,
  2. Do whatever with it
  3.  
  4. --makhail07,The skid who makes animations.
  5. --Discord: Superthumb#2958
  6. --]]
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17. function clerp(c1,c2,al)
  18. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  19. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  20. for i,v in pairs(com1) do
  21. com1[i] = v+(com2[i]-v)*al
  22. end
  23. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  24. end
  25. Personality = "Columbine"
  26. vt = Vector3.new
  27. Effects = { }
  28. bc = BrickColor.new
  29. plr = game:service'Players'.LocalPlayer
  30. char = plr.Character
  31. Player = game.Players.LocalPlayer
  32. Character = Player.Character
  33. mouse = plr:GetMouse()
  34. humanoid = char:findFirstChild("Humanoid")
  35. torso = char:findFirstChild("Torso")
  36. head = char.Head
  37. Head = char.Head
  38. ra = char:findFirstChild("Right Arm")
  39. la = char:findFirstChild("Left Arm")
  40. rl = char:findFirstChild("Right Leg")
  41. ll = char:findFirstChild("Left Leg")
  42. rs = torso:findFirstChild("Right Shoulder")
  43. ls = torso:findFirstChild("Left Shoulder")
  44. rh = torso:findFirstChild("Right Hip")
  45. lh = torso:findFirstChild("Left Hip")
  46. neck = torso:findFirstChild("Neck")
  47. rss = game:GetService("RunService").RenderStepped
  48. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  49. RootPart = Character.HumanoidRootPart
  50. RootJoint = RootPart.RootJoint
  51. anim = char:findFirstChild("Animate")
  52. root = char.HumanoidRootPart
  53. rootpart = char:findFirstChild("HumanoidRootPart")
  54. RootPart = char:findFirstChild("HumanoidRootPart")
  55. attack = false
  56. drinks = 0
  57. local RbxUtility = LoadLibrary("RbxUtility")
  58. local Create = RbxUtility.Create
  59.  
  60.  
  61. New = function(Object, Parent, Name, Data)
  62. local Object = Instance.new(Object)
  63. for Index, Value in pairs(Data or {}) do
  64. Object[Index] = Value
  65. end
  66. Object.Parent = Parent
  67. Object.Name = Name
  68. return Object
  69. end
  70.  
  71. function newPart(Parent, brickcolor, transparency, anchored, cancollide, size, name)
  72. local fp = Instance.new("Part")
  73. fp.Parent = Parent
  74. fp.Transparency = transparency
  75. fp.Anchored = anchored
  76. fp.CanCollide = cancollide
  77. fp.Locked = true
  78. fp.BrickColor = brickcolor
  79. fp.Name = name
  80. fp.Size = size
  81. fp.Position = torso.Position
  82. NoOutline(fp)
  83. fp.Material = "SmoothPlastic"
  84. fp:BreakJoints()
  85. return fp
  86. end
  87. function mesh(Mesh, part, meshtype, meshid, offset, scale)
  88. local mesh = Instance.new(Mesh)
  89. mesh.Parent = part
  90. if Mesh == "SpecialMesh" then
  91. mesh.MeshType = meshtype
  92. if meshid then
  93. mesh.MeshId = "http://www.roblox.com/asset/?id=" .. meshid
  94. end
  95. end
  96. if offset then
  97. mesh.Offset = offset
  98. end
  99. mesh.Scale = scale
  100. return mesh
  101. end
  102. function weld(parent, part0, part1, c0)
  103. local weld = Instance.new("Weld")
  104. weld.Parent = parent
  105. weld.Part0 = part0
  106. weld.Part1 = part1
  107. weld.C0 = c0
  108. return weld
  109. end
  110. function weld5(part0, part1, c0, c1)
  111. weeld=Instance.new("Weld", part0)
  112. weeld.Part0=part0
  113. weeld.Part1=part1
  114. weeld.C0=c0
  115. weeld.C1=c1
  116. return weeld
  117. end
  118. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  119. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  120. end
  121.  
  122. function swait(num)
  123. if num==0 or num==nil then
  124. game:service'RunService'.Stepped:wait(0)
  125. else
  126. for i=0,num do
  127. game:service'RunService'.Stepped:wait(0)
  128. end
  129. end
  130. end
  131. function thread(f)
  132. coroutine.resume(coroutine.create(f))
  133. end
  134.  
  135. --Very important stuff--
  136. Player=game:GetService("Players").LocalPlayer
  137. Character=Player.Character
  138. PlayerGui=Player.PlayerGui
  139. Backpack=Player.Backpack
  140. Torso=Character.Torso
  141. Head=Character.Head
  142. Humanoid=Character.Humanoid
  143. m=Instance.new('Model',Character)
  144. LeftArm=Character["Left Arm"]
  145. LeftLeg=Character["Left Leg"]
  146. RightArm=Character["Right Arm"]
  147. RightLeg=Character["Right Leg"]
  148. LS=Torso["Left Shoulder"]
  149. LH=Torso["Left Hip"]
  150. RS=Torso["Right Shoulder"]
  151. RH=Torso["Right Hip"]
  152. Face = Head.face
  153. Neck=Torso.Neck
  154. it=Instance.new
  155. attacktype=1
  156. vt=Vector3.new
  157. cf=CFrame.new
  158. euler=CFrame.fromEulerAnglesXYZ
  159. angles=CFrame.Angles
  160. cloaked=false
  161. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  162. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  163. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  164. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  165. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  166. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  167. RootPart=Character.HumanoidRootPart
  168. RootJoint=RootPart.RootJoint
  169. RootCF=euler(-1.57,0,3.14)
  170. attack = false
  171. attackdebounce = false
  172. deb=false
  173. equipped=true
  174. hand=false
  175. MMouse=nil
  176. combo=0
  177. mana=0
  178. trispeed=.2
  179. attackmode='none'
  180. local idle=0
  181. local Anim="Idle"
  182. local Effects={}
  183. local gun=false
  184. local shoot=false
  185. local sine = 0
  186. local change = 1
  187. player=nil
  188.  
  189. mouse=Player:GetMouse()
  190. --save shoulders
  191. RSH, LSH=nil, nil
  192. --welds
  193. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  194. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  195. LH=Torso["Left Hip"]
  196. RH=Torso["Right Hip"]
  197. TorsoColor=Torso.BrickColor
  198. function NoOutline(Part)
  199. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  200. end
  201. player=Player
  202. ch=Character
  203. RSH=ch.Torso["Right Shoulder"]
  204. LSH=ch.Torso["Left Shoulder"]
  205. --
  206. RSH.Parent=nil
  207. LSH.Parent=nil
  208. --
  209. RW.Name="Right Shoulder"
  210. RW.Part0=ch.Torso
  211. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  212. RW.C1=cf(0, 0.5, 0)
  213. RW.Part1=ch["Right Arm"]
  214. RW.Parent=ch.Torso
  215. --
  216. LW.Name="Left Shoulder"
  217. LW.Part0=ch.Torso
  218. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  219. LW.C1=cf(0, 0.5, 0)
  220. LW.Part1=ch["Left Arm"]
  221. LW.Parent=ch.Torso
  222.  
  223.  
  224. newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
  225. local wld = Instance.new("Weld", wp1)
  226. wld.Part0 = wp0
  227. wld.Part1 = wp1
  228. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  229. end
  230.  
  231.  
  232. newWeld(RootPart, Torso, 0, -1, 0)
  233. Torso.Weld.C1 = CFrame.new(0, -1, 0)
  234. newWeld(Torso, LeftLeg, -0.5, -1, 0)
  235. LeftLeg.Weld.C1 = CFrame.new(0, 1, 0)
  236. newWeld(Torso, RightLeg, 0.5, -1, 0)
  237. RightLeg.Weld.C1 = CFrame.new(0, 1, 0)
  238.  
  239. Player=game:GetService('Players').LocalPlayer
  240. Character=Player.Character
  241. mouse=Player:GetMouse()
  242. m=Instance.new('Model',Character)
  243.  
  244.  
  245. local function weldBetween(a, b)
  246. local weldd = Instance.new("ManualWeld")
  247. weldd.Part0 = a
  248. weldd.Part1 = b
  249. weldd.C0 = CFrame.new()
  250. weldd.C1 = b.CFrame:inverse() * a.CFrame
  251. weldd.Parent = a
  252. return weldd
  253. end
  254.  
  255. ArtificialHB = Instance.new("BindableEvent", script)
  256. ArtificialHB.Name = "Heartbeat"
  257.  
  258. script:WaitForChild("Heartbeat")
  259.  
  260. frame = 1 / 60
  261. tf = 0
  262. allowframeloss = false
  263. tossremainder = false
  264. lastframe = tick()
  265. script.Heartbeat:Fire()
  266.  
  267. game:GetService("RunService").Heartbeat:connect(function(s, p)
  268. tf = tf + s
  269. if tf >= frame then
  270. if allowframeloss then
  271. script.Heartbeat:Fire()
  272. lastframe = tick()
  273. else
  274. for i = 1, math.floor(tf / frame) do
  275. script.Heartbeat:Fire()
  276. end
  277. lastframe = tick()
  278. end
  279. if tossremainder then
  280. tf = 0
  281. else
  282. tf = tf - frame * math.floor(tf / frame)
  283. end
  284. end
  285. end)
  286.  
  287.  
  288.  
  289.  
  290. cors = {}
  291. mas = Instance.new("Model",game:GetService("Lighting"))
  292. Model0 = Instance.new("Model")
  293. Part1 = Instance.new("Part")
  294. Part2 = Instance.new("Part")
  295. Part3 = Instance.new("Part")
  296. Weld4 = Instance.new("Weld")
  297. Weld5 = Instance.new("Weld")
  298. Weld6 = Instance.new("Weld")
  299. Part7 = Instance.new("Part")
  300. Model0.Name = "Sawed Off"
  301. Model0.Parent = mas
  302. Part1.Parent = Model0
  303. Part1.BrickColor = BrickColor.new("Really black")
  304. Part1.Shape = Enum.PartType.Cylinder
  305. Part1.Size = Vector3.new(2.96000075, 0.449999958, 0.400000334)
  306. Part1.CFrame = CFrame.new(40.7499924, 151.548019, 156.470001, 1.0000006, -1.78813934e-07, 0, -1.78813934e-07, 1.00000024, 0, 0, 0, 1)
  307. Part1.Color = Color3.new(0.101961, 0.101961, 0.101961)
  308. Part1.Position = Vector3.new(40.7499924, 151.548019, 156.470001)
  309. Part1.Color = Color3.new(0.101961, 0.101961, 0.101961)
  310. Part1.Material = "Granite"
  311. Part2.Parent = Model0
  312. Part2.BrickColor = BrickColor.new("Really black")
  313. Part2.Shape = Enum.PartType.Cylinder
  314. Part2.Size = Vector3.new(2.96000075, 0.449999958, 0.400000334)
  315. Part2.CFrame = CFrame.new(40.7499962, 151.548035, 156.079056, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  316. Part2.Color = Color3.new(0.101961, 0.101961, 0.101961)
  317. Part2.Position = Vector3.new(40.7499962, 151.548035, 156.079056)
  318. Part2.Color = Color3.new(0.101961, 0.101961, 0.101961)
  319. Part2.Material = "Granite"
  320. Part3.Parent = Model0
  321. Part3.BrickColor = BrickColor.new("Cocoa")
  322. Part3.Rotation = Vector3.new(0, 0, -34)
  323. Part3.Size = Vector3.new(1.11000025, 0.519999921, 0.570000172)
  324. Part3.CFrame = CFrame.new(42.5974922, 150.98793, 156.274887, 0.829038441, 0.559192181, 0, -0.55919224, 0.829038203, 0, 0, 0, 1)
  325. Part3.Color = Color3.new(0.317647, 0.145098, 0)
  326. Part3.Position = Vector3.new(42.5974922, 150.98793, 156.274887)
  327. Part3.Orientation = Vector3.new(0, 0, -34)
  328. Part3.Color = Color3.new(0.317647, 0.145098, 0)
  329. Part3.Material = "Slate"
  330. Weld4.Name = "1"
  331. Weld4.Parent = Part3
  332. Weld4.C0 = CFrame.new(-1.84484863, -0.568756104, -0.195831299, 0.829038441, -0.55919224, 0, 0.559192181, 0.829038203, 0, 0, 0, 1)
  333. Weld4.Part0 = Part3
  334. Weld4.Part1 = Part2
  335. Weld5.Name = "3"
  336. Weld5.Parent = Part3
  337. Weld5.C0 = CFrame.new(-0.60994339, 0.0636444092, 0.00506591797, 0.866026163, 0.499997735, 0, -0.499997616, 0.866026044, 0, 0, 0, 1)
  338. Weld5.Part0 = Part3
  339. Weld5.Part1 = Part7
  340. Weld6.Name = "2"
  341. Weld6.Parent = Part3
  342. Weld6.C0 = CFrame.new(-1.84484482, -0.568771362, 0.195114136, 0.829038441, -0.55919224, 0, 0.559192181, 0.829038203, 0, 0, 0, 1)
  343. Weld6.Part0 = Part3
  344. Weld6.Part1 = Part1
  345. Part7.Parent = Model0
  346. Part7.BrickColor = BrickColor.new("Cocoa")
  347. Part7.Rotation = Vector3.new(0, 0, -64)
  348. Part7.Size = Vector3.new(0.440000623, 0.519999921, 0.759999931)
  349. Part7.CFrame = CFrame.new(42.1274147, 151.381775, 156.279953, 0.438374251, 0.898792326, 0, -0.898792267, 0.438373834, 0, 0, 0, 1)
  350. Part7.Color = Color3.new(0.317647, 0.145098, 0)
  351. Part7.Position = Vector3.new(42.1274147, 151.381775, 156.279953)
  352. Part7.Orientation = Vector3.new(0, 0, -64)
  353. Part7.Color = Color3.new(0.317647, 0.145098, 0)
  354. Part7.Material = "Slate"
  355. for i,v in pairs(mas:GetChildren()) do
  356. v.Parent = game:GetService("Players").LocalPlayer.Character
  357. pcall(function() v:MakeJoints() end)
  358. end
  359. mas:Destroy()
  360. for i,v in pairs(cors) do
  361. spawn(function()
  362. pcall(v)
  363. end)
  364. end
  365. for i,v in pairs(Model0:GetChildren()) do
  366. if v.ClassName == "Part" then
  367. v.CanCollide = false
  368. end
  369. end
  370.  
  371. --Converted with ttyyuu12345's model to script plugin v4
  372. function sandbox(var,func)
  373. local env = getfenv(func)
  374. local newenv = setmetatable({},{
  375. __index = function(self,k)
  376. if k=="script" then
  377. return var
  378. else
  379. return env[k]
  380. end
  381. end,
  382. })
  383. setfenv(func,newenv)
  384. return func
  385. end
  386. cors = {}
  387. mas = Instance.new("Model",game:GetService("Lighting"))
  388. for i,v in pairs(mas:GetChildren()) do
  389. v.Parent = game:GetService("Players").LocalPlayer.Character.Torso
  390. pcall(function() v:MakeJoints() end)
  391. end
  392. mas:Destroy()
  393. for i,v in pairs(cors) do
  394. spawn(function()
  395. pcall(v)
  396. end)
  397. end
  398. weldf = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  399. weldf.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  400. weldf.Part1 = Part3
  401. weldf.C0 = CFrame.new(-0.0861244202, -1.04447937, -0.182327271, -0.105800174, 0.219419539, -0.969882667, 0.973032475, -0.178225949, -0.146464914, -0.204995126, -0.959215224, -0.194644511)
  402. using = false
  403. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 25
  404. Sound00 = Instance.new("Sound")
  405. Sound00.Volume = 6
  406. Sound00.Parent = game.Players.LocalPlayer.Character.Head
  407. Sound00.SoundId = "rbxassetid://330706798"
  408. bullethitforclone = Instance.new("Sound")
  409. bullethitforclone.Volume = 4
  410. bullethitforclone.Parent = game.Players.LocalPlayer.Character.Head
  411. bullethitforclone.SoundId = "rbxassetid://144884872"
  412.  
  413. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  414. if hit.Parent==nil then
  415. return
  416. end
  417. h=hit.Parent:FindFirstChild("Humanoid")
  418. for _,v in pairs(hit.Parent:children()) do
  419. if v:IsA("Humanoid") then
  420. h=v
  421. end
  422. end
  423. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  424. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  425. end
  426. if hit.Parent.className=="Hat" then
  427. hit=hit.Parent.Parent:findFirstChild("Head")
  428. end
  429. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  430. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  431. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  432. return
  433. end]]
  434. -- hs(hit,1.2)
  435. c=Instance.new("ObjectValue")
  436. c.Name="creator"
  437. c.Value=game:service("Players").LocalPlayer
  438. c.Parent=h
  439. game:GetService("Debris"):AddItem(c,.5)
  440. Damage=math.random(minim,maxim)
  441. -- h:TakeDamage(Damage)
  442. blocked=false
  443. block=hit.Parent:findFirstChild("Block")
  444. if block~=nil then
  445. print(block.className)
  446. if block.className=="NumberValue" then
  447. if block.Value>0 then
  448. blocked=true
  449. if decreaseblock==nil then
  450. block.Value=block.Value-1
  451. end
  452. end
  453. end
  454. if block.className=="IntValue" then
  455. if block.Value>0 then
  456. blocked=true
  457. if decreaseblock~=nil then
  458. block.Value=block.Value-1
  459. end
  460. end
  461. end
  462. end
  463. if blocked==false then
  464. -- h:TakeDamage(Damage)
  465. h.Health=h.Health-Damage
  466. showDamage(hit.Parent,Damage,3,TorsoColor)
  467. else
  468. h.Health=h.Health-(Damage/2)
  469. showDamage(hit.Parent,Damage/2,3,BrickColor.new("Bright red"))
  470. end
  471. if Type=="Knockdown" then
  472. hum=hit.Parent.Humanoid
  473. hum.PlatformStand=true
  474. coroutine.resume(coroutine.create(function(HHumanoid)
  475. swait(1)
  476. HHumanoid.PlatformStand=false
  477. end),hum)
  478. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  479. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  480. local bodvol=Instance.new("BodyVelocity")
  481. bodvol.velocity=angle*knockback
  482. bodvol.P=5000
  483. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  484. bodvol.Parent=hit
  485. rl=Instance.new("BodyAngularVelocity")
  486. rl.P=3000
  487. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  488. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  489. rl.Parent=hit
  490. game:GetService("Debris"):AddItem(bodvol,.5)
  491. game:GetService("Debris"):AddItem(rl,.5)
  492. elseif Type=="Normal" then
  493. vp=Instance.new("BodyVelocity")
  494. vp.P=500
  495. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  496. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  497. if KnockbackType==1 then
  498. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  499. elseif KnockbackType==2 then
  500. vp.velocity=Property.CFrame.lookVector*knockback
  501. end
  502. if knockback>0 then
  503. vp.Parent=hit.Parent.Torso
  504. end
  505. game:GetService("Debris"):AddItem(vp,.5)
  506. elseif Type=="Up" then
  507. local bodyVelocity=Instance.new("BodyVelocity")
  508. bodyVelocity.velocity=vt(0,10,0)
  509. bodyVelocity.P=1000
  510. bodyVelocity.maxForce=Vector3.new(1e+009, 1e+009, 1e+009)
  511. bodyVelocity.Parent=hit
  512. game:GetService("Debris"):AddItem(bodyVelocity,1)
  513. rl=Instance.new("BodyAngularVelocity")
  514. rl.P=3000
  515. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  516. rl.angularvelocity=Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  517. rl.Parent=hit
  518. game:GetService("Debris"):AddItem(rl,.5)
  519. elseif Type=="Snare" then
  520. bp=Instance.new("BodyPosition")
  521. bp.P=2000
  522. bp.D=100
  523. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  524. bp.position=hit.Parent.Torso.Position
  525. bp.Parent=hit.Parent.Torso
  526. game:GetService("Debris"):AddItem(bp,1)
  527. elseif Type=="Target" then
  528. if Targetting==false then
  529. ZTarget=hit.Parent.Torso
  530. coroutine.resume(coroutine.create(function(Part)
  531. swait(5)
  532. end),ZTarget)
  533. TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  534. targetgui=Instance.new("BillboardGui")
  535. targetgui.Parent=ZTarget
  536. targetgui.Size=UDim2.new(10,100,10,100)
  537. targ=Instance.new("ImageLabel")
  538. targ.Parent=targetgui
  539. targ.BackgroundTransparency=1
  540. targ.Image="rbxassetid://4834067"
  541. targ.Size=UDim2.new(1,0,1,0)
  542. cam.CameraType="Scriptable"
  543. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  544. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  545. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  546. Targetting=true
  547. RocketTarget=ZTarget
  548. for i=1,Property do
  549. --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
  550. if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  551. swait()
  552. end
  553. --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
  554. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  555. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  556. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  557. end
  558. Targetting=false
  559. RocketTarget=nil
  560. targetgui.Parent=nil
  561. cam.CameraType="Custom"
  562. end
  563. end
  564. debounce=Instance.new("BoolValue")
  565. debounce.Name="DebounceHit"
  566. debounce.Parent=hit.Parent
  567. debounce.Value=true
  568. game:GetService("Debris"):AddItem(debounce,Delay)
  569. c=Instance.new("ObjectValue")
  570. c.Name="creator"
  571. c.Value=Player
  572. c.Parent=h
  573. game:GetService("Debris"):AddItem(c,.5)
  574. CRIT=false
  575. hitDeb=true
  576. AttackPos=6
  577. end
  578. end
  579.  
  580. Hulmet = Instance.new("Part")
  581. Hulmet.Position = Hulmet.Position + Vector3.new(0, 10, 0)
  582. Hulmet.Parent = game.Players.LocalPlayer.Character
  583. Hulmet.Name = "Helmet"
  584. Hulmet.Size = Vector3.new(1.643, 1.157, 1.696)
  585. Hulmet.Material = Enum.Material.Metal
  586. Hulmet.BrickColor = BrickColor.new("Really black")
  587. MSHE = Instance.new("SpecialMesh")
  588. MSHE.Parent = Hulmet
  589. MSHE.MeshId = "rbxassetid://13640868"
  590. WULD = Instance.new("Weld")
  591. WULD.Parent = Hulmet
  592. WULD.Part0 = Hulmet
  593. WULD.Part1 = game.Players.LocalPlayer.Character.Head
  594. WULD.C1 = CFrame.Angles(0, -0.7, 0)
  595. WULD.C0 = CFrame.new(0, -0.6, 0)
  596. char049 = game.Players.LocalPlayer.Character
  597. pcall(function()
  598. for i, v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  599. if v:IsA("Accessory") then
  600. v:Destroy()
  601. end
  602. end
  603. end)
  604. function shoot()
  605. if not using then
  606. using = true
  607. attack = true
  608. for i = 0,5 , 0.1 do
  609. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(85), math.rad(0)), 0.4)
  610. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0 - 15 * math.cos(sine / 25)),math.rad(5),math.rad(10)),.3)
  611. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(0)),.2)
  612. RW.C0 = clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(90),math.rad(0),math.rad(90)),.3)
  613. LW.C0=clerp(LW.C0,cf(-1.5,0.5+0.04*math.sin(sine/25),0)*angles(math.rad(0),math.rad(4),math.rad(-5)),.3)
  614. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.4*math.cos(sine/8)/2, 0 *math.sin(sine/8)/2) * CFrame.Angles(math.rad(60) + -math.sin(sine/8)/1.2, math.rad(0), 0), .8)
  615. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.4*math.cos(sine/8)/2,0 *-math.sin(sine/8)/2) * CFrame.Angles(math.rad(0) + math.sin(sine/8)/1.2, math.rad(60), 0), .8)
  616. end
  617.  
  618. Sound00:Play()
  619. local Shell = Instance.new("Part")
  620. Shell.Parent = workspace
  621. Shell.Size = Vector3.new(.1,.3,.1)
  622. Shell.Archivable = true
  623. Shell.Transparency = 0
  624. Shell.CanCollide = true
  625. Shell.BrickColor = BrickColor.new("Really red")
  626. Shell.Material = "Neon"
  627. Shell.CFrame = Part3.CFrame*CFrame.new(-0.2,0.5,0)
  628. Shell.Velocity = (Part3.CFrame * CFrame.Angles(math.rad(math.random(20,30)*8), -math.rad(-40), math.rad(-20))).lookVector * 42
  629.  
  630.  
  631. game:service'Debris':AddItem(Shell,7)
  632.  
  633. for i = 1,7 do
  634. local bullet = Instance.new("Part", workspace)
  635. bullet.Size = Vector3.new(0.2,0.2,3)
  636. bullet.BrickColor = BrickColor.new("Really black")
  637. bullet.Material = "Neon"
  638. bullet.Anchored = false
  639. bullet.CFrame = Part1.CFrame * CFrame.new(3,0,0) * CFrame.fromEulerAnglesXYZ(0,math.pi/2,0)
  640. local velocityofbullet = Instance.new("BodyVelocity", bullet)
  641. velocityofbullet.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  642. velocityofbullet.Velocity = mouse.Hit.lookVector * 1150 + Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  643. bullet.CanCollide = false
  644. bullet:BreakJoints()
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651. local con5=bullet.Touched:connect(function(hit) Damagefunc(hit,67,85,math.random(50,90),"Knockdown",RootPart,.2,1)
  652.  
  653. if attackdebounce == false then
  654. attackdebounce = true
  655. bullet.Transparency = 1
  656. wait(0.1)
  657. bullet:Destroy()
  658. attackdebounce = false
  659. end
  660. end)
  661. end
  662.  
  663.  
  664. for i = 0,1 , .1 do
  665. weldf.C0 = clerp(weldf.C0,CFrame.new(-0.0359191895, -0.892173767, 0.284561157, -0.0689456016, 0.0198679417, -0.997422755, 0.839448929, 0.541383147, -0.0472417921, 0.539049447, -0.840541601, -0.0540040247),i)
  666. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(85), math.rad(0)), 0.4)
  667. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0 - 15 * math.cos(sine / 25)),math.rad(5),math.rad(10)),.3)
  668. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(0)),.2)
  669. RW.C0 = clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(90),math.rad(0),math.rad(90)),.3)
  670. LW.C0 = clerp(LW.C0,cf(-1.5, 0.5, 0)*angles(math.rad(0), math.rad(0), math.rad(0)),.2)
  671. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.4*math.cos(sine/8)/2, 0 *math.sin(sine/8)/2) * CFrame.Angles(math.rad(60) + -math.sin(sine/8)/1.2, math.rad(0), 0), .8)
  672. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.4*math.cos(sine/8)/2,0 *-math.sin(sine/8)/2) * CFrame.Angles(math.rad(0) + math.sin(sine/8)/1.2, math.rad(60), 0), .8)
  673. end
  674. for i = 0,1 , .1 do
  675. weldf.C0 = clerp(weldf.C0,CFrame.new(-0.0359191895, -0.892173767, 0.284561157, -0.0689456016, 0.0198679417, -0.997422755, 0.839448929, 0.541383147, -0.0472417921, 0.539049447, -0.840541601, -0.0540040247),i)
  676. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(85), math.rad(0)), 0.4)
  677. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0 - 15 * math.cos(sine / 25)),math.rad(5),math.rad(10)),.3)
  678. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(0)),.2)
  679. RW.C0 = clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(90),math.rad(0),math.rad(90)),.3)
  680. LW.C0 = clerp(LW.C0,cf(-1.5, 0.5, 0)*angles(math.rad(0), math.rad(0), math.rad(0)),.2)
  681. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.4*math.cos(sine/8)/2, 0 *math.sin(sine/8)/2) * CFrame.Angles(math.rad(60) + -math.sin(sine/8)/1.2, math.rad(0), 0), .8)
  682. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.4*math.cos(sine/8)/2,0 *-math.sin(sine/8)/2) * CFrame.Angles(math.rad(0) + math.sin(sine/8)/1.2, math.rad(60), 0), .8)
  683. end
  684. for i = 0,1 , .01 do
  685. weldf.C0 = clerp(weldf.C0,CFrame.new(-0.0359191895, -0.892173767, 0.284561157, -0.0689456016, 0.0198679417, -2.997422755, 0.839448929, 0.541383147, -0.0472417921, 0.539049447, -0.840541601, -0.0540040247)* angles(math.rad(0),math.rad(0),math.rad(0)),i)
  686. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(85), math.rad(0)), 0.4)
  687. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0 - 15 * math.cos(sine / 25)),math.rad(-5),math.rad(-10)),.3)
  688. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(0)),.2)
  689. RW.C0 = clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(90),math.rad(0),math.rad(90)),.3)
  690. LW.C0=clerp(LW.C0,cf(-1.5,0.5+0.04*math.sin(sine/25),0)*angles(math.rad(0),math.rad(6),math.rad(-9)),.3)
  691. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.15*math.cos(sine/8)/2, 0 *math.sin(sine/8)/2) * CFrame.Angles(math.rad(0), math.rad(3), math.rad(-4)), 0.1)
  692. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.15*math.cos(sine/8)/2,0 *-math.sin(sine/8)/2) * CFrame.Angles(math.rad(0), math.rad(-3), math.rad(4)), 0.1)
  693. end
  694. wait(1)
  695. attack = false
  696. using = false
  697. weldf.C0 = CFrame.new(-0.0861244202, -1.04447937, -0.182327271, -0.105800174, 0.219419539, -0.969882667, 0.973032475, -0.178225949, -0.146464914, -0.204995126, -0.959215224, -0.194644511)
  698. end
  699. end
  700.  
  701. mouse.Button1Down:connect(shoot)
  702.  
  703. --Sounds/Music--
  704. music = Instance.new("Sound",torso)
  705. music.SoundId = "rbxassetid://581195737"
  706. music.Volume = 3.5
  707. music.Looped = true
  708. music:Play()
  709.  
  710.  
  711.  
  712.  
  713.  
  714. local HBill = Instance.new("BillboardGui",head)
  715. local HMain, HBar = Instance.new("Frame", HBill), Instance.new("Frame")
  716. local HName = Instance.new("TextLabel")
  717. HBill.Size = UDim2.new(15,0,2.2,0)
  718. HBill.Name = "Health Display"
  719. HBill.StudsOffset = Vector3.new(3.675,2,0)
  720. HBill.AlwaysOnTop = true
  721. HBill.Enabled = true
  722. HMain.BackgroundColor3 = Color3.new(0, 0, 0)
  723. HMain.BackgroundTransparency = 1
  724. HMain.Size = UDim2.new(.5,0,.5,0)
  725. HName.Parent = HMain
  726. HName.BackgroundTransparency = 1
  727. HName.BackgroundColor3 = Color3.new(0,0,0)
  728. HName.BorderColor3 = Color3.new(1,1,1)
  729. HName.BorderSizePixel = 2
  730. HName.Size = UDim2.new(1,0,.75,0)
  731. HName.Font = "Highway"
  732. HName.Text = "Inno"
  733. HName.TextScaled = true
  734. HName.TextColor3 = Color3.new(0,0,0)
  735. HName.TextStrokeColor3 = Color3.new(42,42,42)
  736. HName.TextStrokeTransparency = 0
  737. HName.TextYAlignment = "Bottom"
  738. for i, v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  739. if v:IsA("Pants") then
  740. v:Remove()
  741. end
  742. end
  743. wait()
  744. shirt = Instance.new("Shirt", game.Players.LocalPlayer.Character)
  745. shirt.Name = "Shirt"
  746. pants = Instance.new("Pants", game.Players.LocalPlayer.Character)
  747. pants.Name = "Pants"
  748. game.Players.LocalPlayer.Character.Shirt.ShirtTemplate = "rbxassetid://24040613"
  749. local BC = game.Players.LocalPlayer.Character["Body Colors"]
  750. BC.LeftLegColor = BrickColor.new("Really black")
  751. BC.RightLegColor = BrickColor.new("Really black")
  752. game.Players.LocalPlayer.Character.Head.face.Texture = "http://www.roblox.com/asset/?id=304904077"
  753. game.Players.LocalPlayer.Character.Head.face.Transparency = 0
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764. --animations--
  765. local sine = 0
  766. local change = 1
  767. local val = 0
  768. Humanoid.Animator.Parent = nil
  769. idleanim=.4
  770. while true do
  771.  
  772. swait()
  773. sine = sine + change
  774. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  775. local velderp=RootPart.Velocity.y
  776. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  777. if equipped==true or equipped==false then
  778. if attack==false then
  779. idle=idle+1
  780. else
  781. idle=0
  782. end
  783. if idle>=500 then
  784. if attack==false then
  785. --Sheath() Don't even try to do something with this i've already tried like 20 times
  786. end
  787. end
  788. if RootPart.Velocity.y > 1 and hitfloor==nil then
  789. Anim="Jump"
  790. if attack==false then
  791. change = 2
  792. Humanoid.CameraOffset = Vector3.new(0,0,0)
  793. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0 + 360 * math.cos (sine / 30)),math.rad(0),math.rad(0)),.3)
  794. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  795. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(10)), 0.3)
  796. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3)
  797. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -.6+0.15*math.cos(sine/60), -0.4) * CFrame.Angles(math.rad(0), math.rad(10), math.rad(-16)), 0.1)
  798. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.15*math.cos(sine/60), 0) * CFrame.Angles(math.rad(0), math.rad(-10), math.rad(16)), 0.1)
  799. end
  800. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  801. Anim="Fall"
  802. change = 1
  803. if attack==false then
  804. Humanoid.CameraOffset = Vector3.new(0,0,0)
  805. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -.8-0.50*math.cos(sine/60), 0) * CFrame.Angles(math.rad(3), math.rad(0), math.rad(2)), 0.1)
  806. RH.C0=clerp(RH.C0,cf(1,0.20,-0.25)*angles(math.rad(90),math.rad(90),math.rad(90))*angles(math.rad(90),math.rad(90),math.rad(90)),.3)
  807. LH.C0=clerp(LH.C0,cf(-1,-0.70,-0.25)*angles(math.rad(90),math.rad(-90),math.rad(90))*angles(math.rad(90),math.rad(90),math.rad(90)),.3)
  808. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  809. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(40),math.rad(0),math.rad(0)),.3)
  810. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.65, 0) * angles(math.rad(-10), math.rad(0), math.rad(90)), 0.3)
  811. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.65, 0) * angles(math.rad(-10), math.rad(0), math.rad(-90)), 0.3)
  812. end
  813. elseif torvel<1 and hitfloor~=nil then
  814. Anim="Idle"
  815. if attack==false then
  816. Humanoid.CameraOffset = Vector3.new(0,0,0)
  817. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1.2-0.15*math.cos(sine/60), 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
  818. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(5*math.cos(sine/25)),math.rad(0),math.rad(0)),.3)
  819. RW.C0=clerp(RW.C0,cf(1.5,0.5+0.04*math.sin(sine/25),0)*angles(math.rad(0),math.rad(-4),math.rad(5)),.3)
  820. LW.C0=clerp(LW.C0,cf(-1.5,0.5+0.04*math.sin(sine/25),0)*angles(math.rad(0),math.rad(4),math.rad(-5)),.3)
  821. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.15*math.cos(sine/60), 0.1) * CFrame.Angles(math.rad(-6), math.rad(3), math.rad(-4)), 0.1)
  822. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.15*math.cos(sine/60), 0) * CFrame.Angles(math.rad(6), math.rad(-3), math.rad(4)), 0.1)
  823. end
  824. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  825. Anim="Walk"
  826. if attack==false then
  827. Humanoid.CameraOffset = Vector3.new(0,0,0)
  828. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(5*math.cos(sine/25)),math.rad(0),math.rad(0)),.3)
  829. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(0)),.2)
  830. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.05*math.cos(sine/7.5), 0) * angles(math.rad(-15), math.rad(0), math.rad(0)+ RootPart.RotVelocity.Y / 65), .2)
  831. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-7), math.rad(-4),math.rad(5)),.2)
  832. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(55*math.cos(sine/7)), math.rad(4),math.rad(-5)),.2)
  833. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1-0.15*math.cos(sine/7)/2, 0 *math.sin(sine/7)/2) * CFrame.Angles(math.rad(-8) + -math.sin(sine/7)/1.2, math.rad(0), 0), .8)
  834. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.15*math.cos(sine/7)/2,0 *-math.sin(sine/7)/2) * CFrame.Angles(math.rad(8) + math.sin(sine/7)/1.2, math.rad(0), 0), .8)
  835. end
  836. elseif torvel>=22 and hitfloor~=nil then
  837. Anim="Run"
  838. if attack==false then
  839. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(5*math.cos(sine/25)),math.rad(0),math.rad(0)),.3)
  840. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(0)),.2)
  841. Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.05*math.cos(sine/7.5), 0) * angles(math.rad(-15), math.rad(0), math.rad(0) / 65), .2)
  842. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-7), math.rad(-4),math.rad(5)),.2)
  843. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(55*math.cos(sine/7)), math.rad(4),math.rad(-5)),.2)
  844. LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1-0.15*math.cos(sine/7)/2, 0 *math.sin(sine/7)/2) * CFrame.Angles(math.rad(-8) + -math.sin(sine/7)/1.2, math.rad(0), 0), .8)
  845. RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.15*math.cos(sine/7)/2,0 *-math.sin(sine/7)/2) * CFrame.Angles(math.rad(8) + math.sin(sine/7)/1.2, math.rad(0), 0), .8)
  846. end
  847. end
  848. end
  849. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement