Advertisement
sneakydodge123

boss

Jul 1st, 2019
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- DONT EDIT NOTHING IN THE SCRIPT IF YOU DONT KNOW WHAT YOU DOING!
  2. -- This script is for iiFireGamingOfDoom.
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,game,owner = owner,game
  6. local RealPlayer = Player
  7. do
  8. print("FE Compatibility code by Mokiros")
  9. local rp = RealPlayer
  10. script.Parent = rp.Character
  11.  
  12. --RemoteEvent for communicating
  13. local Event = Instance.new("RemoteEvent")
  14. Event.Name = "UserInput_Event"
  15.  
  16. --Fake event to make stuff like Mouse.KeyDown work
  17. local function fakeEvent()
  18. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  19. t.connect = t.Connect
  20. return t
  21. end
  22.  
  23. --Creating fake input objects with fake variables
  24. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  25. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  26. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  27. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  28. end}
  29. --Merged 2 functions into one by checking amount of arguments
  30. CAS.UnbindAction = CAS.BindAction
  31.  
  32. --This function will trigger the events that have been :Connect()'ed
  33. local function te(self,ev,...)
  34. local t = m[ev]
  35. if t and t._fakeEvent then
  36. for _,f in pairs(t.Functions) do
  37. f(...)
  38. end
  39. end
  40. end
  41. m.TrigEvent = te
  42. UIS.TrigEvent = te
  43.  
  44. Event.OnServerEvent:Connect(function(plr,io)
  45. if plr~=rp then return end
  46. m.Target = io.Target
  47. m.Hit = io.Hit
  48. if not io.isMouse then
  49. local b = io.UserInputState == Enum.UserInputState.Begin
  50. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  51. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67.  
  68. local Mouse = Player:GetMouse()
  69. local UIS = game:GetService("UserInputService")
  70. local input = function(io,a)
  71. if a then return end
  72. --Since InputObject is a client-side instance, we create and pass table instead
  73. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  74. end
  75. UIS.InputBegan:Connect(input)
  76. UIS.InputEnded:Connect(input)
  77.  
  78. local h,t
  79. --Give the server mouse data 30 times every second, but only if the values changed
  80. --If player is not moving their mouse, client won't fire events
  81. while wait(1/30) do
  82. if h~=Mouse.Hit or t~=Mouse.Target then
  83. h,t=Mouse.Hit,Mouse.Target
  84. Event:FireServer({isMouse=true,Target=t,Hit=h})
  85. end
  86. end]==],Player.Character)
  87.  
  88. ----Sandboxed game object that allows the usage of client-side methods and services
  89. --Real game object
  90. local _rg = game
  91.  
  92. --Metatable for fake service
  93. local fsmt = {
  94. __index = function(self,k)
  95. local s = rawget(self,"_RealService")
  96. if s then return s[k] end
  97. end,
  98. __newindex = function(self,k,v)
  99. local s = rawget(self,"_RealService")
  100. if s then s[k]=v end
  101. end,
  102. __call = function(self,...)
  103. local s = rawget(self,"_RealService")
  104. if s then return s(...) end
  105. end
  106. }
  107. local function FakeService(t,RealService)
  108. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  109. return setmetatable(t,fsmt)
  110. end
  111.  
  112. --Fake game object
  113. local g = {
  114. GetService = function(self,s)
  115. return self[s]
  116. end,
  117. Players = FakeService({
  118. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  119. },"Players"),
  120. UserInputService = FakeService(UIS,"UserInputService"),
  121. ContextActionService = FakeService(CAS,"ContextActionService"),
  122. }
  123. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  124. g.service = g.GetService
  125.  
  126. g.RunService = FakeService({
  127. RenderStepped = _rg:GetService("RunService").Heartbeat,
  128. BindToRenderStep = function(self,name,_,fun)
  129. self._btrs[name] = self.Heartbeat:Connect(fun)
  130. end,
  131. UnbindFromRenderStep = function(self,name)
  132. self._btrs[name]:Disconnect()
  133. end,
  134. },"RunService")
  135.  
  136. setmetatable(g,{
  137. __index=function(self,s)
  138. return _rg:GetService(s) or typeof(_rg[s])=="function"
  139. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  140. end,
  141. __newindex = fsmt.__newindex,
  142. __call = fsmt.__call
  143. })
  144. --Changing owner to fake player object to support owner:GetMouse()
  145. game,owner = g,g.Players.LocalPlayer
  146. end
  147.  
  148.  
  149. wait(2)
  150. local InputService=game:GetService("UserInputService")
  151. local Camera=game.Workspace.CurrentCamera
  152. local Player=game.Players.LocalPlayer
  153. local Character=Player.Character
  154. local Head=Character.Head
  155. local Torso=Character.Torso
  156. local RootPart=Character.HumanoidRootPart
  157. local RootJoint=RootPart.RootJoint
  158. local Neck=Torso.Neck
  159. Camera.FieldOfView=90
  160. Camera.CameraType="Scriptable"
  161. InputService.MouseBehavior = Enum.MouseBehavior.LockCenter
  162.  
  163.  
  164.  
  165. local v3=Vector3.new
  166. local cf=CFrame.new
  167. local components=cf().components
  168. local inverse=cf().inverse
  169. local fromAxisAngle=CFrame.fromAxisAngle
  170. local atan,atan2=math.atan,math.atan2
  171. local acos=math.acos
  172.  
  173. local function toAxisAngleFromVector(v)
  174. local z=v.z
  175. return z*z<0.99999 and v3(v.y,-v.x,0).unit*acos(-z) or v3()
  176. end
  177.  
  178. local function AxisAngleLookOrientation(c,v,t)--CFrame,Vector,Tween
  179. local c=c-c.p
  180. local rv=(inverse(c)*v).unit
  181. local rz=rv.z
  182. return rz*rz<0.99999 and c*fromAxisAngle(v3(rv.y,-rv.x,0),acos(-rz)*(t or 1)) or c
  183. end
  184.  
  185. local function AxisAngleLookNew(v,t)--CFrame,Vector,Tween
  186. local rv=v.unit
  187. local rz=rv.z
  188. return rz*rz<0.99999 and fromAxisAngle(v3(rv.y,-rv.x,0),acos(-rz)*(t or 1)) or cf()
  189. end
  190.  
  191. local function AxisAngleLook(c,v,t)--CFrame,Vector,Tween
  192. local rv=(inverse(c)*v).unit
  193. local rz=rv.z
  194. return rz*rz<0.99999 and c*fromAxisAngle(v3(rv.y,-rv.x,0),acos(-rz)*(t or 1)) or c
  195. end
  196.  
  197.  
  198.  
  199.  
  200. local Sensitivity=0.005
  201.  
  202.  
  203. local CameraDirection=Vector3.new(0,0,1)
  204.  
  205. local function EulerAnglesYX(l)
  206. local x,z=l.x,l.z
  207. return atan(l.y/(x*x+z*z)^0.5),-atan2(x,-z)
  208. end
  209.  
  210. local function AnglesXY(l)
  211. local z=l.z
  212. return atan2(l.y,-z),-atan2(l.x,-z)
  213. end
  214.  
  215. local function MouseMoved(Input)
  216. if Input.UserInputType==Enum.UserInputType.MouseMovement then
  217. local dx,dy=Input.Delta.x*Sensitivity,Input.Delta.y*Sensitivity
  218. local m2=dx*dx+dy*dy
  219. if m2>0 then
  220. CameraDirection=(AxisAngleLookOrientation(RootPart.CFrame,CameraDirection)*fromAxisAngle(v3(-dy,-dx,0),m2^0.5)).lookVector
  221. end
  222. local RootOrientation=RootPart.CFrame-RootPart.Position
  223. local RelativeDirection=RootOrientation:inverse()*CameraDirection
  224. local AngX,AngY=AnglesXY(RelativeDirection)--RootOrientation:inverse()*
  225. if AngX<-1.57*11/12 then
  226. local y,z,c,s=RelativeDirection.y,RelativeDirection.z,math.cos(-1.57*11/12-AngX),-math.sin(-1.57*11/12-AngX)
  227. z,y=z*c-y*s,z*s+y*c
  228. CameraDirection=RootOrientation*v3(RelativeDirection.x<0 and -(1-y*y-z*z)^0.5 or (1-y*y-z*z)^0.5,y,z)
  229. elseif AngX>1.57*11/12 then
  230. local y,z,c,s=RelativeDirection.y,RelativeDirection.z,math.cos(1.57*11/12-AngX),-math.sin(1.57*11/12-AngX)
  231. z,y=z*c-y*s,z*s+y*c
  232. CameraDirection=RootOrientation*v3(RelativeDirection.x<0 and -(1-y*y-z*z)^0.5 or (1-y*y-z*z)^0.5,y,z)
  233. end
  234. end
  235. end
  236.  
  237. local Mouse=Player:GetMouse()
  238.  
  239. local Zoom=- 3
  240.  
  241. Mouse.KeyDown:connect(function(k)
  242. if k=="e" then
  243. Zoom=- -3
  244. elseif k=="q" then
  245. Zoom=- 1
  246. elseif k=="t" then
  247. Zoom=- 3.11
  248. elseif k=="m" then
  249. local s = Instance.new("Sound")
  250. s.Name = "BGMusic"
  251. s.SoundId = "http://www.roblox.com/asset/?id=857499889"
  252. s.Pitch = 1
  253. s.Volume = 1
  254. s.Looped = true
  255. s.archivable = false
  256. s.Parent = game.Workspace
  257. wait(0.1)
  258. s:play()
  259. elseif k=="l" then
  260. --time blast Gifted by invaderzimfan1233, Local Script!
  261.  
  262. math.randomseed(tick())
  263. local pwn = game:service('Players').LocalPlayer
  264. local char = pwn.Character
  265. local pk = pwn.Backpack
  266. local Human = char.Humanoid
  267. local Torso = char.Torso
  268. local Head = char.Head
  269. local LeftArm = char["Left Arm"]
  270. local RightArm = char["Right Arm"]
  271. local LeftLeg = char["Left Leg"]
  272. local RightLeg = char["Right Leg"]
  273. local Neck = char.Torso["Neck"]
  274. local RightShoulder = char.Torso["Right Shoulder"]
  275. local LeftShoulder = char.Torso["Left Shoulder"]
  276. local RightHip = char.Torso["Right Hip"]
  277. local LeftHip = char.Torso["Left Hip"]
  278. local NeckC0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  279. local NeckC1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  280. local LeftShoulderC0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  281. local LeftShoulderC1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  282. local RightShoulderC0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  283. local RightShoulderC1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  284. local LeftHipC0 = CFrame.new(-1, -1, 0, 0, 0, -1,0,1, 0, 1, 0, 0)
  285. local LeftHipC1 = CFrame.new(-0.5,1,0,0,0,-1,0,1,0,1, 0, 0)
  286. local RightHipC0 = CFrame.new(1,-1,0,0,0,1,0,1,0,-1,0,0)
  287. local RightHipC1 = CFrame.new(0.5,1,0,0,0,1,0,1,0,-1,0,0)
  288. local Tewl = Instance.new("HopperBin",pk)
  289. local Nim = "Time Blast"
  290. local disabled = false
  291. function ChargeWelds()
  292. if Torso.Anchored then
  293. Torso.CFrame = Torso.CFrame * CFrame.new(0,5,0)
  294. else
  295. Torso.Anchored = true
  296. Torso.CFrame = Torso.CFrame * CFrame.new(0,5,0)
  297. end
  298. coroutine.resume(meshInsertion)
  299. TiltX = 2
  300. TiltY = 0
  301. TiltZ = 2
  302. RightShoulder.C0 = RightShoulderC0 * CFrame.Angles(TiltX, TiltY, TiltZ)
  303. LeftShoulder.C0 = LeftShoulderC0 * CFrame.Angles(TiltX, TiltY, TiltZ)
  304. TiltX = 2
  305. TiltY = 0
  306. TiltZ = 2
  307. MoveX = 0
  308. MoveY = 0
  309. MoveZ = 0
  310. RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(TiltX, TiltY, TiltZ) * CFrame.new(MoveX, MoveY, MoveZ)
  311. LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(TiltX, TiltY, TiltZ) * CFrame.new(MoveX,MoveY,MoveZ)
  312. TiltX = 0.3
  313. TiltY = 0
  314. TiltZ = 0.3
  315. MoveX = 0
  316. MoveY = 0
  317. MoveZ = 0
  318. RightHip.C0 = RightHipC0 * CFrame.Angles(TiltX, TiltY, TiltZ) * CFrame.new(MoveX, MoveY, MoveZ)
  319. LeftHip.C0 = LeftHipC0 * CFrame.Angles(TiltX, TiltY, TiltZ) * CFrame.new(MoveX, MoveY, MoveZ)
  320. end
  321. function RefreshWelds()
  322. Neck.C0 = NeckC0
  323. Neck.C1 = NeckC1
  324. RightShoulder.C0 = RightShoulderC0
  325. RightShoulder.C1 = RightShoulderC1
  326. LeftShoulder.C0 = LeftShoulderC0
  327. LeftShoulder.C1 = LeftShoulderC1
  328. RightHip.C0 = RightHipC0
  329. RightHip.C1 = RightHipC1
  330. LeftHip.C0 = LeftHipC0
  331. LeftHip.C1 = LeftHipC1
  332. end
  333. function Welds1()
  334. TiltX = 0
  335. TiltY = 0
  336. TiltZ = 1.57
  337. RightShoulder.C0 = RightShoulderC0 * CFrame.Angles(TiltX, TiltY, TiltZ)
  338. LeftShoulder.C0 = LeftShoulderC0 * CFrame.Angles(TiltX, TiltY, -TiltZ)
  339. TiltX = 0.6
  340. TiltY = 0
  341. TiltZ = 0
  342. MoveX = 0
  343. MoveY = 0
  344. MoveZ = -0.3
  345. RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(TiltX, TiltY, TiltZ) * CFrame.new(MoveX, MoveY, MoveZ)
  346. LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(TiltX, TiltY, TiltZ) * CFrame.new(MoveX, MoveY, MoveZ)
  347. TiltX = -0.05
  348. TiltY = 0
  349. TiltZ = 0
  350. MoveX = 0
  351. MoveY = 0.1
  352. MoveZ = 0
  353. RightHip.C0 = RightHipC0 * CFrame.Angles(TiltX, TiltY, TiltZ) * CFrame.new(MoveX, MoveY, MoveZ)
  354. LeftHip.C0 = LeftHipC0 * CFrame.Angles(TiltX, TiltY, TiltZ) * CFrame.new(MoveX, MoveY, MoveZ)
  355. end
  356. function Welds2()
  357. TiltX = 100
  358. TiltY = 20
  359. TiltZ = -20
  360. RightShoulder.C0 = RightShoulderC0 * CFrame.Angles(TiltX, TiltY, TiltZ)
  361. LeftShoulder.C0 = LeftShoulderC0 * CFrame.Angles(TiltX, TiltY, TiltZ)
  362. TiltX = 0.6
  363. TiltY = 0
  364. TiltZ = 0
  365. MoveX = 0
  366. MoveY = 0
  367. MoveZ = -0.3
  368. RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(TiltX, TiltY, TiltZ) * CFrame.new(MoveX, MoveY, MoveZ)
  369. LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(TiltX, TiltY, TiltZ) * CFrame.new(MoveX, MoveY, MoveZ)
  370. TiltX = 0
  371. TiltY = 0
  372. TiltZ = 0
  373. MoveX = 0
  374. MoveY = 0
  375. MoveZ = 0
  376. RightHip.C0 = RightHipC0 * CFrame.Angles(TiltX, TiltY, TiltZ) * CFrame.new(MoveX, MoveY, MoveZ)
  377. LeftHip.C0 = LeftHipC0 * CFrame.Angles(TiltX, TiltY, TiltZ) * CFrame.new(MoveX, MoveY, MoveZ)
  378. end
  379. function onButton1Down(mouse)
  380. if disabled == true then
  381. return
  382. end
  383. Torso.Anchored = true
  384. Human.PlatformStand = true
  385. Human.WalkSpeed = 0
  386. disabled = true
  387. narb = Instance.new("ForceField",char)
  388. noob = narb:clone()
  389. noobz = narb:clone()
  390. nubz = narb:clone()
  391. coroutine.resume(coroutine.create(function()
  392. for x = 1,150 do
  393. Torso.CFrame = Torso.CFrame * CFrame.fromEulerAnglesXYZ(0,math.random(-100,100),0)
  394. wait()
  395. end
  396. end))
  397. chargeup()
  398. local wow = Instance.new("Part",workspace)
  399. wow.Anchored = true
  400. wow.CanCollide = false
  401. wow.Reflectance = 0.32
  402. wow.formFactor = "Custom"
  403. wow.Size = Vector3.new(0.2,0.2,0.2)
  404. wow.TopSurface = "Smooth"
  405. wow.Transparency = 0
  406. wow.BottomSurface = "Smooth"
  407. wow.CFrame = Torso.CFrame
  408. wow.BrickColor = BrickColor.new("Institutional white")
  409. local Mesh2 = Instance.new("SpecialMesh",wow)
  410. Mesh2.MeshType = "FileMesh"
  411. Mesh2.Scale = Vector3.new(4.5,0.5,4.5)
  412. Mesh2.MeshId = "http://www.roblox.com/asset/?id=20329976"
  413. Mesh2.TextureId = ""
  414. for i = 1,30 do
  415. wow.CFrame = Torso.CFrame * CFrame.new(0,-7.5,0)
  416. wait()
  417. wow.CFrame = wow.CFrame * CFrame.fromEulerAnglesXYZ(0,-6,0)
  418. wow.Transparency = wow.Transparency + 0.1
  419. end
  420. local p = Instance.new("Part",char)
  421. p.Anchored = true
  422. p.CanCollide = false
  423. p.Transparency = 0
  424. p.Reflectance = 0.3
  425. p.formFactor = "Symmetric"
  426. p.Size = Vector3.new(12, 12, 12)
  427. p.TopSurface = "Smooth"
  428. p.BottomSurface = "Smooth"
  429. p.Name = "Sharingan"
  430. p.Shape = "Ball"
  431. p.CFrame = Torso.CFrame
  432. p.BrickColor = BrickColor.new("Cyan")
  433. local lol = Instance.new("Explosion",workspace)
  434. lol.Position = Torso.Position
  435. lol.BlastRadius = 450
  436. lol.BlastPressure = 0
  437. for i = 1,10 do
  438. wait()
  439. p.Size = p.Size + Vector3.new(3,3,3)
  440. p.CFrame = Torso.CFrame
  441. p.Transparency = p.Transparency + 0.1
  442. end
  443. game.Lighting.TimeOfDay = 6
  444. p:remove()
  445. wow:remove()
  446. Welds2()
  447. wait(0.5)
  448. Welds1()
  449. wait(0.5)
  450. RightShoulder.C0 = RightShoulderC0 * CFrame.Angles(0.1, 0, 2)
  451. LeftShoulder.C0 = LeftShoulderC0 * CFrame.Angles(0.1, 0, -2)
  452. wait(1)
  453. for i = 1,20 do
  454. game.Lighting.Ambient = Color3.new(math.random(),math.random(),math.random())
  455. wait()
  456. end
  457. game.Lighting.Ambient = Color3.new(1,1,1)
  458. local model = Instance.new("Model",char)
  459. local fer = Instance.new("Fire",Torso)
  460. fer.Size = 30
  461. fer.Heat = 18
  462. fer.Color = BrickColor.new("Institutional white").Color
  463. fer.SecondaryColor = BrickColor.new("Really black").Color
  464. local smk = Instance.new("Smoke",Torso)
  465. smk.Opacity = 1
  466. smk.RiseVelocity = 25
  467. smk.Size = 12
  468. smk.Color = BrickColor.new("Cyan").Color
  469. local O = Instance.new("Part",model)
  470. O.Anchored = true
  471. O.CanCollide = false
  472. O.Transparency = 0
  473. O.Reflectance = 0.3
  474. O.formFactor = "Symmetric"
  475. O.Size = Vector3.new(0, 0, 0)
  476. O.TopSurface = "Smooth"
  477. O.BottomSurface = "Smooth"
  478. O.Name = "Sharingan"
  479. O.Shape = "Ball"
  480. O.CFrame = Torso.CFrame*CFrame.fromEulerAnglesXYZ(1.5, 0, 0)
  481. O.BrickColor = BrickColor.new("Really red")
  482. local Mesh = Instance.new("SpecialMesh")
  483. Mesh.Parent = O
  484. Mesh.MeshType = "FileMesh"
  485. Mesh.Scale = Vector3.new(1.3, 1.3, 1.3)
  486. Mesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
  487. Mesh.TextureId = ""
  488. local O2 = Instance.new("Part",model)
  489. O2.Anchored = true
  490. O2.CanCollide = false
  491. O2.Transparency = 0
  492. O2.Reflectance = 0.3
  493. O2.formFactor = "Symmetric"
  494. O2.Size = Vector3.new(0, 0, 0)
  495. O2.TopSurface = "Smooth"
  496. O2.BottomSurface = "Smooth"
  497. O2.Name = "Sharingan"
  498. O2.Shape = "Ball"
  499. O2.CFrame = Torso.CFrame
  500. O2.BrickColor = BrickColor.new("Institutional white")
  501. local Mesh3 = Instance.new("SpecialMesh")
  502. Mesh3.Parent = O2
  503. Mesh3.MeshType = "FileMesh"
  504. Mesh3.Scale = Vector3.new(1, 1, 1)
  505. Mesh3.MeshId = "http://www.roblox.com/asset/?id=3270017"
  506. Mesh3.TextureId = ""
  507. local O3 = Instance.new("Part",model)
  508. O3.Anchored = true
  509. O3.CanCollide = false
  510. O3.Transparency = 0
  511. O3.Reflectance = 0.3
  512. O3.formFactor = "Symmetric"
  513. O3.Size = Vector3.new(0, 0, 0)
  514. O3.TopSurface = "Smooth"
  515. O3.BottomSurface = "Smooth"
  516. O3.Name = "Sharingan"
  517. O3.Shape = "Ball"
  518. O3.CFrame = Torso.CFrame*CFrame.fromEulerAnglesXYZ(1.5, 0, 0)
  519. O3.BrickColor = BrickColor.new("Cyan")
  520. local Mesh4 = Instance.new("SpecialMesh")
  521. Mesh4.Parent = O3
  522. Mesh4.MeshType = "FileMesh"
  523. Mesh4.Scale = Vector3.new(1.3, 1.3, 1.3)
  524. Mesh4.MeshId = "http://www.roblox.com/asset/?id=3270017"
  525. Mesh4.TextureId = ""
  526. local O4 = Instance.new("Part",model)
  527. O4.Anchored = true
  528. O4.CanCollide = false
  529. O4.Transparency = 0
  530. O4.Reflectance = 0.3
  531. O4.formFactor = "Symmetric"
  532. O4.Size = Vector3.new(0, 0, 0)
  533. O4.TopSurface = "Smooth"
  534. O4.BottomSurface = "Smooth"
  535. O4.Name = "Sharingan"
  536. O4.Shape = "Ball"
  537. O4.CFrame = Torso.CFrame
  538. O4.BrickColor = BrickColor.new("Institutional white")
  539. local Mesh5 = Instance.new("SpecialMesh")
  540. Mesh5.Parent = O4
  541. Mesh5.MeshType = "FileMesh"
  542. Mesh5.Scale = Vector3.new(1, 1, 1)
  543. Mesh5.MeshId = "http://www.roblox.com/asset/?id=3270017"
  544. Mesh5.TextureId = ""
  545. local pro = Instance.new("Part",char)
  546. pro.Anchored = true
  547. pro.CanCollide = true
  548. pro.Transparency = 0.2
  549. pro.Reflectance = 0.3
  550. pro.formFactor = "Symmetric"
  551. pro.Size = Vector3.new(1, 1, 1)
  552. pro.TopSurface = "Smooth"
  553. pro.BottomSurface = "Smooth"
  554. pro.Name = "Sharingan"
  555. pro.Shape = "Ball"
  556. pro.BrickColor = BrickColor.new("Cyan")
  557. pro.CFrame = Torso.CFrame
  558. pro.Touched:connect(onTouched)
  559. local lol = Instance.new("Explosion",workspace)
  560. lol.Position = Torso.Position
  561. lol.BlastRadius = 65
  562. lol.BlastPressure = 900000
  563. lol.Hit:connect(explhit)
  564. local Effect = Instance.new("Part",pro)
  565. Effect.Anchored = true
  566. Effect.CanCollide = false
  567. Effect.Size = Vector3.new(1, 1, 1)
  568. Effect.formFactor = "Symmetric"
  569. Effect.Transparency = 0.6
  570. Effect.BrickColor = BrickColor.new("Institutional white")
  571. Effect.CFrame = Torso.CFrame
  572. Effect.Reflectance = 0.6
  573. Effect.TopSurface = "Smooth"
  574. Effect.BottomSurface = "Smooth"
  575. local EffectMesh = Instance.new("CylinderMesh",Effect)
  576. EffectMesh.Scale = Vector3.new(3, 90000, 3)
  577. local effect = Effect:Clone()
  578. local effectmesh = EffectMesh:Clone()
  579. effect.Parent = pro
  580. effectmesh.Parent = effect
  581. for i = 1,75 do
  582. effect.Reflectance = math.random()
  583. Effect.Reflectance = math.random()
  584. effectmesh.Scale = effectmesh.Scale + Vector3.new(1,0,1)
  585. EffectMesh.Scale = EffectMesh.Scale + Vector3.new(2,0,2)
  586. Mesh.Scale = Mesh.Scale + Vector3.new(3, 3, 3)
  587. Mesh3.Scale = Mesh.Scale
  588. Mesh4.Scale = Mesh.Scale
  589. Mesh5.Scale = Mesh.Scale
  590. O.CFrame = O.CFrame * CFrame.fromEulerAnglesXYZ(6,0,0)
  591. O2.CFrame = O2.CFrame * CFrame.fromEulerAnglesXYZ(0,6,0)
  592. O3.CFrame = O3.CFrame * CFrame.fromEulerAnglesXYZ(0,6,6)
  593. O4.CFrame = O4.CFrame * CFrame.fromEulerAnglesXYZ(6,0,6)
  594. pro.Size = pro.Size + Vector3.new(3,3,3)
  595. pro.CFrame = Torso.CFrame
  596. O.BrickColor = BrickColor.new("Really red")
  597. O2.BrickColor = BrickColor.new("Cyan")
  598. O3.BrickColor = BrickColor.new("Institutional white")
  599. O4.BrickColor = BrickColor.new("Really black")
  600. pro.BrickColor = BrickColor.new("Hot pink")
  601. wait()
  602. end
  603. coroutine.resume(core)
  604. for i = 1,10 do
  605. Effect.Reflectance = 0 + 0.1
  606. effect.Reflectance = 0 + 0.1
  607. EffectMesh.Scale = EffectMesh.Scale - Vector3.new(12,30,12)
  608. effectmesh.Scale = effectmesh.Scale - Vector3.new(11,29,11)
  609. O.Transparency = O.Transparency + 0.1
  610. O2.Transparency = O2.Transparency + 0.1
  611. O3.Transparency = O3.Transparency + 0.1
  612. O4.Transparency = O4.Transparency + 0.1
  613. pro.Transparency = p.Transparency + 0.01
  614. wait()
  615. end
  616. Effect:remove()
  617. pro:remove()
  618. fer:remove()
  619. smk:remove()
  620. noob:remove()
  621. noobz:remove()
  622. nubz:remove()
  623. narb:remove()
  624. RefreshWelds()
  625. game.Lighting.TimeOfDay = 14
  626. game.Lighting.Brightness = 0
  627. model:remove()
  628. Human.PlatformStand = false
  629. Torso.Anchored = false
  630. Human.WalkSpeed = 16
  631. wait(10)
  632. disabled = false
  633. end
  634. function lul(mouse)
  635. mouse.Icon = "http://www.roblox.com/asset/?id=41672909"
  636. mouse.Button1Down:connect(onButton1Down)
  637. end
  638. function explhit(drumstep)
  639. for d,s in pairs (drumstep:children()) do
  640. if s.className == "Humanoid" then
  641. s:takeDamage(80)
  642. end
  643. end
  644. end
  645. function chargeup()
  646. Welds1()
  647. wait(0.4)
  648. ChargeWelds()
  649. wait(0.3)
  650. StartCharge()
  651. wait()
  652. MidCharge()
  653. wait(0.5)
  654. EndCharge()
  655. wait(0.4)
  656. end
  657. function EndCharge()
  658. local p = Instance.new("Part",char)
  659. p.Anchored = true
  660. p.CanCollide = false
  661. p.Transparency = 0
  662. p.Reflectance = 0.3
  663. p.formFactor = "Symmetric"
  664. p.Size = Vector3.new(12, 12, 12)
  665. p.TopSurface = "Smooth"
  666. p.BottomSurface = "Smooth"
  667. p.Name = "Sharingan"
  668. p.Shape = "Ball"
  669. p.CFrame = Torso.CFrame
  670. p.BrickColor = BrickColor.new("Institutional white")
  671. for i = 1,10 do
  672. p.Size = p.Size - Vector3.new(3,3,3)
  673. p.CFrame = Torso.CFrame
  674. wait()
  675. end
  676. p:remove()
  677. end
  678. function MidCharge()
  679. local wow = Instance.new("Part",workspace)
  680. wow.Anchored = true
  681. wow.CanCollide = false
  682. wow.Reflectance = 0.32
  683. wow.formFactor = "Custom"
  684. wow.Size = Vector3.new(12,12,12)
  685. wow.TopSurface = "Smooth"
  686. wow.Transparency = 0.5
  687. wow.BottomSurface = "Smooth"
  688. wow.CFrame = Torso.CFrame * CFrame.new(0,0,0)
  689. wow.BrickColor = BrickColor.new("Cyan")
  690. local wow2 = Instance.new("Part",workspace)
  691. wow2.Anchored = true
  692. wow2.CanCollide = false
  693. wow2.Reflectance = 0.32
  694. wow2.formFactor = "Custom"
  695. wow2.Size = Vector3.new(12,12,12)
  696. wow2.TopSurface = "Smooth"
  697. wow2.Transparency = 0.5
  698. wow2.BottomSurface = "Smooth"
  699. wow2.CFrame = Torso.CFrame * CFrame.new(0,0,0)
  700. wow2.BrickColor = BrickColor.new("Royal Purple")
  701. local wow11 = Instance.new("Part",workspace)
  702. wow11.Anchored = true
  703. wow11.CanCollide = false
  704. wow11.Reflectance = 0.32
  705. wow11.formFactor = "Custom"
  706. wow11.Size = Vector3.new(12,12,12)
  707. wow11.TopSurface = "Smooth"
  708. wow11.Transparency = 0.5
  709. wow11.BottomSurface = "Smooth"
  710. wow11.CFrame = Torso.CFrame * CFrame.new(0,0,0)
  711. wow11.BrickColor = BrickColor.new("Hot pink")
  712. local wow4 = Instance.new("Part",workspace)
  713. wow4.Anchored = true
  714. wow4.CanCollide = false
  715. wow4.Reflectance = 0.32
  716. wow4.formFactor = "Custom"
  717. wow4.Size = Vector3.new(12,12,12)
  718. wow4.TopSurface = "Smooth"
  719. wow4.Transparency = 0.5
  720. wow4.BottomSurface = "Smooth"
  721. wow4.CFrame = Torso.CFrame * CFrame.new(0,0,0)
  722. wow4.BrickColor = BrickColor.new("Really black")
  723. local Taco = Instance.new("SelectionBox",wow)
  724. Taco.Visible = true
  725. Taco.Color = BrickColor.new("Really red")
  726. Taco.Adornee = Taco.Parent
  727. local Tacoz = Taco:clone()
  728. Tacoz.Parent = wow2
  729. Tacoz.Color = BrickColor.new("Really black")
  730. Tacoz.Adornee = Tacoz.Parent
  731. local Taco5 = Tacoz:clone()
  732. Taco5.Parent = wow4
  733. Taco5.Adornee = Taco5.Parent
  734. Taco5.Color = BrickColor.new("Really red")
  735. local Tacosh = Tacoz:clone()
  736. Tacosh.Parent = wow11
  737. Tacosh.Adornee = Tacosh.Parent
  738. Tacosh.Color = BrickColor.new("Really black")
  739. for i = 1,20 do
  740. wait()
  741. wow11.CFrame = wow11.CFrame * CFrame.fromEulerAnglesXYZ(6,6,6)
  742. wow4.CFrame = wow4.CFrame * CFrame.fromEulerAnglesXYZ(-6,-6,-6)
  743. wow2.CFrame = wow2.CFrame * CFrame.fromEulerAnglesXYZ(-3,2,6)
  744. wow.CFrame = wow.CFrame * CFrame.fromEulerAnglesXYZ(5,1,-6)
  745. end
  746. wow:remove()
  747. wow2:remove()
  748. wow4:remove()
  749. wow11:remove()
  750. end
  751. function StartCharge()
  752. local p = Instance.new("Part",char)
  753. p.Anchored = true
  754. p.CanCollide = false
  755. p.Transparency = 0.6
  756. p.Reflectance = 0.3
  757. p.formFactor = "Symmetric"
  758. p.Size = Vector3.new(3,3,3)
  759. p.TopSurface = "Smooth"
  760. p.BottomSurface = "Smooth"
  761. p.Name = "Sharingan"
  762. p.Shape = "Ball"
  763. p.CFrame = Torso.CFrame
  764. p.BrickColor = BrickColor.new("Institutional white")
  765. local O = Instance.new("Part",model)
  766. O.Anchored = true
  767. O.CanCollide = false
  768. O.Transparency = 0
  769. O.Reflectance = 0.3
  770. O.formFactor = "Symmetric"
  771. O.Size = Vector3.new(0, 0, 0)
  772. O.TopSurface = "Smooth"
  773. O.BottomSurface = "Smooth"
  774. O.Name = "Sharingan"
  775. O.Shape = "Ball"
  776. O.CFrame = Torso.CFrame
  777. O.BrickColor = BrickColor.new("Cyan")
  778. local Mesh = Instance.new("SpecialMesh")
  779. Mesh.Parent = O
  780. Mesh.MeshType = "FileMesh"
  781. Mesh.Scale = Vector3.new(1.3, 1.3, 1.3)
  782. Mesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
  783. Mesh.TextureId = ""
  784. for i = 1,10 do
  785. p.Size = p.Size + Vector3.new(3,3,3)
  786. p.CFrame = Torso.CFrame
  787. p.Transparency = p.Transparency + 0.1
  788. O.Transparency = O.Transparency + 0.1
  789. Mesh.Scale = Mesh.Scale + Vector3.new(4, 4, 4)
  790. wait()
  791. end
  792. p:remove()
  793. O:remove()
  794. end
  795. function onTouched(Taco)
  796. if Taco.Parent.Name ~= pwn.Name and Taco.Parent.Parent.Name ~= pwn.Name then
  797. if Taco.Parent.className == "Model" or Taco.Parent.Parent.className == "Model" then
  798. for k,f in pairs(Taco.Parent:children()) do
  799. if f.className == "Part" then
  800. f.Anchored = false
  801. coroutine.resume(coroutine.create(function()
  802. f.Velocity = (Head.Position - f.Position).unit * -150
  803. wait(0.4)
  804. f.Veclovity = Vector3.new(0,0,0)
  805. end))
  806. elseif f.className == "ForceField" then
  807. f:remove()
  808. elseif f.className == "Hat" then
  809. f:remove()
  810. end
  811. end
  812. end
  813. end
  814. end
  815. function shock()
  816. local wowz = Instance.new("Part",workspace)
  817. wowz.Anchored = true
  818. wowz.CanCollide = false
  819. wowz.Reflectance = 0.32
  820. wowz.formFactor = "Custom"
  821. wowz.Size = Vector3.new(0.2,0.2,0.2)
  822. wowz.TopSurface = "Smooth"
  823. wowz.Transparency = 0
  824. wowz.BottomSurface = "Smooth"
  825. wowz.CFrame = Torso.CFrame * CFrame.new(0,0,0)
  826. wowz.BrickColor = BrickColor.new("Really black")
  827. local Mesh2 = Instance.new("SpecialMesh",wow)
  828. Mesh2.MeshType = "FileMesh"
  829. Mesh2.Scale = Vector3.new(6,0.5,6)
  830. Mesh2.MeshId = "http://www.roblox.com/asset/?id=20329976"
  831. Mesh2.TextureId = ""
  832. for i = 1,30 do
  833. wowz.CFrame = Torso.CFrame * CFrame.new(0,-2.5,0)
  834. wait()
  835. wowz.CFrame = wow.CFrame * CFrame.fromEulerAnglesXYZ(0,6,0)
  836. wowz.BrickColor = BrickColor.Random()
  837. end
  838. wowz:remove()
  839. end
  840. function spinmesh()
  841. local wowz = Instance.new("Part",char)
  842. wowz.Anchored = true
  843. wowz.CanCollide = false
  844. wowz.Reflectance = 0.32
  845. wowz.Shape = "Ball"
  846. wowz.Transparency = 0
  847. wowz.formFactor = "Custom"
  848. wowz.Size = Vector3.new(9,9,9)
  849. wowz.TopSurface = "Smooth"
  850. wowz.BottomSurface = "Smooth"
  851. wowz.CFrame = Torso.CFrame
  852. wowz.BrickColor = BrickColor.new("Really black")
  853. wait(3)
  854. wowz:remove()
  855. end
  856. meshInsertion = coroutine.create(spinmesh)
  857. core = coroutine.create(shock)
  858. Tewl.Name = Nim
  859. Tewl.Selected:connect(lul)
  860. elseif k=="o" then
  861. InputService.MouseBehavior = Enum.MouseBehavior.Default
  862. elseif k=="p" then
  863. InputService.MouseBehavior = Enum.MouseBehavior.LockCenter
  864. elseif k=="n" then
  865. ----------------------------------------
  866. -- Originally made by Alfederate :D --
  867. ----------------------------------------
  868.  
  869. -- there's no time to explain! --
  870.  
  871. local new=Instance.new
  872. local rad=math.rad
  873. local cf=CFrame.new
  874. local v3=Vector3.new
  875. local ang=function(x,y,z)
  876. return CFrame.Angles(rad(x),rad(y),rad(z))
  877. end
  878. local player=game:service'Players'.LocalPlayer
  879. local char=player.Character
  880. local cam=workspace.Camera
  881. local mouse=player:GetMouse()
  882. local weld=function(a,b,c0,c1)
  883. m=Instance.new('Motor',a)
  884. m.Part0=a
  885. m.Part1=b
  886. m.C0=c0
  887. m.C1=c1
  888. return m
  889. end
  890.  
  891. start='rbxassetid://592555095'
  892. snd='rbxassetid://594472043'
  893. beamm=Instance.new('Model',workspace)
  894. beamm.Name='beam'
  895.  
  896. laser=false
  897.  
  898. rs=Instance.new('Part',char)
  899. rs.Transparency=1
  900. rs.CanCollide=false
  901. rs.TopSurface,rs.BottomSurface=0,0
  902. rs.FormFactor=3
  903. rs.Size=Vector3.new(.5,.5,.5)
  904.  
  905. ls=rs:Clone()
  906. ls.Parent=char
  907.  
  908. rsw=weld(rs,char.Torso,cf(-1,-.5,0),cf())
  909. lsw=weld(ls,char.Torso,cf(1,-.5,0),cf())
  910. raw=weld(char['Right Arm'],rs,cf(-.5,.6,-.14),ang(90,0,-8))
  911. law=weld(char['Left Arm'],ls,cf(-.3,1.5,-.14),ang(90,0,43))
  912.  
  913. vol=1
  914.  
  915. s1=Instance.new('Sound',char)
  916. s1.Volume=vol
  917. s1.Pitch=1
  918. s1.Looped=true
  919. s1.SoundId=snd
  920.  
  921. s2=Instance.new('Sound',char)
  922. s2.Volume=vol
  923. s2.Pitch=1
  924. s2.Looped=true
  925. s2.SoundId=start
  926.  
  927. s2:play()
  928.  
  929. particles={}
  930.  
  931. local wep=new('Part',char)
  932. wep.FormFactor=3
  933. wep.CanCollide=false
  934. wep.Size=v3(1,3,1)
  935. wep.TopSurface,wep.BottomSurface=0,0
  936. local wepw=weld(wep,char['Right Arm'],cf(.26,.4,.7),ang(0,0,8))
  937.  
  938. local beam=wep:Clone()
  939. beam:ClearAllChildren()
  940. beam.Material='Neon'
  941. beam.BrickColor=BrickColor.new('Electric blue')
  942. beam.Size=Vector3.new(3,3,1)
  943. beam.Transparency=.5
  944. beam.Anchored=true
  945. local ms=Instance.new('BlockMesh',beam)
  946. local inner=beam:Clone()
  947. inner.Transparency=0
  948. inner.Material='SmoothPlastic'
  949. inner.BrickColor=BrickColor.new('Green')
  950. local ms2=inner.Mesh
  951.  
  952. local expl=inner:Clone()
  953. expl.Mesh:Destroy()
  954. expl.Material='Neon'
  955. expl.BrickColor=BrickColor.new('Really red')
  956. expl.Size=Vector3.new(11,11,11)
  957. expl.Transparency=.55
  958. pl=Instance.new('PointLight',expl)
  959. pl.Color=expl.BrickColor.Color
  960. pl.Range=pl.Range*2
  961. pl.Name='light'
  962. local br=pl.Range
  963.  
  964. local exa=expl:Clone()
  965. exa.Size=Vector3.new(4,4,4)
  966. pl2=exa.light
  967.  
  968. local part=exa:Clone()
  969. part.Size=Vector3.new(1.5,1.5,1.5)
  970. pl3=part.light
  971. pms=Instance.new('BlockMesh',part)
  972.  
  973. char.Humanoid.Died:connect(function()
  974. laser=false
  975. beam.Parent=nil
  976. inner.Parent=nil
  977. expl.Parent=nil
  978. exa.Parent=nil
  979. s2:stop()
  980. s1:stop()
  981. end)
  982.  
  983. mouse.Button1Down:connect(function() if char.Humanoid.Health~=0 then
  984. laser=true
  985. s1:play()
  986. s2:stop()
  987. end end)
  988. mouse.Button1Up:connect(function()
  989. laser=false
  990. beam.Parent=nil
  991. inner.Parent=nil
  992. expl.Parent=nil
  993. exa.Parent=nil
  994. s1:stop()
  995. s2:play()
  996. end)
  997.  
  998. parti=0
  999. game:service'RunService'.Stepped:connect(function()
  1000. parti=parti+1
  1001. for i,v in pairs(particles) do
  1002. v.CFrame=v.CFrame*CFrame.new(0,0,-.3)
  1003. v.Transparency=v.Transparency+.08
  1004. if v.Transparency >= 1 then
  1005. v:Destroy()
  1006. table.remove(particles,i)
  1007. else
  1008. v.Parent=beamm
  1009. end
  1010. end
  1011. a=cam.CoordinateFrame.p
  1012. b=mouse.Hit.p
  1013. mhitr=Ray.new(a,(b-a).unit*999)
  1014. mhit,ps=workspace:FindPartOnRayWithIgnoreList(mhitr,{char,beamm})
  1015. raw.C1=ang(90+(mouse.Hit.lookVector.y*90),0,-8)
  1016. law.C1=ang(90+(mouse.Hit.lookVector.y*90),0,43)
  1017. if not char.Humanoid.Sit and not char.Humanoid.PlatformStand then
  1018. char.Torso.CFrame=CFrame.new(char.Torso.CFrame.p,Vector3.new(ps.x,char.Torso.CFrame.p.y,ps.z))
  1019. end
  1020. if laser then
  1021. beamm.Parent=workspace
  1022. beam.Parent=beamm
  1023. inner.Parent=beamm
  1024. expl.Parent=beamm
  1025. exa.Parent=beamm
  1026. s1.Volume=s1.Volume-.0
  1027.  
  1028. ray=Ray.new((wep.CFrame*cf(0,-1.5,0)).p,((wep.CFrame*cf(0,-10,0)).p-(wep.CFrame*cf(0,-1.5,0)).p).unit*999)
  1029. hit,pos=workspace:FindPartOnRayWithIgnoreList(ray,{char,beamm})
  1030.  
  1031. if hit and hit.Parent:findFirstChild('Humanoid') and s1.Volume > .3 and parti/8==math.floor(parti/8) then
  1032. Instance.new('Explosion',workspace).Position=pos
  1033. end
  1034. if hit and hit.Parent==workspace.Terrain or hit==workspace.Terrain and parti/8==math.floor(parti/8) then
  1035. e=Instance.new('Explosion',workspace)
  1036. e.Position=pos
  1037. e.BlastRadius=14
  1038. e.BlastPressure=1e4
  1039. end
  1040. if hit and not hit.Anchored and not (hit:GetMass()>1e4) then
  1041. hit.Velocity=hit.Velocity+beam.CFrame.lookVector*(1*s1.Volume*hit:GetMass())
  1042. end
  1043.  
  1044. if parti==math.floor(parti) then
  1045. par=part:Clone()
  1046. table.insert(particles,par)
  1047. par.Parent=beamm
  1048. par.Transparency=1-s1.Volume
  1049. par.light.Range=br*s1.Volume
  1050. par.CFrame=cf(pos)*ang(math.random(-180,180),math.random(-180,180),math.random(-180,180))*cf(0,0,-10)
  1051. end
  1052.  
  1053. mag=((wep.CFrame*cf(0,-1.5,0)).p-pos).magnitude
  1054. ms.Scale=v3(s1.Volume,s1.Volume,mag)
  1055. ms2.Scale=v3(ms.Scale.x/2,ms.Scale.y/2,mag-(.1/mag))
  1056. beam.CFrame=cf((wep.CFrame*cf(0,-1.5,0)).p,pos)*cf(0,0,-mag/2)*ang(0,0,math.random(0,180))
  1057. inner.CFrame=beam.CFrame
  1058. pl.Range=br*s1.Volume
  1059. pl2.Range=br*s1.Volume
  1060. expl.Size=v3(math.random(9,13),math.random(9,13),math.random(9,13))*s1.Volume
  1061. expl.Transparency=math.random(40,60)/100
  1062. expl.CFrame=cf(pos)*ang(math.random(0,180),math.random(0,180),math.random(0,180))
  1063. exa.Size=v3(4,4,4)*s1.Volume
  1064. exa.CFrame=wep.CFrame*cf(0,-1.5,0)*ang(math.random(0,180),math.random(0,180),math.random(0,180))
  1065. char.Torso.Velocity=char.Torso.Velocity-beam.CFrame.lookVector*(7*s1.Volume)
  1066. end
  1067. end)
  1068. end
  1069. end)
  1070.  
  1071. InputService.InputChanged:connect(MouseMoved)
  1072.  
  1073. Neck.C1=cf()
  1074.  
  1075. local _
  1076. local DirectionBound=3.14159/3
  1077. local CurrentAngY=0
  1078.  
  1079. local function CameraUpdate()
  1080. Camera.CameraType="Scriptable"
  1081. local cx,cz=CameraDirection.x,CameraDirection.z
  1082. local rvx,rvz=RootPart.Velocity.x,RootPart.Velocity.z
  1083. if rvx*rvx+rvz*rvz>4 and cx*rvx+cz*rvz<-0.5*(cx*cx+cz*cz)^0.5*(rvx*rvx+rvz*rvz)^0.5 then
  1084. DirectionBound=math.min(DirectionBound*0.9,math.abs(CurrentAngY*0.9))
  1085. else
  1086. DirectionBound=DirectionBound*0.1+3.14159/3*0.9
  1087. end
  1088. local AngX,AngY=EulerAnglesYX((RootPart.CFrame-RootPart.Position):inverse()*CameraDirection)
  1089. if AngY>DirectionBound then
  1090. RootPart.CFrame=RootPart.CFrame*CFrame.Angles(0,AngY-DirectionBound,0)
  1091. elseif AngY<-DirectionBound then
  1092. RootPart.CFrame=RootPart.CFrame*CFrame.Angles(0,AngY+DirectionBound,0)
  1093. end
  1094. _,CurrentAngY=EulerAnglesYX((RootPart.CFrame-RootPart.Position):inverse()*CameraDirection)
  1095. local CameraOrientation=AxisAngleLookNew((RootPart.CFrame-RootPart.Position):inverse()*CameraDirection,1)
  1096. Neck.C0=CFrame.new(0,1,0)*CameraOrientation*CFrame.new(0,0.5,0)
  1097. local PreCam=AxisAngleLook(RootPart.CFrame*cf(0,1,0),RootPart.CFrame*v3(0,1,0)+CameraDirection)*CFrame.new(0,0.825,0)
  1098. if Zoom== 3 then
  1099. local Part,Position=Workspace:findPartOnRay(Ray.new(PreCam.p,PreCam.lookVector*-8),Character)
  1100. Camera.CoordinateFrame=PreCam*CFrame.new(0,0,(Position-PreCam.p).magnitude)
  1101. else
  1102. Camera.CoordinateFrame=PreCam*CFrame.new(0,0,Zoom)
  1103. end
  1104. end
  1105.  
  1106. game:GetService("RunService").RenderStepped:connect(CameraUpdate)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement