Advertisement
memberhero

Tower Battles Flame Thrower Script FE

Feb 22nd, 2019
486
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 77.88 KB | None | 0 0
  1. warn("Converted To FE By basstracker1970")
  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 = owner
  4. local Mouse,mouse,UserInputService,ContextActionService
  5. do
  6. script.Parent = RhiBel00351
  7. local CAS = {Actions={}}
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10. Event.Parent = Player.Character
  11. local fakeEvent = function()
  12. local t = {_fakeEvent=true}
  13. t.Connect = function(self,f)self.Function=f end
  14. t.connect = t.Connect
  15. return t
  16. end
  17. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  18. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  19. function CAS:BindAction(name,fun,touch,...)
  20. CAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
  21. end
  22. function CAS:UnbindAction(name)
  23. CAS.Actions[name] = nil
  24. end
  25. local function te(self,ev,...)
  26. local t = m[ev]
  27. if t and t._fakeEvent and t.Function then
  28. t.Function(...)
  29. end
  30. end
  31. m.TrigEvent = te
  32. UIS.TrigEvent = te
  33. Event.OnServerEvent:Connect(function(plr,io)
  34. if plr~=Player then return end
  35. if io.isMouse then
  36. m.Target = io.Target
  37. m.Hit = io.Hit
  38. elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
  39. if io.UserInputState == Enum.UserInputState.Begin then
  40. m:TrigEvent("Button1Down")
  41. else
  42. m:TrigEvent("Button1Up")
  43. end
  44. else
  45. for n,t in pairs(CAS.Actions) do
  46. for _,k in pairs(t.Keys) do
  47. if k==io.KeyCode then
  48. t.Function(t.Name,io.UserInputState,io)
  49. end
  50. end
  51. end
  52. if io.UserInputState == Enum.UserInputState.Begin then
  53. m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
  54. UIS:TrigEvent("InputBegan",io,false)
  55. else
  56. m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
  57. UIS:TrigEvent("InputEnded",io,false)
  58. end
  59. end
  60. end)
  61. NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63.  
  64. local Char = Player.Character
  65. local Event = Char:WaitForChild("UserInput_Event")
  66.  
  67. local UIS = game:GetService("UserInputService")
  68.  
  69. local input = function(io,a)
  70. if a then return end
  71. local io = {KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}
  72. Event:FireServer(io)
  73. end
  74. UIS.InputBegan:Connect(input)
  75. UIS.InputEnded:Connect(input)
  76. local Changed = false
  77. local Mouse = Player:GetMouse()
  78. local h,t = Mouse.Hit,Mouse.Target
  79. while wait(1/30) do
  80. if h~=Mouse.Hit or t~=Mouse.Target then
  81. Event:FireServer({isMouse=true,Target=Mouse.Target,Hit=Mouse.Hit})
  82. h,t=Mouse.Hit,Mouse.Target
  83. end
  84. end
  85. ]==],Player.Character)
  86. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  87. end
  88.  
  89.  
  90.  
  91.  
  92.  
  93. function sandbox(var,func)
  94. local env = getfenv(func)
  95. local newenv = setmetatable({},{
  96. __index = function(self,k)
  97. if k=="script" then
  98. return var
  99. else
  100. return env[k]
  101. end
  102. end,
  103. })
  104. setfenv(func,newenv)
  105. return func
  106. end
  107. cors = {}
  108. mas = Instance.new("Model",game:GetService("Lighting"))
  109. Folder0 = Instance.new("Folder")
  110. LocalScript1 = Instance.new("LocalScript")
  111. LocalScript2 = Instance.new("LocalScript")
  112. IntValue3 = Instance.new("IntValue")
  113. IntValue4 = Instance.new("IntValue")
  114. Part5 = Instance.new("Part")
  115. ParticleEmitter6 = Instance.new("ParticleEmitter")
  116. ParticleEmitter7 = Instance.new("ParticleEmitter")
  117. ParticleEmitter8 = Instance.new("ParticleEmitter")
  118. ObjectValue9 = Instance.new("ObjectValue")
  119. Model10 = Instance.new("Model")
  120. Model11 = Instance.new("Model")
  121. Part12 = Instance.new("Part")
  122. SpecialMesh13 = Instance.new("SpecialMesh")
  123. Part14 = Instance.new("Part")
  124. SpecialMesh15 = Instance.new("SpecialMesh")
  125. Model16 = Instance.new("Model")
  126. MeshPart17 = Instance.new("MeshPart")
  127. ManualWeld18 = Instance.new("ManualWeld")
  128. Model19 = Instance.new("Model")
  129. MeshPart20 = Instance.new("MeshPart")
  130. ManualWeld21 = Instance.new("ManualWeld")
  131. Model22 = Instance.new("Model")
  132. Part23 = Instance.new("Part")
  133. SpecialMesh24 = Instance.new("SpecialMesh")
  134. Part25 = Instance.new("Part")
  135. SpecialMesh26 = Instance.new("SpecialMesh")
  136. UnionOperation27 = Instance.new("UnionOperation")
  137. Part28 = Instance.new("Part")
  138. MeshPart29 = Instance.new("MeshPart")
  139. Model30 = Instance.new("Model")
  140. MeshPart31 = Instance.new("MeshPart")
  141. Model32 = Instance.new("Model")
  142. MeshPart33 = Instance.new("MeshPart")
  143. Model34 = Instance.new("Model")
  144. Part35 = Instance.new("Part")
  145. Part36 = Instance.new("Part")
  146. Part37 = Instance.new("Part")
  147. ParticleEmitter38 = Instance.new("ParticleEmitter")
  148. ParticleEmitter39 = Instance.new("ParticleEmitter")
  149. Part40 = Instance.new("Part")
  150. Part41 = Instance.new("Part")
  151. Part42 = Instance.new("Part")
  152. UnionOperation43 = Instance.new("UnionOperation")
  153. Part44 = Instance.new("Part")
  154. ParticleEmitter45 = Instance.new("ParticleEmitter")
  155. ParticleEmitter46 = Instance.new("ParticleEmitter")
  156. Folder0.Name = "Effects"
  157. Folder0.Parent = mas
  158. LocalScript1.Name = "Stunner"
  159. LocalScript1.Parent = Folder0
  160. table.insert(cors,sandbox(LocalScript1,function()
  161. local me = game:service'Players'.localPlayer;
  162. local ch = me.Character;
  163.  
  164. local AHB = Instance.new("BindableEvent")
  165.  
  166. local FPS = 120
  167.  
  168. local TimeFrame = 0
  169.  
  170. local LastFrame = tick()
  171. local Frame = 1/FPS
  172.  
  173. game:service'RunService'.Heartbeat:connect(function(s,p)
  174. TimeFrame = TimeFrame + s
  175. if(TimeFrame >= Frame)then
  176. for i = 1,math.floor(TimeFrame/Frame) do
  177. AHB:Fire()
  178. end
  179. LastFrame=tick()
  180. TimeFrame=TimeFrame-Frame*math.floor(TimeFrame/Frame)
  181. end
  182. end)
  183.  
  184.  
  185. function swait(dur)
  186. if(dur == 0 or typeof(dur) ~= 'number')then
  187. AHB.Event:wait()
  188. else
  189. for i = 1, dur*FPS do
  190. AHB.Event:wait()
  191. end
  192. end
  193. end
  194.  
  195. local mc = require(me:WaitForChild'PlayerScripts':WaitForChild'ControlScript':WaitForChild'MasterControl')
  196. repeat swait() until mc and mc.ControlState;
  197.  
  198. mc:Disable()
  199.  
  200. repeat swait() until ch:FindFirstChild'ResumeControl'
  201. ch.ResumeControl:destroy()
  202. mc:Enable()
  203. script:destroy()
  204. end))
  205. LocalScript1.Disabled = true
  206. LocalScript2.Name = "CamShake"
  207. LocalScript2.Parent = Folder0
  208. table.insert(cors,sandbox(LocalScript2,function()
  209. local me = game:service'Players'.localPlayer
  210. local ch = me.Character
  211. local hum = ch:FindFirstChildOfClass'Humanoid'
  212.  
  213. local times = script:WaitForChild'times'.Value
  214. local intense = script:WaitForChild'intensity'.Value
  215. local origin
  216.  
  217.  
  218. coroutine.wrap(function()
  219. if(script:WaitForChild'origin')then
  220. origin = script:WaitForChild'origin'.Value
  221. end
  222. end)()
  223.  
  224. local cam = workspace.CurrentCamera
  225. local intensity = intense
  226.  
  227. local ArtificialHB = Instance.new("BindableEvent", script)
  228. ArtificialHB.Name = "Heartbeat"
  229.  
  230. script:WaitForChild("Heartbeat")
  231.  
  232. local tf = 0
  233. local allowframeloss = false
  234. local tossremainder = false
  235. local lastframe = tick()
  236. local frame = 1/60
  237. ArtificialHB:Fire()
  238.  
  239. game:GetService("RunService").Heartbeat:connect(function(s, p)
  240. tf = tf + s
  241. if tf >= frame then
  242. if allowframeloss then
  243. script.Heartbeat:Fire()
  244. lastframe = tick()
  245. else
  246. for i = 1, math.floor(tf / frame) do
  247. ArtificialHB:Fire()
  248. end
  249. lastframe = tick()
  250. end
  251. if tossremainder then
  252. tf = 0
  253. else
  254. tf = tf - frame * math.floor(tf / frame)
  255. end
  256. end
  257. end)
  258.  
  259. function swait(num)
  260. if num == 0 or num == nil then
  261. ArtificialHB.Event:wait()
  262. else
  263. for i = 0, num do
  264. ArtificialHB.Event:wait()
  265. end
  266. end
  267. end
  268.  
  269. if(hum and not hum:FindFirstChild'CamShaking')then
  270. local cam = workspace.CurrentCamera
  271. local oCO = hum.CameraOffset
  272. local cs = Instance.new("BoolValue",hum)
  273. cs.Name = "CamShaking"
  274. for i = 1, times do
  275. local camDistFromOrigin
  276. if(typeof(origin) == 'Instance' and origin:IsA'BasePart')then
  277. camDistFromOrigin = math.floor( (cam.CoordinateFrame.p-origin.Position).magnitude )/25
  278. elseif(typeof(origin) == 'Vector3')then
  279. camDistFromOrigin = math.floor( (cam.CoordinateFrame.p-origin).magnitude )/25
  280. end
  281. if(camDistFromOrigin)then
  282. intensity = math.min(intense, math.floor(intense/camDistFromOrigin))
  283. end
  284. --cam.CoordinateFrame = cam.CoordinateFrame*CFrame.fromEulerAnglesXYZ(math.random(-intensity,intensity)/200,math.random(-intensity,intensity)/200,math.random(-intensity,intensity)/200)
  285. if(hum)then
  286. hum.CameraOffset = Vector3.new(math.random(-intensity,intensity)/200,math.random(-intensity,intensity)/200,math.random(-intensity,intensity)/200)
  287. end
  288. swait()
  289. end
  290. if(hum)then
  291. hum.CameraOffset = oCO
  292. end
  293. cs:destroy()
  294. end
  295. script:Destroy()
  296. end))
  297. LocalScript2.Disabled = true
  298. IntValue3.Name = "intensity"
  299. IntValue3.Parent = LocalScript2
  300. IntValue3.Value = 16
  301. IntValue4.Name = "times"
  302. IntValue4.Parent = LocalScript2
  303. IntValue4.Value = 5
  304. Part5.Name = "AttEffects"
  305. Part5.Parent = Folder0
  306. Part5.CFrame = CFrame.new(-17.5045242, 18.0028343, -3.25640607, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  307. Part5.Position = Vector3.new(-17.5045242, 18.0028343, -3.25640607)
  308. Part5.Transparency = 1
  309. Part5.Size = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
  310. Part5.Anchored = true
  311. Part5.BottomSurface = Enum.SurfaceType.Smooth
  312. Part5.CanCollide = false
  313. Part5.TopSurface = Enum.SurfaceType.Smooth
  314. ParticleEmitter6.Name = "StunParticles"
  315. ParticleEmitter6.Parent = mas
  316. ParticleEmitter6.Speed = NumberRange.new(1, 1)
  317. ParticleEmitter6.Color = ColorSequence.new(Color3.new(1, 0.941176, 0.294118),Color3.new(1, 0.941176, 0.294118))
  318. ParticleEmitter6.LightEmission = 0.30000001192093
  319. ParticleEmitter6.LightInfluence = 3
  320. ParticleEmitter6.Texture = "rbxassetid://82057200"
  321. ParticleEmitter6.Transparency = NumberSequence.new(0,0,1)
  322. ParticleEmitter6.ZOffset = 1
  323. ParticleEmitter6.Size = NumberSequence.new(0,0.20000000298023,0,0.20000000298023,0,0.20000000298023,0)
  324. ParticleEmitter6.Drag = 1
  325. ParticleEmitter6.Lifetime = NumberRange.new(3, 3)
  326. ParticleEmitter6.LockedToPart = true
  327. ParticleEmitter6.Rate = 3
  328. ParticleEmitter6.SpreadAngle = Vector2.new(-360, 360)
  329. ParticleEmitter6.VelocitySpread = -360
  330. ParticleEmitter7.Name = "Fire"
  331. ParticleEmitter7.Parent = mas
  332. ParticleEmitter7.Speed = NumberRange.new(7, 7)
  333. ParticleEmitter7.Rotation = NumberRange.new(0, 180)
  334. ParticleEmitter7.Color = ColorSequence.new(Color3.new(1, 1, 0),Color3.new(1, 0, 0))
  335. ParticleEmitter7.LightEmission = 1
  336. ParticleEmitter7.LightInfluence = 1
  337. ParticleEmitter7.Texture = "rbxassetid://744949545"
  338. ParticleEmitter7.Transparency = NumberSequence.new(0.40000000596046,0.40000000596046)
  339. ParticleEmitter7.ZOffset = 0.5
  340. ParticleEmitter7.Size = NumberSequence.new(1,0)
  341. ParticleEmitter7.Lifetime = NumberRange.new(0.5, 0.75)
  342. ParticleEmitter7.Rate = 40
  343. ParticleEmitter7.RotSpeed = NumberRange.new(5, 5)
  344. ParticleEmitter8.Name = "Smoke"
  345. ParticleEmitter8.Parent = mas
  346. ParticleEmitter8.Speed = NumberRange.new(6, 9)
  347. ParticleEmitter8.Rotation = NumberRange.new(0, 180)
  348. ParticleEmitter8.Color = ColorSequence.new(Color3.new(0, 0, 0),Color3.new(0, 0, 0))
  349. ParticleEmitter8.LightInfluence = 1
  350. ParticleEmitter8.Texture = "rbxassetid://744949545"
  351. ParticleEmitter8.Transparency = NumberSequence.new(0.94999998807907,0.94999998807907)
  352. ParticleEmitter8.Size = NumberSequence.new(1,0)
  353. ParticleEmitter8.Lifetime = NumberRange.new(1.5, 1.75)
  354. ParticleEmitter8.Rate = 5
  355. ParticleEmitter8.RotSpeed = NumberRange.new(5, 5)
  356. ParticleEmitter8.SpreadAngle = Vector2.new(15, 15)
  357. ParticleEmitter8.VelocitySpread = 15
  358. ObjectValue9.Name = "Owner"
  359. ObjectValue9.Parent = mas
  360. Model10.Name = "Morph"
  361. Model10.Parent = mas
  362. Model11.Name = "Head"
  363. Model11.Parent = Model10
  364. Model11.PrimaryPart = Part12
  365. Part12.Name = "Hed"
  366. Part12.Parent = Model11
  367. Part12.CFrame = CFrame.new(23.8595657, 34.4437294, -102.793518, 1, 1.28808075e-12, -8.74227766e-08, 1.28808075e-12, 1, 0, 8.74227766e-08, 1.12607599e-19, 1)
  368. Part12.Position = Vector3.new(23.8595657, 34.4437294, -102.793518)
  369. Part12.Color = Color3.new(0.627451, 0.372549, 0.207843)
  370. Part12.Size = Vector3.new(2, 1, 1)
  371. Part12.Anchored = true
  372. Part12.BottomSurface = Enum.SurfaceType.Weld
  373. Part12.BrickColor = BrickColor.new("Dark orange")
  374. Part12.CanCollide = false
  375. Part12.Material = Enum.Material.SmoothPlastic
  376. Part12.TopSurface = Enum.SurfaceType.Smooth
  377. Part12.brickColor = BrickColor.new("Dark orange")
  378. Part12.FormFactor = Enum.FormFactor.Symmetric
  379. Part12.formFactor = Enum.FormFactor.Symmetric
  380. SpecialMesh13.Parent = Part12
  381. SpecialMesh13.Scale = Vector3.new(1.25, 1.25, 1.25)
  382. Part14.Name = "Handle"
  383. Part14.Parent = Model11
  384. Part14.CFrame = CFrame.new(23.8344746, 34.436985, -102.76841, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  385. Part14.Position = Vector3.new(23.8344746, 34.436985, -102.76841)
  386. Part14.Color = Color3.new(0.960784, 0.803922, 0.188235)
  387. Part14.Size = Vector3.new(1, 0.800000012, 1)
  388. Part14.Anchored = true
  389. Part14.BottomSurface = Enum.SurfaceType.Smooth
  390. Part14.BrickColor = BrickColor.new("Bright yellow")
  391. Part14.CanCollide = false
  392. Part14.TopSurface = Enum.SurfaceType.Smooth
  393. Part14.brickColor = BrickColor.new("Bright yellow")
  394. Part14.FormFactor = Enum.FormFactor.Plate
  395. Part14.formFactor = Enum.FormFactor.Plate
  396. SpecialMesh15.Parent = Part14
  397. SpecialMesh15.MeshId = "http://www.roblox.com/asset/?id=1286427"
  398. SpecialMesh15.Scale = Vector3.new(1.10000002, 1.10000002, 1.10000002)
  399. SpecialMesh15.MeshType = Enum.MeshType.FileMesh
  400. Model16.Name = "Left Arm"
  401. Model16.Parent = Model10
  402. Model16.PrimaryPart = MeshPart17
  403. MeshPart17.Name = "bevel"
  404. MeshPart17.Parent = Model16
  405. MeshPart17.CFrame = CFrame.new(25.3344765, 32.9369698, -102.76841, -1, 0, 8.74227766e-08, 0, 1, 0, -8.74227766e-08, 0, -1)
  406. MeshPart17.Orientation = Vector3.new(0, 180, 0)
  407. MeshPart17.Position = Vector3.new(25.3344765, 32.9369698, -102.76841)
  408. MeshPart17.Rotation = Vector3.new(-180, 0, -180)
  409. MeshPart17.Color = Color3.new(0.627451, 0.372549, 0.207843)
  410. MeshPart17.Size = Vector3.new(1.04999995, 2.04999995, 1.04999995)
  411. MeshPart17.Anchored = true
  412. MeshPart17.BrickColor = BrickColor.new("Dark orange")
  413. MeshPart17.CanCollide = false
  414. MeshPart17.brickColor = BrickColor.new("Dark orange")
  415. ManualWeld18.Name = "bevel-to-bevel Strong Joint"
  416. ManualWeld18.Parent = MeshPart17
  417. ManualWeld18.C0 = CFrame.new(-0.527363181, 1.00450194, 0.527363181, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  418. ManualWeld18.C1 = CFrame.new(-1.02961421, -1.00450194, 0.527363181, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  419. ManualWeld18.Part0 = MeshPart17
  420. Model19.Name = "Right Arm"
  421. Model19.Parent = Model10
  422. Model19.PrimaryPart = MeshPart20
  423. MeshPart20.Name = "bevel"
  424. MeshPart20.Parent = Model19
  425. MeshPart20.CFrame = CFrame.new(22.2774963, 32.9369698, -102.818634, -1, 0, 8.74227766e-08, 0, 1, 0, -8.74227766e-08, 0, -1)
  426. MeshPart20.Orientation = Vector3.new(0, 180, 0)
  427. MeshPart20.Position = Vector3.new(22.2774963, 32.9369698, -102.818634)
  428. MeshPart20.Rotation = Vector3.new(-180, 0, -180)
  429. MeshPart20.Color = Color3.new(0.627451, 0.372549, 0.207843)
  430. MeshPart20.Size = Vector3.new(1.04999995, 2.04999995, 1.04999995)
  431. MeshPart20.Anchored = true
  432. MeshPart20.BrickColor = BrickColor.new("Dark orange")
  433. MeshPart20.CanCollide = false
  434. MeshPart20.brickColor = BrickColor.new("Dark orange")
  435. ManualWeld21.Name = "bevel-to-bevel Strong Joint"
  436. ManualWeld21.Parent = MeshPart20
  437. ManualWeld21.C0 = CFrame.new(-0.527363181, 1.00450194, 0.527363181, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  438. ManualWeld21.C1 = CFrame.new(-1.02961421, -1.00450194, 0.527363181, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  439. ManualWeld21.Part0 = MeshPart20
  440. Model22.Name = "Torso"
  441. Model22.Parent = Model10
  442. Model22.PrimaryPart = Part28
  443. Part23.Parent = Model22
  444. Part23.CFrame = CFrame.new(24.1899109, 32.8678398, -103.750648, 1, -7.31560067e-05, 4.46308768e-05, 7.31612745e-05, 1, -0.000118027732, -4.46230588e-05, 0.000118030999, 1)
  445. Part23.Orientation = Vector3.new(0.00999999978, 0, 0)
  446. Part23.Position = Vector3.new(24.1899109, 32.8678398, -103.750648)
  447. Part23.Rotation = Vector3.new(0.00999999978, 0, 0)
  448. Part23.Color = Color3.new(0.105882, 0.164706, 0.207843)
  449. Part23.Size = Vector3.new(1.12903154, 2.54032135, 1.12903154)
  450. Part23.Anchored = true
  451. Part23.BottomSurface = Enum.SurfaceType.Smooth
  452. Part23.BrickColor = BrickColor.new("Black")
  453. Part23.CanCollide = false
  454. Part23.Material = Enum.Material.Metal
  455. Part23.TopSurface = Enum.SurfaceType.Smooth
  456. Part23.brickColor = BrickColor.new("Black")
  457. Part23.Shape = Enum.PartType.Cylinder
  458. SpecialMesh24.Parent = Part23
  459. Part25.Parent = Model22
  460. Part25.CFrame = CFrame.new(23.3427925, 32.8678055, -103.750153, 1, -7.31560067e-05, 4.46308768e-05, 7.31612745e-05, 1, -0.000118027732, -4.46230588e-05, 0.000118030999, 1)
  461. Part25.Orientation = Vector3.new(0.00999999978, 0, 0)
  462. Part25.Position = Vector3.new(23.3427925, 32.8678055, -103.750153)
  463. Part25.Rotation = Vector3.new(0.00999999978, 0, 0)
  464. Part25.Color = Color3.new(0.105882, 0.164706, 0.207843)
  465. Part25.Size = Vector3.new(1.12903154, 2.54032135, 1.12903154)
  466. Part25.Anchored = true
  467. Part25.BottomSurface = Enum.SurfaceType.Smooth
  468. Part25.BrickColor = BrickColor.new("Black")
  469. Part25.CanCollide = false
  470. Part25.Material = Enum.Material.Metal
  471. Part25.TopSurface = Enum.SurfaceType.Smooth
  472. Part25.brickColor = BrickColor.new("Black")
  473. Part25.Shape = Enum.PartType.Cylinder
  474. SpecialMesh26.Parent = Part25
  475. UnionOperation27.Parent = Model22
  476. UnionOperation27.CFrame = CFrame.new(23.767065, 32.8755302, -103.743546, -6.63330429e-05, 4.32912348e-05, 1, 1, -0.000115028255, 6.63380197e-05, 0.000115031136, 1, -4.32844136e-05)
  477. UnionOperation27.Orientation = Vector3.new(0, 90, 90.0100021)
  478. UnionOperation27.Position = Vector3.new(23.767065, 32.8755302, -103.743546)
  479. UnionOperation27.Rotation = Vector3.new(90.0100021, 90, 0)
  480. UnionOperation27.Color = Color3.new(0.388235, 0.372549, 0.384314)
  481. UnionOperation27.Size = Vector3.new(0.297571123, 1.14352238, 1.97580874)
  482. UnionOperation27.Anchored = true
  483. UnionOperation27.BrickColor = BrickColor.new("Dark stone grey")
  484. UnionOperation27.CanCollide = false
  485. UnionOperation27.Material = Enum.Material.DiamondPlate
  486. UnionOperation27.brickColor = BrickColor.new("Dark stone grey")
  487. Part28.Name = "Body"
  488. Part28.Parent = Model22
  489. Part28.CFrame = CFrame.new(23.8344746, 32.9369698, -102.76841, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1)
  490. Part28.Orientation = Vector3.new(0, -180, 0)
  491. Part28.Position = Vector3.new(23.8344746, 32.9369698, -102.76841)
  492. Part28.Rotation = Vector3.new(-180, 0, -180)
  493. Part28.Transparency = 1
  494. Part28.Size = Vector3.new(2.04999995, 2.04999995, 1.04999995)
  495. Part28.Anchored = true
  496. Part28.BottomSurface = Enum.SurfaceType.Smooth
  497. Part28.CanCollide = false
  498. Part28.TopSurface = Enum.SurfaceType.Smooth
  499. MeshPart29.Name = "bevel"
  500. MeshPart29.Parent = Model22
  501. MeshPart29.CFrame = CFrame.new(23.8344746, 32.9369698, -102.76841, -1, 0, 8.74227766e-08, 0, 1, 0, -8.74227766e-08, 0, -1)
  502. MeshPart29.Orientation = Vector3.new(0, 180, 0)
  503. MeshPart29.Position = Vector3.new(23.8344746, 32.9369698, -102.76841)
  504. MeshPart29.Rotation = Vector3.new(-180, 0, -180)
  505. MeshPart29.Color = Color3.new(0.960784, 0.803922, 0.188235)
  506. MeshPart29.Size = Vector3.new(2, 2, 1)
  507. MeshPart29.Anchored = true
  508. MeshPart29.BrickColor = BrickColor.new("Bright yellow")
  509. MeshPart29.CanCollide = false
  510. MeshPart29.brickColor = BrickColor.new("Bright yellow")
  511. Model30.Name = "Right Leg"
  512. Model30.Parent = Model10
  513. Model30.PrimaryPart = MeshPart31
  514. MeshPart31.Name = "bevel"
  515. MeshPart31.Parent = Model30
  516. MeshPart31.CFrame = CFrame.new(23.3344746, 30.9369736, -102.76841, -1, 0, 8.74227766e-08, 0, 1, 0, -8.74227766e-08, 0, -1)
  517. MeshPart31.Orientation = Vector3.new(0, 180, 0)
  518. MeshPart31.Position = Vector3.new(23.3344746, 30.9369736, -102.76841)
  519. MeshPart31.Rotation = Vector3.new(-180, 0, -180)
  520. MeshPart31.Color = Color3.new(0.960784, 0.803922, 0.188235)
  521. MeshPart31.Size = Vector3.new(1.04999995, 2.04999995, 1.04999995)
  522. MeshPart31.Anchored = true
  523. MeshPart31.BrickColor = BrickColor.new("Bright yellow")
  524. MeshPart31.CanCollide = false
  525. MeshPart31.brickColor = BrickColor.new("Bright yellow")
  526. Model32.Name = "Left Leg"
  527. Model32.Parent = Model10
  528. Model32.PrimaryPart = MeshPart33
  529. MeshPart33.Name = "bevel"
  530. MeshPart33.Parent = Model32
  531. MeshPart33.CFrame = CFrame.new(24.3344746, 30.9369736, -102.76841, -1, 0, 8.74227766e-08, 0, 1, 0, -8.74227766e-08, 0, -1)
  532. MeshPart33.Orientation = Vector3.new(0, 180, 0)
  533. MeshPart33.Position = Vector3.new(24.3344746, 30.9369736, -102.76841)
  534. MeshPart33.Rotation = Vector3.new(-180, 0, -180)
  535. MeshPart33.Color = Color3.new(0.960784, 0.803922, 0.188235)
  536. MeshPart33.Size = Vector3.new(1.04999995, 2.04999995, 1.04999995)
  537. MeshPart33.Anchored = true
  538. MeshPart33.BrickColor = BrickColor.new("Bright yellow")
  539. MeshPart33.CanCollide = false
  540. MeshPart33.brickColor = BrickColor.new("Bright yellow")
  541. Model34.Name = "Weapon"
  542. Model34.Parent = mas
  543. Model34.PrimaryPart = Part35
  544. Part35.Parent = Model34
  545. Part35.CFrame = CFrame.new(19.6236935, 0.917670012, -104.200409, -7.33504858e-05, 8.93371762e-05, -1, -3.39378967e-05, -1, -8.93346878e-05, -1, 3.39313447e-05, 7.33535198e-05)
  546. Part35.Orientation = Vector3.new(0.00999999978, -90, -180)
  547. Part35.Position = Vector3.new(19.6236935, 0.917670012, -104.200409)
  548. Part35.Rotation = Vector3.new(180, -90, 0)
  549. Part35.Color = Color3.new(0.105882, 0.164706, 0.207843)
  550. Part35.Size = Vector3.new(2.71815777, 0.374918312, 0.374918312)
  551. Part35.Anchored = true
  552. Part35.BottomSurface = Enum.SurfaceType.Smooth
  553. Part35.BrickColor = BrickColor.new("Black")
  554. Part35.Material = Enum.Material.SmoothPlastic
  555. Part35.TopSurface = Enum.SurfaceType.Smooth
  556. Part35.brickColor = BrickColor.new("Black")
  557. Part35.Shape = Enum.PartType.Cylinder
  558. Part36.Parent = Model34
  559. Part36.CFrame = CFrame.new(19.620554, 0.962167978, -102.711288, -7.33504858e-05, 8.93371762e-05, -1, -3.39378967e-05, -1, -8.93346878e-05, -1, 3.39313447e-05, 7.33535198e-05)
  560. Part36.Orientation = Vector3.new(0.00999999978, -90, -180)
  561. Part36.Position = Vector3.new(19.620554, 0.962167978, -102.711288)
  562. Part36.Rotation = Vector3.new(180, -90, 0)
  563. Part36.Color = Color3.new(0.105882, 0.164706, 0.207843)
  564. Part36.Size = Vector3.new(1.30459833, 0.492878199, 0.492878199)
  565. Part36.Anchored = true
  566. Part36.BottomSurface = Enum.SurfaceType.Smooth
  567. Part36.BrickColor = BrickColor.new("Black")
  568. Part36.Material = Enum.Material.SmoothPlastic
  569. Part36.TopSurface = Enum.SurfaceType.Smooth
  570. Part36.brickColor = BrickColor.new("Black")
  571. Part36.Shape = Enum.PartType.Cylinder
  572. Part37.Name = "EmitPart"
  573. Part37.Parent = Model34
  574. Part37.CFrame = CFrame.new(19.6205025, 0.794982016, -101.947388, -2.59999943e-05, -5.39999855e-05, 1, 0.264050931, 0.964508772, 5.89487754e-05, -0.964508772, 0.264050931, -1.08184759e-05)
  575. Part37.Orientation = Vector3.new(0, 90, 15.3100004)
  576. Part37.Position = Vector3.new(19.6205025, 0.794982016, -101.947388)
  577. Part37.Rotation = Vector3.new(15.3100004, 90, 0)
  578. Part37.Color = Color3.new(0.105882, 0.164706, 0.207843)
  579. Part37.Transparency = 1
  580. Part37.Size = Vector3.new(0.200000003, 0.0714788586, 0.200000003)
  581. Part37.Anchored = true
  582. Part37.BottomSurface = Enum.SurfaceType.Smooth
  583. Part37.BrickColor = BrickColor.new("Black")
  584. Part37.Material = Enum.Material.SmoothPlastic
  585. Part37.TopSurface = Enum.SurfaceType.Smooth
  586. Part37.brickColor = BrickColor.new("Black")
  587. ParticleEmitter38.Name = "Smoke"
  588. ParticleEmitter38.Parent = Part37
  589. ParticleEmitter38.Speed = NumberRange.new(1, 1)
  590. ParticleEmitter38.Rotation = NumberRange.new(0, 180)
  591. ParticleEmitter38.Color = ColorSequence.new(Color3.new(0, 0, 0),Color3.new(0, 0, 0))
  592. ParticleEmitter38.LightInfluence = 1
  593. ParticleEmitter38.Texture = "rbxassetid://744949545"
  594. ParticleEmitter38.Transparency = NumberSequence.new(0.94999998807907,0.94999998807907)
  595. ParticleEmitter38.Size = NumberSequence.new(0.10000000149012,0)
  596. ParticleEmitter38.Lifetime = NumberRange.new(1.5, 1.5)
  597. ParticleEmitter38.Rate = 10
  598. ParticleEmitter38.RotSpeed = NumberRange.new(5, 5)
  599. ParticleEmitter39.Name = "Fire"
  600. ParticleEmitter39.Parent = Part37
  601. ParticleEmitter39.Speed = NumberRange.new(2, 2)
  602. ParticleEmitter39.Rotation = NumberRange.new(0, 180)
  603. ParticleEmitter39.Color = ColorSequence.new(Color3.new(1, 1, 0),Color3.new(1, 0, 0))
  604. ParticleEmitter39.LightEmission = 1
  605. ParticleEmitter39.LightInfluence = 1
  606. ParticleEmitter39.Texture = "rbxassetid://744949545"
  607. ParticleEmitter39.Transparency = NumberSequence.new(0.40000000596046,0.40000000596046)
  608. ParticleEmitter39.Size = NumberSequence.new(0.10000000149012,0)
  609. ParticleEmitter39.Lifetime = NumberRange.new(0.5, 0.5)
  610. ParticleEmitter39.Rate = 40
  611. ParticleEmitter39.RotSpeed = NumberRange.new(5, 5)
  612. Part40.Parent = Model34
  613. Part40.CFrame = CFrame.new(19.6241245, 0.917617977, -105.021797, -7.33504858e-05, 8.93371762e-05, -1, -3.39378967e-05, -1, -8.93346878e-05, -1, 3.39313447e-05, 7.33535198e-05)
  614. Part40.Orientation = Vector3.new(0.00999999978, -90, -180)
  615. Part40.Position = Vector3.new(19.6241245, 0.917617977, -105.021797)
  616. Part40.Rotation = Vector3.new(180, -90, 0)
  617. Part40.Color = Color3.new(0.105882, 0.164706, 0.207843)
  618. Part40.Size = Vector3.new(1.51940632, 0.463714749, 0.463714749)
  619. Part40.Anchored = true
  620. Part40.BottomSurface = Enum.SurfaceType.Smooth
  621. Part40.BrickColor = BrickColor.new("Black")
  622. Part40.Material = Enum.Material.SmoothPlastic
  623. Part40.TopSurface = Enum.SurfaceType.Smooth
  624. Part40.brickColor = BrickColor.new("Black")
  625. Part40.Shape = Enum.PartType.Cylinder
  626. Part41.Parent = Model34
  627. Part41.CFrame = CFrame.new(19.6490784, 0.421146005, -104.122437, -4.8024609e-05, -1, 0.000101357393, 0.923905492, -8.31516372e-05, -0.382620603, 0.382620603, 7.52694614e-05, 0.923905492)
  628. Part41.Orientation = Vector3.new(22.5, 0.00999999978, 90.0100021)
  629. Part41.Position = Vector3.new(19.6490784, 0.421146005, -104.122437)
  630. Part41.Rotation = Vector3.new(22.5, 0.00999999978, 90)
  631. Part41.Color = Color3.new(0.105882, 0.164706, 0.207843)
  632. Part41.Size = Vector3.new(0.739970267, 0.306347728, 0.414383441)
  633. Part41.Anchored = true
  634. Part41.BottomSurface = Enum.SurfaceType.Smooth
  635. Part41.BrickColor = BrickColor.new("Black")
  636. Part41.Material = Enum.Material.SmoothPlastic
  637. Part41.TopSurface = Enum.SurfaceType.Smooth
  638. Part41.brickColor = BrickColor.new("Black")
  639. Part42.Name = "Handle"
  640. Part42.Parent = Model34
  641. Part42.CFrame = CFrame.new(19.6485958, 0.493663996, -105.341827, -4.8024609e-05, -1, 0.000101357393, 0.923905492, -8.31516372e-05, -0.382620603, 0.382620603, 7.52694614e-05, 0.923905492)
  642. Part42.Orientation = Vector3.new(22.5, 0.00999999978, 90.0100021)
  643. Part42.Position = Vector3.new(19.6485958, 0.493663996, -105.341827)
  644. Part42.Rotation = Vector3.new(22.5, 0.00999999978, 90)
  645. Part42.Color = Color3.new(0.105882, 0.164706, 0.207843)
  646. Part42.Size = Vector3.new(0.739970267, 0.306347728, 0.414383441)
  647. Part42.Anchored = true
  648. Part42.BottomSurface = Enum.SurfaceType.Smooth
  649. Part42.BrickColor = BrickColor.new("Black")
  650. Part42.Material = Enum.Material.SmoothPlastic
  651. Part42.TopSurface = Enum.SurfaceType.Smooth
  652. Part42.brickColor = BrickColor.new("Black")
  653. UnionOperation43.Parent = Model34
  654. UnionOperation43.CFrame = CFrame.new(19.624157, 0.851100028, -103.712189, -7.33504858e-05, 8.93371762e-05, -1, -3.39378967e-05, -1, -8.93346878e-05, -1, 3.39313447e-05, 7.33535198e-05)
  655. UnionOperation43.Orientation = Vector3.new(0.00999999978, -90, -180)
  656. UnionOperation43.Position = Vector3.new(19.624157, 0.851100028, -103.712189)
  657. UnionOperation43.Rotation = Vector3.new(180, -90, 0)
  658. UnionOperation43.Color = Color3.new(0.388235, 0.372549, 0.384314)
  659. UnionOperation43.Size = Vector3.new(1.20862126, 0.419316828, 0.419317424)
  660. UnionOperation43.Anchored = true
  661. UnionOperation43.BrickColor = BrickColor.new("Dark stone grey")
  662. UnionOperation43.Material = Enum.Material.SmoothPlastic
  663. UnionOperation43.brickColor = BrickColor.new("Dark stone grey")
  664. Part44.Name = "EmitPart2"
  665. Part44.Parent = Model34
  666. Part44.CFrame = CFrame.new(19.6205025, 1.00648105, -101.946442, -4.37113883e-08, 0, 1, 0, 1, 0, -1, 0, -4.37113883e-08)
  667. Part44.Orientation = Vector3.new(0, 90, 0)
  668. Part44.Position = Vector3.new(19.6205025, 1.00648105, -101.946442)
  669. Part44.Rotation = Vector3.new(0, 90, 0)
  670. Part44.Color = Color3.new(0.105882, 0.164706, 0.207843)
  671. Part44.Transparency = 1
  672. Part44.Size = Vector3.new(0.200000003, 0.0714788586, 0.200000003)
  673. Part44.Anchored = true
  674. Part44.BottomSurface = Enum.SurfaceType.Smooth
  675. Part44.BrickColor = BrickColor.new("Black")
  676. Part44.Material = Enum.Material.SmoothPlastic
  677. Part44.TopSurface = Enum.SurfaceType.Smooth
  678. Part44.brickColor = BrickColor.new("Black")
  679. ParticleEmitter45.Name = "Fire"
  680. ParticleEmitter45.Parent = Part44
  681. ParticleEmitter45.Speed = NumberRange.new(7, 7)
  682. ParticleEmitter45.Rotation = NumberRange.new(0, 180)
  683. ParticleEmitter45.Color = ColorSequence.new(Color3.new(1, 1, 0),Color3.new(1, 0, 0))
  684. ParticleEmitter45.Enabled = false
  685. ParticleEmitter45.LightEmission = 1
  686. ParticleEmitter45.LightInfluence = 1
  687. ParticleEmitter45.Texture = "rbxassetid://744949545"
  688. ParticleEmitter45.Transparency = NumberSequence.new(0.40000000596046,0.40000000596046)
  689. ParticleEmitter45.Size = NumberSequence.new(0.46783626079559,0)
  690. ParticleEmitter45.Acceleration = Vector3.new(0, 3, 0)
  691. ParticleEmitter45.EmissionDirection = Enum.NormalId.Left
  692. ParticleEmitter45.Lifetime = NumberRange.new(1.2000000476837, 1.2000000476837)
  693. ParticleEmitter45.Rate = 60
  694. ParticleEmitter45.RotSpeed = NumberRange.new(5, 5)
  695. ParticleEmitter45.SpreadAngle = Vector2.new(5, 5)
  696. ParticleEmitter45.VelocitySpread = 5
  697. ParticleEmitter46.Name = "Smoke"
  698. ParticleEmitter46.Parent = Part44
  699. ParticleEmitter46.Speed = NumberRange.new(3, 8)
  700. ParticleEmitter46.Rotation = NumberRange.new(0, 180)
  701. ParticleEmitter46.Color = ColorSequence.new(Color3.new(0, 0, 0),Color3.new(0, 0, 0))
  702. ParticleEmitter46.Enabled = false
  703. ParticleEmitter46.LightInfluence = 1
  704. ParticleEmitter46.Texture = "rbxassetid://744949545"
  705. ParticleEmitter46.Transparency = NumberSequence.new(0.95999997854233,0.95999997854233)
  706. ParticleEmitter46.Size = NumberSequence.new(0.60000002384186,0)
  707. ParticleEmitter46.Acceleration = Vector3.new(0, 6, 0)
  708. ParticleEmitter46.EmissionDirection = Enum.NormalId.Left
  709. ParticleEmitter46.Lifetime = NumberRange.new(1.75, 5)
  710. ParticleEmitter46.Rate = 3
  711. ParticleEmitter46.RotSpeed = NumberRange.new(5, 5)
  712. ParticleEmitter46.SpreadAngle = Vector2.new(5, 5)
  713. ParticleEmitter46.VelocitySpread = 5
  714. for i,v in pairs(mas:GetChildren()) do
  715. v.Parent = script
  716. pcall(function() v:MakeJoints() end)
  717. end
  718. mas:Destroy()
  719. for i,v in pairs(cors) do
  720. spawn(function()
  721. pcall(v)
  722. end)
  723. end
  724. wait(1)
  725. -- Created by Nebula_Zorua --
  726. -- Flamethrower --
  727. -- Based on Tower Battles --
  728. -- Discord: Nebula the Zorua#6969
  729. -- Youtube: https://www.youtube.com/channel/UCo9oU9dCw8jnuVLuy4_SATA
  730.  
  731.  
  732.  
  733. --// Shortcut Variables \\--
  734. local S = setmetatable({},{__index = function(s,i) return game:service(i) end})
  735. local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
  736. local C3 = {tRGB= function(c3) return c3.r*255,c3.g*255,c3.b*255 end,N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV}
  737. local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis}
  738. local M = {C=math.cos,R=math.rad,S=math.sin,P=math.pi,RNG=math.random,MRS=math.randomseed,H=math.huge,RRNG = function(min,max,div) return math.rad(math.random(min,max)/(div or 1)) end}
  739. local R3 = {N=Region3.new}
  740. local De = S.Debris
  741. local WS = workspace
  742. local Lght = S.Lighting
  743. local RepS = S.ReplicatedStorage
  744. local IN = Instance.new
  745. local Plrs = S.Players
  746.  
  747. --// Initializing \\--
  748. local Plr = owner
  749. local Char = Plr.Character
  750. local Hum = Char:FindFirstChildOfClass'Humanoid'
  751. local RArm = Char["Right Arm"]
  752. local LArm = Char["Left Arm"]
  753. local RLeg = Char["Right Leg"]
  754. local LLeg = Char["Left Leg"]
  755. local Root = Char:FindFirstChild'HumanoidRootPart'
  756. local Morph = script:FindFirstChild'Morph'
  757. local Torso = Char.Torso
  758. local Head = Char.Head
  759. local NeutralAnims = true
  760. local Attack = false
  761. local Debounces = {Debounces={}}
  762. local Hit = {}
  763. local Sine = 0
  764. local Change = 1
  765. local BloodPuddles = {}
  766. local Stunned = {}
  767. local Burned = {}
  768. local FXFolder = script:FindFirstChild'Effects'
  769. FXFolder.Parent = nil
  770.  
  771. local Effects = IN("Folder",Char)
  772. Effects.Name = "Effects"
  773.  
  774.  
  775. --// Debounce System \\--
  776.  
  777.  
  778. function Debounces:New(name,cooldown)
  779. local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0}
  780. setmetatable(aaaaa,{__index = Debounces})
  781. Debounces.Debounces[name] = aaaaa
  782. return aaaaa
  783. end
  784.  
  785. function Debounces:Use(overrideUsable)
  786. assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  787. if(self.Usable or overrideUsable)then
  788. self.Usable = false
  789. self.CoolingDown = true
  790. local LastUse = time()
  791. self.LastUse = LastUse
  792. delay(self.Cooldown or 2,function()
  793. if(self.LastUse == LastUse)then
  794. self.CoolingDown = false
  795. self.Usable = true
  796. end
  797. end)
  798. end
  799. end
  800.  
  801. function Debounces:Get(name)
  802. assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name)))
  803. for i,v in next, Debounces.Debounces do
  804. if(i == name)then
  805. return v;
  806. end
  807. end
  808. end
  809.  
  810. function Debounces:GetProgressPercentage()
  811. assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  812. if(self.CoolingDown and not self.Usable)then
  813. return math.max(
  814. math.floor(
  815. (
  816. (time()-self.LastUse)/self.Cooldown or 2
  817. )*100
  818. )
  819. )
  820. else
  821. return 100
  822. end
  823. end
  824.  
  825. --// Instance Creation Functions \\--
  826. local baseSound = IN("Sound")
  827. function Sound(parent,id,pitch,volume,looped,effect,autoPlay)
  828. local Sound = baseSound:Clone()
  829. Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  830. Sound.Pitch = pitch or 1
  831. Sound.Volume = volume or 1
  832. Sound.Looped = looped or false
  833. if(autoPlay)then
  834. coroutine.wrap(function()
  835. repeat wait() until Sound.IsLoaded
  836. Sound.Playing = autoPlay or false
  837. end)()
  838. end
  839. if(not looped and effect)then
  840. Sound.Stopped:connect(function()
  841. Sound.Volume = 0
  842. Sound:destroy()
  843. end)
  844. elseif(effect)then
  845. warn("Sound can't be looped and a sound effect!")
  846. end
  847. Sound.Parent =parent or Torso
  848. return Sound
  849. end
  850. function Part(parent,color,material,size,cframe,anchored,cancollide)
  851. local part = IN("Part")
  852. part.Parent = parent or Char
  853. part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0)
  854. part.Material = material or Enum.Material.SmoothPlastic
  855. part.TopSurface,part.BottomSurface=10,10
  856. part.Size = size or V3.N(1,1,1)
  857. part.CFrame = cframe or CF.N(0,0,0)
  858. part.CanCollide = cancollide or false
  859. part.Anchored = anchored or false
  860. return part
  861. end
  862.  
  863. function Weld(part0,part1,c0,c1)
  864. local weld = IN("Weld")
  865. weld.Parent = part0
  866. weld.Part0 = part0
  867. weld.Part1 = part1
  868. weld.C0 = c0 or CF.N()
  869. weld.C1 = c1 or CF.N()
  870. return weld
  871. end
  872.  
  873. function Mesh(parent,meshtype,meshid,textid,scale,offset)
  874. local part = IN("SpecialMesh")
  875. part.MeshId = meshid or ""
  876. part.TextureId = textid or ""
  877. part.Scale = scale or V3.N(1,1,1)
  878. part.Offset = offset or V3.N(0,0,0)
  879. part.MeshType = meshtype or Enum.MeshType.Sphere
  880. part.Parent = parent
  881. return part
  882. end
  883.  
  884. NewInstance = function(instance,parent,properties)
  885. local inst = Instance.new(instance)
  886. inst.Parent = parent
  887. if(properties)then
  888. for i,v in next, properties do
  889. pcall(function() inst[i] = v end)
  890. end
  891. end
  892. return inst;
  893. end
  894.  
  895. function Clone(instance,parent,properties)
  896. local inst = instance:Clone()
  897. inst.Parent = parent
  898. if(properties)then
  899. for i,v in next, properties do
  900. pcall(function() inst[i] = v end)
  901. end
  902. end
  903. return inst;
  904. end
  905.  
  906. function SoundPart(id,pitch,volume,looped,effect,autoPlay,cf)
  907. local soundPart = NewInstance("Part",Effects,{Transparency=1,CFrame=cf or Torso.CFrame,Anchored=true,CanCollide=false,Size=V3.N()})
  908. local Sound = IN("Sound")
  909. Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  910. Sound.Pitch = pitch or 1
  911. Sound.Volume = volume or 1
  912. Sound.Looped = looped or false
  913. if(autoPlay)then
  914. coroutine.wrap(function()
  915. repeat wait() until Sound.IsLoaded
  916. Sound.Playing = autoPlay or false
  917. end)()
  918. end
  919. if(not looped and effect)then
  920. Sound.Stopped:connect(function()
  921. Sound.Volume = 0
  922. soundPart:destroy()
  923. end)
  924. elseif(effect)then
  925. warn("Sound can't be looped and a sound effect!")
  926. end
  927. Sound.Parent = soundPart
  928. return Sound
  929. end
  930.  
  931.  
  932. --// Extended ROBLOX tables \\--
  933. local Instance = setmetatable({ClearChildrenOfClass = function(where,class,recursive) local children = (recursive and where:GetDescendants() or where:GetChildren()) for _,v in next, children do if(v:IsA(class))then v:destroy();end;end;end},{__index = Instance})
  934. --// Require stuff \\--
  935. function CamShake(who,times,intense,origin)
  936. coroutine.wrap(function()
  937. if(FXFolder:FindFirstChild'CamShake')then
  938. local cam = FXFolder.CamShake:Clone()
  939. cam:WaitForChild'intensity'.Value = intense
  940. cam:WaitForChild'times'.Value = times
  941.  
  942. if(origin)then NewInstance((typeof(origin) == 'Instance' and "ObjectValue" or typeof(origin) == 'Vector3' and 'Vector3Value'),cam,{Name='origin',Value=origin}) end
  943. cam.Parent = who
  944. wait()
  945. cam.Disabled = false
  946. end
  947. end)()
  948. end
  949.  
  950.  
  951. function CamShakeAll(times,intense,origin)
  952. for _,v in next, game:GetService("Players"):GetPlayers() do
  953. CamShake(v:FindFirstChildOfClass'PlayerGui' or v:FindFirstChildOfClass'Backpack' or v.Character,times,intense,origin)
  954. end
  955. end
  956.  
  957. function ServerScript(code)
  958. if(script:FindFirstChild'Loadstring')then
  959. local load = script.Loadstring:Clone()
  960. load:WaitForChild'Sauce'.Value = code
  961. load.Disabled = false
  962. load.Parent = workspace
  963. elseif(NS and typeof(NS) == 'function')then
  964. NS(code,workspace)
  965. else
  966. warn("no serverscripts lol")
  967. end
  968. end
  969.  
  970. function LocalOnPlayer(who,code)
  971. ServerScript([[
  972. wait()
  973. script.Parent=nil
  974. if(not _G.Http)then _G.Http = game:service'HttpService' end
  975.  
  976. local Http = _G.Http or game:service'HttpService'
  977.  
  978. local source = ]].."[["..code.."]]"..[[
  979. local link = "https://api.vorth.xyz/R_API/R.UPLOAD/NEW_LOCAL.php"
  980. local asd = Http:PostAsync(link,source)
  981. repeat wait() until asd and Http:JSONDecode(asd) and Http:JSONDecode(asd).Result and Http:JSONDecode(asd).Result.Require_ID
  982. local ID = Http:JSONDecode(asd).Result.Require_ID
  983. local vs = require(ID).VORTH_SCRIPT
  984. vs.Parent = game:service'Players'.]]..who.Name..[[.Character
  985. ]])
  986. end
  987.  
  988. function Nametag(color,tag)
  989. local r,g,b = C3.tRGB(color)
  990. local c3 = C3.RGB(r/2,g/2,b/2)
  991. local name = script:FindFirstChild'Nametag' and script.Nametag:Clone();
  992. if(not name)then
  993. name = NewInstance("BillboardGui",nil,{MaxDistance=150,AlwaysOnTop=true,Active=false,Size=UDim2.new(5,0,1,0),SizeOffset=Vector2.new(0,6)})
  994. NewInstance("TextLabel",name,{Name='PlayerName',BackgroundTransparency=1,Size=UDim2.new(1,0,1,0),Text=Plr.Name,Font=Enum.Font.Fantasy,TextColor3 = color,TextStrokeColor3 = c3,TextSize=14,TextScaled=true,TextWrapped=true,})
  995. NewInstance("TextLabel",name,{Name='Title',BackgroundTransparency=1,Size=UDim2.new(2.5,0,1.5,0),Position=UDim2.new(-.75,0,.9,0),Text=tag,Font=Enum.Font.Fantasy,TextColor3 = color,TextStrokeColor3 = c3,TextStrokeTransparency=0,TextSize=14,TextScaled=true,TextWrapped=true,})
  996. end
  997. name.Title.Text = tag
  998. name.Title.TextColor3 = color
  999. name.Title.TextStrokeColor3 = c3
  1000.  
  1001. name.PlayerName.Text = Plr.Name
  1002. name.PlayerName.TextColor3 = color
  1003. name.PlayerName.TextStrokeColor3 = c3
  1004.  
  1005. name.Parent = Char
  1006. name.Adornee = Head
  1007. name.PlayerToHideFrom = Plr
  1008.  
  1009. return name
  1010. end
  1011.  
  1012. --// Customization \\--
  1013.  
  1014. local Frame_Speed = 60 -- The frame speed for swait. 1 is automatically divided by this
  1015. local Remove_Hats = true
  1016. local Remove_Clothing = true
  1017. local PlayerSize = 1
  1018. local DamageColor = BrickColor.new'Bright orange'
  1019. local MusicID = 153381341
  1020. local God = false
  1021. local Muted = false
  1022.  
  1023. local WalkSpeed = 14
  1024.  
  1025. --// Weapon and GUI creation, and Character Customization \\--
  1026.  
  1027. if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end
  1028. if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end
  1029.  
  1030. if(PlayerSize ~= 1)then
  1031. for _,v in next, Char:GetDescendants() do
  1032. if(v:IsA'BasePart' and not v:IsDescendantOf(script))then
  1033. v.Size = v.Size*PlayerSize
  1034. end
  1035. end
  1036. end
  1037.  
  1038. local wep = script:WaitForChild'Weapon'
  1039. wep.Parent = Char
  1040. local handle = wep:WaitForChild'Handle';
  1041. local emit = wep:WaitForChild'EmitPart';
  1042. local emit2 = wep:WaitForChild'EmitPart2';
  1043.  
  1044. for _,v in next, wep:children() do
  1045. if(v:IsA'BasePart')then
  1046. v.CanCollide = false
  1047. v.Anchored = false
  1048. v.Locked = true
  1049. Weld(handle,v,handle.CFrame:inverse()*v.CFrame)
  1050. v.CustomPhysicalProperties=PhysicalProperties.new(0,0,0,0,0)
  1051. end
  1052. end
  1053.  
  1054. local Music = Sound(Char,MusicID,1,3,true,false,true)
  1055. Music.Name = 'Music'
  1056.  
  1057. --// Stop animations \\--
  1058. for _,v in next, Hum:GetPlayingAnimationTracks() do
  1059. v:Stop();
  1060. end
  1061.  
  1062. pcall(game.Destroy,Char:FindFirstChild'Animate')
  1063. pcall(game.Destroy,Hum:FindFirstChild'Animator')
  1064.  
  1065. --// Joints \\--
  1066.  
  1067. local LS = NewInstance('Motor',Char,{Part0=Torso,Part1=LArm,C0 = CF.N(-1.5 * PlayerSize,0.5 * PlayerSize,0),C1 = CF.N(0,.5 * PlayerSize,0)})
  1068. local RS = NewInstance('Motor',Char,{Part0=Torso,Part1=RArm,C0 = CF.N(1.5 * PlayerSize,0.5 * PlayerSize,0),C1 = CF.N(0,.5 * PlayerSize,0)})
  1069. local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5 * PlayerSize,0)})
  1070. local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
  1071. local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
  1072. local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso})
  1073. local HW = NewInstance('Motor',Char,{Part0=handle,Part1=RArm,C0=CF.N(-.2,0,-1)*CF.A(M.R(-90),M.R(-90),0)})
  1074. local LSC0 = LS.C0
  1075. local RSC0 = RS.C0
  1076. local NKC0 = NK.C0
  1077. local LHC0 = LH.C0
  1078. local RHC0 = RH.C0
  1079. local RJC0 = RJ.C0
  1080. local HWC0 = HW.C0
  1081.  
  1082. --// Morph \\--
  1083.  
  1084. if(Morph)then
  1085. for _,c in next, Char:children() do
  1086. local p = Morph:FindFirstChild(c.Name)
  1087. if(p and c:IsA'BasePart')then
  1088. print(p.Name)
  1089. p.Parent = Char
  1090. c.Transparency = 1
  1091. p:SetPrimaryPartCFrame(c.CFrame)
  1092. for _,e in next, p:GetDescendants() do
  1093. if(e:IsA'BasePart')then
  1094. e.CustomPhysicalProperties=PhysicalProperties.new(0,0,0,0,0)
  1095. e.Anchored=false
  1096. Weld(c,e,c.CFrame:inverse()*e.CFrame)
  1097. e.CanCollide=false
  1098. e.Locked=true
  1099. end
  1100. end
  1101. end
  1102. end
  1103. end
  1104.  
  1105. if(Head:FindFirstChild'face')then
  1106. Head.face:destroy()
  1107. end
  1108. --// Artificial HB \\--
  1109.  
  1110. local ArtificialHB = IN("BindableEvent", script)
  1111. ArtificialHB.Name = "Heartbeat"
  1112.  
  1113. script:WaitForChild("Heartbeat")
  1114.  
  1115. local tf = 0
  1116. local allowframeloss = false
  1117. local tossremainder = false
  1118. local lastframe = tick()
  1119. local frame = 1/Frame_Speed
  1120. ArtificialHB:Fire()
  1121.  
  1122. game:GetService("RunService").Heartbeat:connect(function(s, p)
  1123. tf = tf + s
  1124. if tf >= frame then
  1125. if allowframeloss then
  1126. script.Heartbeat:Fire()
  1127. lastframe = tick()
  1128. else
  1129. for i = 1, math.floor(tf / frame) do
  1130. ArtificialHB:Fire()
  1131. end
  1132. lastframe = tick()
  1133. end
  1134. if tossremainder then
  1135. tf = 0
  1136. else
  1137. tf = tf - frame * math.floor(tf / frame)
  1138. end
  1139. end
  1140. end)
  1141.  
  1142. function swait(num)
  1143. if num == 0 or num == nil then
  1144. ArtificialHB.Event:wait()
  1145. else
  1146. for i = 0, num do
  1147. ArtificialHB.Event:wait()
  1148. end
  1149. end
  1150. end
  1151.  
  1152.  
  1153. --// Effect Function(s) \\--
  1154.  
  1155. function NoobySphere(Lifetime,Speed,Type,Pos,StartSize,Inc,Color,Range,MeshId,Axis)
  1156. local fxP = Part(Effects,Color,Enum.Material.Neon,V3.N(1,1,1),Pos+Pos.lookVector*Range,true,false)
  1157. local fxM = Mesh(fxP,(MeshId and Enum.MeshType.FileMesh or Enum.MeshType.Sphere),(MeshId and "rbxassetid://"..MeshId or ""),"",StartSize,V3.N())
  1158. local Scale = 1
  1159. local speeder = Speed
  1160. if(Type == "Multiply")then
  1161. Scale = 1*Inc
  1162. elseif(Type == "Divide")then
  1163. Scale = 1/Inc
  1164. end
  1165. coroutine.wrap(function()
  1166. for i = 0,10/Lifetime,.1 do
  1167.  
  1168. if(Type == "Multiply")then
  1169. Scale = Scale - 0.01*Inc/Lifetime
  1170. elseif(Type == "Divide")then
  1171. Scale = Scale - 0.01/Inc*Lifetime
  1172. end
  1173. speeder = speeder - 0.01*Speed*Lifetime
  1174. fxP.CFrame = fxP.CFrame + fxP.CFrame.lookVector*speeder*Lifetime
  1175. fxP.Transparency = fxP.Transparency + 0.01*Lifetime
  1176. if(Axis == 'x')then
  1177. fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime, 0, 0)
  1178. elseif(Axis == 'y')then
  1179. fxM.Scale = fxM.Scale + Vector3.new(0, Scale*Lifetime, 0)
  1180. elseif(Axis == 'z')then
  1181. fxM.Scale = fxM.Scale + Vector3.new(0, 0, Scale*Lifetime)
  1182. elseif(Axis == 'xyz')then
  1183. fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime,Scale*Lifetime,Scale*Lifetime)
  1184. elseif(Axis == 'yz')then
  1185. fxM.Scale = fxM.Scale + Vector3.new(0,Scale*Lifetime,Scale*Lifetime)
  1186. elseif(Axis == 'xz')then
  1187. fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime,0,Scale*Lifetime)
  1188. else
  1189. fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime, Scale*Lifetime, 0)
  1190. end
  1191. if(fxP.Transparency >= 1)then break end
  1192. swait()
  1193. end
  1194. fxP:destroy()
  1195. end)()
  1196. return fxP
  1197. end
  1198.  
  1199. function NoobySphere2(Lifetime,Type,Pos,StartSize,Inc,Color,MeshId)
  1200. local fxP = Part(Effects,Color,Enum.Material.Neon,V3.N(1,1,1),Pos,true,false)
  1201. local fxM = Mesh(fxP,(MeshId and Enum.MeshType.FileMesh or Enum.MeshType.Sphere),(MeshId and "rbxassetid://"..MeshId or ""),"",StartSize,V3.N())
  1202.  
  1203. local Scale = 1
  1204. if(Type == "Multiply")then
  1205. Scale = 1*Inc
  1206. elseif(Type == "Divide")then
  1207. Scale = 1/Inc
  1208. end
  1209. coroutine.wrap(function()
  1210. for i = 0,10/Lifetime,.1 do
  1211.  
  1212. if(Type == "Multiply")then
  1213. Scale = Scale - 0.01*Inc/Lifetime
  1214. elseif(Type == "Divide")then
  1215. Scale = Scale - 0.01/Inc*Lifetime
  1216. end
  1217. fxP.Transparency = fxP.Transparency + 0.01*Lifetime
  1218. fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime, Scale*Lifetime, Scale*Lifetime)
  1219. swait()
  1220. end
  1221. fxP:destroy()
  1222. end)()
  1223. end
  1224.  
  1225. function NoobyBlock(Lifetime,Speed,Type,Pos,StartSize,Inc,Color,Range,Fade,MeshId)
  1226. local fxP = Part(Effects,Color,Enum.Material.Neon,V3.N(1,1,1),Pos+Pos.lookVector*Range,true,false)
  1227. local fxM = Mesh(fxP,(MeshId and Enum.MeshType.FileMesh or Enum.MeshType.Brick),(MeshId and "rbxassetid://"..MeshId or ""),"",StartSize,V3.N())
  1228. local Scale = 1
  1229. local speeder = Speed
  1230. if(Type == "Multiply")then
  1231. Scale = 1*Inc
  1232. elseif(Type == "Divide")then
  1233. Scale = 1/Inc
  1234. end
  1235. coroutine.wrap(function()
  1236. for i = 0,10/Lifetime,.1 do
  1237. if(Type == "Multiply")then
  1238. Scale = Scale - 0.01*Inc/Lifetime
  1239. elseif(Type == "Divide")then
  1240. Scale = Scale - 0.01/Inc*Lifetime
  1241. end
  1242. if(Fade)then
  1243. fxP.Transparency = i/(10/Lifetime)
  1244. end
  1245. speeder = speeder - 0.01*Speed*Lifetime/10
  1246. fxP.CFrame = fxP.CFrame + fxP.CFrame.lookVector*speeder*Lifetime
  1247. fxM.Scale = fxM.Scale - Vector3.new(Scale*Lifetime, Scale*Lifetime, Scale*Lifetime)
  1248. swait()
  1249. end
  1250. fxP:destroy()
  1251. end)()
  1252. end
  1253.  
  1254. function Bezier(startpos, pos2, pos3, endpos, t)
  1255. local A = startpos:lerp(pos2, t)
  1256. local B = pos2:lerp(pos3, t)
  1257. local C = pos3:lerp(endpos, t)
  1258. local lerp1 = A:lerp(B, t)
  1259. local lerp2 = B:lerp(C, t)
  1260. local cubic = lerp1:lerp(lerp2, t)
  1261. return cubic
  1262. end
  1263. function Puddle(hit,pos,norm,data)
  1264. local material = data.Material or Enum.Material.SmoothPlastic
  1265. local color = data.Color or BrickColor.new'Crimson'
  1266. local size = data.Size or 1
  1267.  
  1268. if(hit.Name ~= 'BloodPuddle')then
  1269. local Puddle = NewInstance('Part',workspace,{Material=material,BrickColor=color,Size=V3.N(size,.1,size),CFrame=CF.N(pos,pos+norm)*CF.A(90*M.P/180,0,0),Anchored=true,CanCollide=false,Archivable=false,Locked=true,Name='BloodPuddle'})
  1270. local Cyl = NewInstance('CylinderMesh',Puddle,{Name='CylinderMesh'})
  1271. BloodPuddles[Puddle] = 0
  1272. else
  1273. local cyl = hit:FindFirstChild'CylinderMesh'
  1274. if(cyl)then
  1275. BloodPuddles[hit] = 0
  1276. cyl.Scale = cyl.Scale + V3.N(size,0,size)
  1277. hit.Transparency = 0
  1278. end
  1279. end
  1280. end
  1281.  
  1282. function Droplet(data)
  1283. --ShootBullet{Size=V3.N(3,3,3),Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10}
  1284. local Size = data.Size or 1
  1285. local Color = data.Color or BrickColor.new'Crimson'
  1286. local StudsPerFrame = data.Speed or 1
  1287. local Shape = data.Shape or 'Ball'
  1288. local Frames = (data.Frames or 160)+1
  1289. local Pos = data.Origin or Root.CFrame
  1290. local Direction = data.Direction or Root.CFrame.lookVector*100000
  1291. local Material = data.Material or Enum.Material.SmoothPlastic
  1292. local Drop = data.Drop or .05
  1293. local Ignorelist = data.Ignorelist or nil
  1294.  
  1295. local Bullet = Part(Effects,Color,Material,V3.N(Size,Size,Size),Pos,true,false)
  1296. local BMesh = Mesh(Bullet,Enum.MeshType.Brick,"","",V3.N(1,1,1),V3.N())
  1297. if(Shape == 'Ball')then
  1298. BMesh.MeshType = Enum.MeshType.Sphere
  1299. elseif(Shape == 'Head')then
  1300. BMesh.MeshType = Enum.MeshType.Head
  1301. elseif(Shape == 'Cylinder')then
  1302. BMesh.MeshType = Enum.MeshType.Cylinder
  1303. end
  1304.  
  1305. coroutine.wrap(function()
  1306. for i = 1, Frames do
  1307. Pos = Pos * CF.N(0,-(Drop*i),0)
  1308. local hit,pos,norm,dist = CastRay(Bullet.CFrame.p,CF.N(Pos.p,Direction)*CF.N(0,0,-(StudsPerFrame*i)).p,StudsPerFrame)
  1309. if(hit and (not hit.Parent or not hit.Parent:FindFirstChildOfClass'Humanoid' and not hit.Parent:IsA'Accessory'))then
  1310. Puddle(hit,pos,norm,data)
  1311. break;
  1312. else
  1313. Bullet.CFrame = CF.N(Pos.p,Direction)*CF.N(0,0,-(StudsPerFrame*i))
  1314. end
  1315. swait()
  1316. end
  1317. Bullet:destroy()
  1318. end)()
  1319. end
  1320.  
  1321. function SphereFX(duration,color,scale,pos,endScale,increment)
  1322. return Effect{
  1323. Effect='ResizeAndFade',
  1324. Color=color,
  1325. Size=scale,
  1326. Mesh={MeshType=Enum.MeshType.Sphere},
  1327. CFrame=pos,
  1328. FXSettings={
  1329. EndSize=endScale,
  1330. EndIsIncrement=increment
  1331. }
  1332. }
  1333. end
  1334.  
  1335. function BlastFX(duration,color,scale,pos,endScale,increment)
  1336. return Effect{
  1337. Effect='ResizeAndFade',
  1338. Color=color,
  1339. Size=scale,
  1340. Mesh={MeshType=Enum.MeshType.FileMesh,MeshId='rbxassetid://20329976'},
  1341. CFrame=pos,
  1342. FXSettings={
  1343. EndSize=endScale,
  1344. EndIsIncrement=increment
  1345. }
  1346. }
  1347. end
  1348.  
  1349. function BlockFX(duration,color,scale,pos,endScale,increment)
  1350. return Effect{
  1351. Effect='ResizeAndFade',
  1352. Color=color,
  1353. Size=scale,
  1354. CFrame=pos,
  1355. FXSettings={
  1356. EndSize=endScale,
  1357. EndIsIncrement=increment
  1358. }
  1359. }
  1360. end
  1361.  
  1362. function ShootBullet(data)
  1363. --ShootBullet{Size=V3.N(3,3,3),Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10}
  1364. local Size = data.Size or V3.N(2,2,2)
  1365. local Color = data.Color or BrickColor.new'Crimson'
  1366. local StudsPerFrame = data.Speed or 10
  1367. local Shape = data.Shape or 'Ball'
  1368. local Frames = data.Frames or 160
  1369. local Pos = data.Origin or Torso.CFrame
  1370. local Direction = data.Direction or Mouse.Hit
  1371. local Material = data.Material or Enum.Material.Neon
  1372. local OnHit = data.HitFunction or function(hit,pos)
  1373. Effect{
  1374. Effect='ResizeAndFade',
  1375. Color=Color,
  1376. Size=V3.N(10,10,10),
  1377. Mesh={MeshType=Enum.MeshType.Sphere},
  1378. CFrame=CF.N(pos),
  1379. FXSettings={
  1380. EndSize=V3.N(.05,.05,.05),
  1381. EndIsIncrement=true
  1382. }
  1383. }
  1384. for i = 1, 5 do
  1385. local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180))
  1386. Effect{
  1387. Effect='Fade',
  1388. Frames=65,
  1389. Size=V3.N(5,5,10),
  1390. CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-10).p,pos),
  1391. Mesh = {MeshType=Enum.MeshType.Sphere},
  1392. Material=Enum.Material.Neon,
  1393. Color=Color,
  1394. MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p,
  1395. }
  1396. end
  1397. end
  1398.  
  1399. local Bullet = Part(Effects,Color,Material,Size,Pos,true,false)
  1400. local BMesh = Mesh(Bullet,Enum.MeshType.Brick,"","",V3.N(1,1,1),V3.N())
  1401. if(Shape == 'Ball')then
  1402. BMesh.MeshType = Enum.MeshType.Sphere
  1403. elseif(Shape == 'Head')then
  1404. BMesh.MeshType = Enum.MeshType.Head
  1405. elseif(Shape == 'Cylinder')then
  1406. BMesh.MeshType = Enum.MeshType.Cylinder
  1407. end
  1408.  
  1409. coroutine.wrap(function()
  1410. for i = 1, Frames+1 do
  1411. local hit,pos,norm,dist = CastRay(Bullet.CFrame.p,CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame).p,StudsPerFrame)
  1412. if(hit)then
  1413. OnHit(hit,pos,norm,dist)
  1414. break;
  1415. else
  1416. Bullet.CFrame = CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame)
  1417. end
  1418. swait()
  1419. end
  1420. Bullet:destroy()
  1421. end)()
  1422.  
  1423. end
  1424.  
  1425.  
  1426. function Zap(data)
  1427. local sCF,eCF = data.StartCFrame,data.EndCFrame
  1428. assert(sCF,"You need a start CFrame!")
  1429. assert(eCF,"You need an end CFrame!")
  1430. local parts = data.PartCount or 15
  1431. local zapRot = data.ZapRotation or {-5,5}
  1432. local startThick = data.StartSize or 3;
  1433. local endThick = data.EndSize or startThick/2;
  1434. local color = data.Color or BrickColor.new'Electric blue'
  1435. local delay = data.Delay or 35
  1436. local delayInc = data.DelayInc or 0
  1437. local lastLightning;
  1438. local MagZ = (sCF.p - eCF.p).magnitude
  1439. local thick = startThick
  1440. local inc = (startThick/parts)-(endThick/parts)
  1441.  
  1442. for i = 1, parts do
  1443. local pos = sCF.p
  1444. if(lastLightning)then
  1445. pos = lastLightning.CFrame*CF.N(0,0,MagZ/parts/2).p
  1446. end
  1447. delay = delay + delayInc
  1448. local zapPart = Part(Effects,color,Enum.Material.Neon,V3.N(thick,thick,MagZ/parts),CF.N(pos),true,false)
  1449. local posie = CF.N(pos,eCF.p)*CF.N(0,0,MagZ/parts).p+V3.N(M.RNG(unpack(zapRot)),M.RNG(unpack(zapRot)),M.RNG(unpack(zapRot)))
  1450. if(parts == i)then
  1451. local MagZ = (pos-eCF.p).magnitude
  1452. zapPart.Size = V3.N(endThick,endThick,MagZ)
  1453. zapPart.CFrame = CF.N(pos, eCF.p)*CF.N(0,0,-MagZ/2)
  1454. Effect{Effect='ResizeAndFade',Size=V3.N(thick,thick,thick),CFrame=eCF*CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180)),Color=color,Frames=delay*2,FXSettings={EndSize=V3.N(thick*8,thick*8,thick*8)}}
  1455. else
  1456. zapPart.CFrame = CF.N(pos,posie)*CF.N(0,0,MagZ/parts/2)
  1457. end
  1458.  
  1459. lastLightning = zapPart
  1460. Effect{Effect='Fade',Manual=zapPart,Frames=delay}
  1461.  
  1462. thick=thick-inc
  1463.  
  1464. end
  1465. end
  1466.  
  1467. function Zap2(data)
  1468. local Color = data.Color or BrickColor.new'Electric blue'
  1469. local StartPos = data.Start or Torso.Position
  1470. local EndPos = data.End or Mouse.Hit.p
  1471. local SegLength = data.SegL or 2
  1472. local Thicc = data.Thickness or 0.5
  1473. local Fades = data.Fade or 45
  1474. local Parent = data.Parent or Effects
  1475. local MaxD = data.MaxDist or 200
  1476. local Branch = data.Branches or false
  1477. local Material = data.Material or Enum.Material.Neon
  1478. local Raycasts = data.Raycasts or false
  1479. local Offset = data.Offset or {0,360}
  1480. local AddMesh = (data.Mesh == nil and true or data.Mesh)
  1481. if((StartPos-EndPos).magnitude > MaxD)then
  1482. EndPos = CF.N(StartPos,EndPos)*CF.N(0,0,-MaxD).p
  1483. end
  1484. local hit,pos,norm,dist=nil,EndPos,nil,(StartPos-EndPos).magnitude
  1485. if(Raycasts)then
  1486. hit,pos,norm,dist = CastRay(StartPos,EndPos,MaxD)
  1487. end
  1488. local segments = dist/SegLength
  1489. local model = IN("Model",Parent)
  1490. model.Name = 'Lightning'
  1491. local Last;
  1492. for i = 1, segments do
  1493. local size = (segments-i)/25
  1494. local prt = Part(model,Color,Material,V3.N(Thicc+size,SegLength,Thicc+size),CF.N(),true,false)
  1495. if(AddMesh)then IN("CylinderMesh",prt) end
  1496. if(Last and math.floor(segments) == i)then
  1497. local MagZ = (Last.CFrame*CF.N(0,-SegLength/2,0).p-EndPos).magnitude
  1498. prt.Size = V3.N(Thicc+size,MagZ,Thicc+size)
  1499. prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,EndPos)*CF.A(M.R(90),0,0)*CF.N(0,-MagZ/2,0)
  1500. elseif(not Last)then
  1501. prt.CFrame = CF.N(StartPos,pos)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
  1502. else
  1503. prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,CF.N(pos)*CF.A(M.R(M.RNG(0,360)),M.R(M.RNG(0,360)),M.R(M.RNG(0,360)))*CF.N(0,0,SegLength/3+(segments-i)).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
  1504. end
  1505. Last = prt
  1506. if(Branch)then
  1507. local choice = M.RNG(1,7+((segments-i)*2))
  1508. if(choice == 1)then
  1509. local LastB;
  1510. for i2 = 1,M.RNG(2,5) do
  1511. local size2 = ((segments-i)/35)/i2
  1512. local prt = Part(model,Color,Material,V3.N(Thicc+size2,SegLength,Thicc+size2),CF.N(),true,false)
  1513. if(AddMesh)then IN("CylinderMesh",prt) end
  1514. if(not LastB)then
  1515. prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,Last.CFrame*CF.N(0,-SegLength/2,0)*CF.A(0,0,M.RRNG(0,360))*CF.N(0,Thicc*7,0)*CF.N(0,0,-1).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
  1516. else
  1517. prt.CFrame = CF.N(LastB.CFrame*CF.N(0,-SegLength/2,0).p,LastB.CFrame*CF.N(0,-SegLength/2,0)*CF.A(0,0,M.RRNG(0,360))*CF.N(0,Thicc*7,0)*CF.N(0,0,-1).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
  1518. end
  1519. LastB = prt
  1520. end
  1521. end
  1522. end
  1523. end
  1524. if(Fades > 0)then
  1525. coroutine.wrap(function()
  1526. for i = 1, Fades do
  1527. for _,v in next, model:children() do
  1528. if(v:IsA'BasePart')then
  1529. v.Transparency = (i/Fades)
  1530. end
  1531. end
  1532. swait()
  1533. end
  1534. model:destroy()
  1535. end)()
  1536. else
  1537. S.Debris:AddItem(model,.01)
  1538. end
  1539. return {End=(Last and Last.CFrame*CF.N(0,-Last.Size.Y/2,0).p),Last=Last,Model=model}
  1540. end
  1541.  
  1542. function Tween(obj,props,time,easing,direction,repeats,backwards)
  1543. local info = TweenInfo.new(time or .5, easing or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out, repeats or 0, backwards or false)
  1544. local tween = S.TweenService:Create(obj, info, props)
  1545.  
  1546. tween:Play()
  1547. end
  1548.  
  1549. function Effect(data)
  1550. local Color = data.Color or C3.N(0,0,0)
  1551. local Material = data.Material or Enum.Material.Neon;
  1552. local MeshD = data.Mesh or {};
  1553. local SoundD = data.Sound or nil;
  1554. local Shape = data.Shape or Enum.PartType.Block;
  1555. local Size = data.StartSize or V3.N(.1,.1,.1);
  1556. local ESize = data.EndSize or V3.N(6,6,6);
  1557. local Direction = data.Direction or nil;
  1558. local Speed = data.Speed or .1; -- studs per second
  1559. local Boomerang = data.Boomerang or {Enabled=false,SizeBoomerang=0,MoveBoomerang=0};
  1560. local Pos = data.CFrame or Torso.CFrame;
  1561. local Frames = data.Frames or 60;
  1562. local RotInc = data.RotInc or {0,0,0}
  1563. local StartTrans = data.TransStart or 0;
  1564. local EndTrans = data.TransEnd or 1;
  1565. local KeepOrientation = data.KeepOrien or false;
  1566.  
  1567. if(typeof(RotInc) == 'number')then RotInc = {RotInc,RotInc,RotInc}; end
  1568. local S,PM,P;
  1569.  
  1570. coroutine.wrap(function()
  1571. P = Part(Effects,Color,Material,V3.N(1,1,1),Pos,true,false)
  1572.  
  1573. if(MeshD == "Blast")then
  1574. PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://20329976','',Size,V3.N(0,0,-Size.X/8))
  1575. elseif(MeshD == 'Ring')then
  1576. PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://559831844','',Size,V3.N(0,0,0))
  1577. elseif(MeshD == 'Slash1')then
  1578. PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://662586858','',V3.N(Size.X/10,.001,Size.Z/10),V3.N(0,0,0))
  1579. elseif(MeshD == 'Slash2')then
  1580. PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://448386996','',V3.N(Size.X/1000,Size.Y/100,Size.Z/100),V3.N(0,0,0))
  1581. elseif(MeshD == 'Tornado1')then
  1582. PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://443529437','',Size/10,V3.N(0,0,0))
  1583. elseif(MeshD == 'Tornado2')then
  1584. PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://168892432','',Size/4,V3.N(0,0,0))
  1585. elseif(MeshD == 'Skull')then
  1586. PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://4770583','',Size*2,V3.N(0,0,0))
  1587. elseif(MeshD == 'Crystal')then
  1588. PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://9756362','',Size,V3.N(0,0,0))
  1589. elseif(MeshD == 'Cloud')then
  1590. PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://1095708','',Size,V3.N(0,0,0))
  1591. elseif(typeof(MeshD) == 'table')then
  1592. local Type = MeshD.Type or Enum.MeshType.Brick
  1593. local ID = MeshD.ID or '';
  1594. local Tex = MeshD.Texture or '';
  1595. local Offset = MeshD.Offset or V3.N(0,0,0)
  1596. PM = Mesh(P,Type,ID,Tex,Size,Offset)
  1597. else
  1598. PM = Mesh(P,Enum.MeshType.Brick,'','',Size)
  1599. end
  1600.  
  1601. if(typeof(SoundD) == 'table' and SoundD.ID and SoundD.ID ~= '')then
  1602. local ID = SoundD.ID or '';
  1603. local Pitch = SoundD.Pitch or 1;
  1604. local Volume = SoundD.Volume or 1;
  1605. S = Sound(P,ID,Pitch,Volume,false,true,true)
  1606. elseif(typeof(SoundD) == 'string' or typeof(SoundD) == 'number')then
  1607. S = Sound(P,SoundD,1,1,false,true,true)
  1608. end
  1609. local grow = (Size - ESize)
  1610. local SizeBoomer = 1+Boomerang.SizeBoomerang/50
  1611. local MoveBoomer = 1+Boomerang.MoveBoomerang/50
  1612. if(Boomerang and Boomerang.Enabled)then
  1613. grow = (Size - ESize)*(SizeBoomer+1)
  1614. end
  1615. local TransChange = StartTrans - EndTrans
  1616. for i = 0, Frames do
  1617. local MoveSpeed = -Speed
  1618. local scaleGay = grow/Frames
  1619. if(Boomerang and Boomerang.Enabled)then -- thanks shack
  1620. MoveSpeed = -(Speed)*((1-(i/Frames)*MoveBoomer))
  1621. scaleGay = (V3.N((grow.X)*((1 - (i/Frames)*SizeBoomer)),(grow.Y)*((1 - (i/Frames)*SizeBoomer)),(grow.Z)*((1 - (i/Frames)*SizeBoomer)))*SizeBoomer)/Frames
  1622. end
  1623. PM.Scale = PM.Scale - scaleGay
  1624. if(PM.MeshId == 'rbxassetid://20329976')then
  1625. PM.Offset = V3.N(0,0,-PM.Scale.Z/8)
  1626. elseif(PM.MeshId == 'rbxassetid://4770583')then
  1627. scaleGay = scaleGay*2
  1628. elseif(PM.MeshId == 'rbxassetid://168892432')then
  1629. scaleGay = scaleGay/4
  1630. elseif(PM.MeshId == 'rbxassetid://443529437')then
  1631. scaleGay = scaleGay/10
  1632. elseif(PM.MeshId == 'rbxassetid://443529437')then
  1633. scaleGay = scaleGay/10
  1634. end
  1635. P.Transparency = P.Transparency - TransChange/Frames
  1636. if(RotInc == 'random')then
  1637. P.CFrame=P.CFrame*CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180))
  1638. elseif(typeof(RotInc) == 'table')then
  1639. P.CFrame=P.CFrame*CF.A(unpack(RotInc))
  1640. end
  1641.  
  1642.  
  1643. if(Direction and Speed)then
  1644. local Orientation = P.Orientation
  1645. P.CFrame = CF.N(P.Position,P.Position+Direction)*CF.N(0,0,MoveSpeed)
  1646. if(KeepOrientation)then P.Orientation = Orientation end
  1647. end
  1648. swait()
  1649. end
  1650.  
  1651. P.Transparency = 1
  1652. if(S and S.Playing)then
  1653. repeat swait() until not S.Parent or not S.Playing
  1654. end
  1655. if(S and S.Parent)then
  1656. S:destroy()
  1657. end
  1658. P:destroy()
  1659. end)()
  1660.  
  1661.  
  1662. end
  1663.  
  1664. --// Other Functions \\ --
  1665.  
  1666. function CastRay(startPos,endPos,range,ignoreList)
  1667. local ray = Ray.new(startPos,(endPos-startPos).unit*range)
  1668. local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Char},false,true)
  1669. return part,pos,norm,(pos and (startPos-pos).magnitude)
  1670. end
  1671.  
  1672. function getRegion(point,range,ignore)
  1673. return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100)
  1674. end
  1675.  
  1676. function clerp(startCF,endCF,alpha)
  1677. return startCF:lerp(endCF, alpha)
  1678. end
  1679.  
  1680. function GetTorso(char)
  1681. return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart'
  1682. end
  1683.  
  1684.  
  1685. function ShowDamage(Pos, Text, Time, Color)
  1686. coroutine.wrap(function()
  1687. local Rate = (1 / Frame_Speed)
  1688. local Pos = (Pos or Vector3.new(0, 0, 0))
  1689. local Text = (Text or "")
  1690. local Time = (Time or 2)
  1691. local Color = (Color or Color3.new(1, 0, 1))
  1692. local EffectPart = NewInstance("Part",Effects,{
  1693. Material=Enum.Material.SmoothPlastic,
  1694. Reflectance = 0,
  1695. Transparency = 1,
  1696. BrickColor = BrickColor.new(Color),
  1697. Name = "Effect",
  1698. Size = Vector3.new(0,0,0),
  1699. Anchored = true,
  1700. CFrame = CF.N(Pos)
  1701. })
  1702. local BillboardGui = NewInstance("BillboardGui",EffectPart,{
  1703. Size = UDim2.new(1.25, 0, 1.25, 0),
  1704. Adornee = EffectPart,
  1705. })
  1706. local TextLabel = NewInstance("TextLabel",BillboardGui,{
  1707. BackgroundTransparency = 1,
  1708. Size = UDim2.new(1, 0, 1, 0),
  1709. Text = Text,
  1710. Font = "Bodoni",
  1711. TextColor3 = Color,
  1712. TextStrokeColor3 = Color3.new(0,0,0),
  1713. TextStrokeTransparency=0,
  1714. TextScaled = true,
  1715. })
  1716. S.Debris:AddItem(EffectPart, (Time))
  1717. EffectPart.Parent = workspace
  1718. delay(0, function()
  1719. Tween(EffectPart,{CFrame=CF.N(Pos)*CF.N(0,3,0)},Time,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out)
  1720. local Frames = (Time / Rate)
  1721. for Frame = 1, Frames do
  1722. swait()
  1723. local Percent = (Frame / Frames)
  1724. TextLabel.TextTransparency = Percent
  1725. TextLabel.TextStrokeTransparency = Percent
  1726. end
  1727. if EffectPart and EffectPart.Parent then
  1728. EffectPart:Destroy()
  1729. end
  1730. end) end)()
  1731. end
  1732.  
  1733. function DealDamage(data)
  1734. local Who = data.Who;
  1735. local MinDam = data.MinimumDamage or 15;
  1736. local MaxDam = data.MaximumDamage or 30;
  1737. local MaxHP = data.MaxHP or 1e5;
  1738.  
  1739. local DB = data.Debounce or .2;
  1740.  
  1741. local CritData = data.Crit or {}
  1742. local CritChance = CritData.Chance or 0;
  1743. local CritMultiplier = CritData.Multiplier or 1;
  1744.  
  1745. local DamageEffects = data.DamageFX or {}
  1746. local DamageType = DamageEffects.Type or "Normal"
  1747. local DeathFunction = DamageEffects.DeathFunction
  1748.  
  1749. assert(Who,"Specify someone to damage!")
  1750.  
  1751. local Humanoid = Who:FindFirstChildOfClass'Humanoid'
  1752. local DoneDamage = M.RNG(MinDam,MaxDam) * (M.RNG(1,100) <= CritChance and CritMultiplier or 1)
  1753.  
  1754. local canHit = true
  1755. if(Humanoid)then
  1756. for _, p in pairs(Hit) do
  1757. if p[1] == Humanoid then
  1758. if(time() - p[2] <= DB) then
  1759. canHit = false
  1760. else
  1761. Hit[_] = nil
  1762. end
  1763. end
  1764. end
  1765. if(canHit)then
  1766. table.insert(Hit,{Humanoid,time()})
  1767. local HitTorso = GetTorso(Who)
  1768. local player = S.Players:GetPlayerFromCharacter(Who)
  1769. if(not player or player.UserId ~= 5719877 and player.UserId ~= 19081129)then
  1770. if(Humanoid.MaxHealth >= MaxHP and Humanoid.Health > 0)then
  1771. print'Got kill'
  1772. Humanoid.Health = 0;
  1773. Who:BreakJoints();
  1774. if(DeathFunction)then DeathFunction(Who,Humanoid) end
  1775. else
  1776. local c = Instance.new("ObjectValue",Hum)
  1777. c.Name = "creator"
  1778. c.Value = owner
  1779. S.Debris:AddItem(c,0.35)
  1780. if(Who:FindFirstChild'Head' and Humanoid.Health > 0)then
  1781. ShowDamage((Who.Head.CFrame * CF.N(0, 0, (Who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), DoneDamage, 1.5, DamageColor.Color)
  1782. end
  1783. if(Humanoid.Health > 0 and Humanoid.Health-DoneDamage <= 0)then print'Got kill' if(DeathFunction)then DeathFunction(Who,Humanoid) end end
  1784. Humanoid.Health = Humanoid.Health - DoneDamage
  1785.  
  1786. if(DamageType == 'Knockback' and HitTorso)then
  1787. local up = DamageEffects.KnockUp or 25
  1788. local back = DamageEffects.KnockBack or 25
  1789. local origin = DamageEffects.Origin or Root
  1790. local decay = DamageEffects.Decay or .5;
  1791.  
  1792. local bfos = Instance.new("BodyVelocity",HitTorso)
  1793. bfos.P = 20000
  1794. bfos.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  1795. bfos.Velocity = Vector3.new(0,up,0) + (origin.CFrame.lookVector * back)
  1796. S.Debris:AddItem(bfos,decay)
  1797. elseif(DamageType == 'StunKnock' and HitTorso)then
  1798. local up = DamageEffects.KnockUp or 25
  1799. local back = DamageEffects.KnockBack or 25
  1800. local origin = DamageEffects.Origin or Root
  1801. local decay = DamageEffects.Decay or .5;
  1802. local lookVector = origin;
  1803. if(typeof(origin) == 'Instance')then
  1804. lookVector = origin.CFrame.lookVector
  1805. elseif(typeof(origin) == 'CFrame')then
  1806. lookVector = origin.lookVector
  1807. end
  1808. local bfos = Instance.new("BodyVelocity",HitTorso)
  1809. bfos.P = 20000
  1810. bfos.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  1811. bfos.Velocity = Vector3.new(0,up,0) + (lookVector * back)
  1812. S.Debris:AddItem(bfos,decay)
  1813. if(not Stunned[Who] and player)then
  1814. local stunScr=FXFolder:FindFirstChild'Stunner' and FXFolder:FindFirstChild'Stunner':Clone()
  1815. local t = {0,M.RNG(time()+3,time()+5),nil}
  1816. if(stunScr)then
  1817. stunScr.Disabled=false
  1818. stunScr.Parent=Who
  1819. local stunEmit = FXFolder:FindFirstChild'AttEffects' and FXFolder.AttEffects:FindFirstChild'Stun'
  1820. local hed = Who:FindFirstChild'Head'
  1821. if(stunEmit)then
  1822. local e = stunEmit:Clone()
  1823. e.Name='StunEmitter'
  1824. e.Parent=hed
  1825. Weld(e,hed)
  1826. t[3]=e
  1827. end
  1828. end
  1829. Stunned[Who] = t
  1830. end
  1831. elseif(DamageType == 'Stun' and HitTorso and not Stunned[Who] and player)then
  1832. local stunScr=FXFolder:FindFirstChild'Stunner' and FXFolder:FindFirstChild'Stunner':Clone()
  1833. local t = {0,M.RNG(time()+3,time()+5),nil}
  1834. if(stunScr)then
  1835. stunScr.Disabled=false
  1836. stunScr.Parent=Who
  1837. local stunEmit = FXFolder:FindFirstChild'AttEffects' and FXFolder.AttEffects:FindFirstChild'Stun'
  1838. local hed = Who:FindFirstChild'Head'
  1839. if(stunEmit)then
  1840. local e = stunEmit:Clone()
  1841. e.Name='StunEmitter'
  1842. e.Parent=hed
  1843. Weld(e,hed)
  1844. t[3]=e
  1845. end
  1846. end
  1847. Stunned[Who] = t
  1848. elseif(DamageType == 'Burn' and HitTorso and not Burned[Who])then
  1849. local t = {0,M.RNG(time()+3,time()+5)}
  1850. local fireEmit = FXFolder:FindFirstChild'AttEffects' and FXFolder.AttEffects:FindFirstChild'Burn'
  1851. local ww = Humanoid.WalkSpeed/2
  1852. t[5] = Humanoid.WalkSpeed
  1853. Humanoid.WalkSpeed = ww
  1854. local h = Humanoid.Changed:connect(function(o)
  1855. if(Humanoid.WalkSpeed ~= ww)then
  1856. print'change'
  1857. Burned[Who][5]=Humanoid.WalkSpeed
  1858. ww = Humanoid.WalkSpeed/2
  1859. Humanoid.WalkSpeed = ww
  1860. end
  1861. end)
  1862.  
  1863. if(fireEmit)then
  1864. local e = fireEmit:Clone()
  1865. e.Name='FireEmitter'
  1866. e.Parent=HitTorso
  1867. t[3]=e
  1868. end
  1869. t[4] = h
  1870.  
  1871. Burned[Who] = t
  1872. end
  1873. end
  1874. end
  1875. end
  1876. end
  1877. end
  1878.  
  1879. function AOEDamage(where,range,options)
  1880. local hit = {}
  1881. for _,v in next, getRegion(where,range,{Char}) do
  1882. if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' and not hit[v.Parent])then
  1883. local callTable = {Who=v.Parent}
  1884. hit[v.Parent] = true
  1885. for _,v in next, options do callTable[_] = v end
  1886. DealDamage(callTable)
  1887. end
  1888. end
  1889. return hit
  1890. end
  1891.  
  1892. function AOEHeal(where,range,amount)
  1893. local healed = {}
  1894. for _,v in next, getRegion(where,range,{Char}) do
  1895. local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil)
  1896. if(hum and not healed[hum])then
  1897. hum.Health = hum.Health + amount
  1898. if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then
  1899. ShowDamage((v.Parent.Head.CFrame * CF.N(0, 0, (v.Parent.Head.Size.Z / 2)).p+V3.N(0,1.5,0)), "+"..amount, 1.5, BrickColor.new'Lime green'.Color)
  1900. end
  1901. end
  1902. end
  1903. end
  1904.  
  1905. --// Wrap it all up \\--
  1906.  
  1907. Mouse.Button1Down:connect(function(k)
  1908. Attack = true
  1909. end)
  1910.  
  1911. Mouse.Button1Up:connect(function(k)
  1912. Attack = false
  1913. end)
  1914.  
  1915. coroutine.resume(coroutine.create(function() -- Stun Damage Loop
  1916. while true do
  1917. swait()
  1918. for who,data in next, Stunned do
  1919. local lastBurn, burnMaxTime, emitter = unpack(data)
  1920. if(time()-lastBurn >= .5)then
  1921. data[1] = time()
  1922. for _,v in next, who:children() do if(v.Name == 'Health' and v:IsA'Script')then v.Disabled = true end end
  1923. local hum = who:FindFirstChildOfClass'Humanoid'
  1924. local tors = GetTorso(who)
  1925. if(time() >= burnMaxTime or hum and hum.Health <= 0)then
  1926. local f=Instance.new("BoolValue")
  1927. f.Name = 'ResumeControl'
  1928. f.Parent = who
  1929. if(emitter)then
  1930. emitter:destroy()
  1931. end
  1932. Stunned[who] = nil;
  1933. for _,v in next, who:children() do if(v.Name == 'Health' and v:IsA'Script')then v.Disabled = false end end
  1934. end
  1935. end
  1936. end
  1937. end
  1938. end))
  1939.  
  1940. coroutine.resume(coroutine.create(function() -- Burn Damage Loop
  1941. while true do
  1942. swait(1)
  1943. for who,data in next, Burned do
  1944. local lastBurn, burnMaxTime, emitter, conn, orig = unpack(data)
  1945. if(time()-lastBurn >= .35)then
  1946. data[1] = time()
  1947. for _,v in next, who:children() do if(v.Name == 'Health' and v:IsA'Script')then v.Disabled = true end end
  1948. local hum = who:FindFirstChildOfClass'Humanoid'
  1949. local tors = GetTorso(who)
  1950. local damage = M.RNG(1,3)
  1951. hum.Health = hum.Health-damage
  1952. if(who:FindFirstChild'Head')then
  1953. ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), damage, 1.5, BrickColor.new'Bright orange'.Color)
  1954. end
  1955. local c = Instance.new("ObjectValue",Hum)
  1956. c.Name = "creator"
  1957. c.Value = owner
  1958. S.Debris:AddItem(c,0.35)
  1959. hum.WalkSpeed=orig/2
  1960. if(time() >= burnMaxTime or hum and hum.Health <= 0)then
  1961. conn:disconnect()
  1962. hum.WalkSpeed=orig
  1963. if(emitter)then
  1964. emitter:destroy()
  1965. end
  1966. Burned[who] = nil;
  1967. for _,v in next, who:children() do if(v.Name == 'Health' and v:IsA'Script')then v.Disabled = false end end
  1968. end
  1969. end
  1970. end
  1971. end
  1972. end))
  1973.  
  1974. while true do
  1975. swait()
  1976.  
  1977. if(Attack)then
  1978. local bigFlame = emit2:FindFirstChild'Fire'
  1979. local smlFlame = emit:FindFirstChild'Fire'
  1980. local smonk = emit:FindFirstChild'Smoke'
  1981. local bsmonk = emit2:FindFirstChild'Smoke'
  1982. if(smlFlame and bigFlame)then
  1983. bigFlame.Enabled=true
  1984. smlFlame.Enabled=false
  1985. pcall(function()
  1986. smonk.Enabled=false
  1987. bsmonk.Enabled=true
  1988. end)
  1989. end
  1990. AOEDamage(emit.Position,5,{MinimumDamage=1,MaximumDamage=1,DamageFX={Type='Burn'}})
  1991. else
  1992. local bigFlame = emit2:FindFirstChild'Fire'
  1993. local smlFlame = emit:FindFirstChild'Fire'
  1994. local smonk = emit:FindFirstChild'Smoke'
  1995. local bsmonk = emit2:FindFirstChild'Smoke'
  1996. if(smlFlame and bigFlame)then
  1997. bigFlame.Enabled=false
  1998. smlFlame.Enabled=true
  1999. pcall(function()
  2000. smonk.Enabled=true
  2001. bsmonk.Enabled=false
  2002. end)
  2003. end
  2004. end
  2005. Sine = Sine + Change
  2006. if(not Music or not Music.Parent)then
  2007. local tp = (Music and Music.TimePosition)
  2008. Music = Sound(Char,MusicID,1,1,true,false,true)
  2009. Music.MaxDistance = 50
  2010. Music.Name = 'Music'
  2011. Music.TimePosition = tp
  2012. end
  2013. Music.SoundId = "rbxassetid://"..MusicID
  2014. Music.Parent = Torso
  2015. Music.Pitch = 1
  2016. Music.Volume = 1
  2017. Music.MaxDistance = 50
  2018. if(not Muted)then
  2019. Music:Resume()
  2020. else
  2021. Music:Pause()
  2022. end
  2023.  
  2024.  
  2025. if(God)then
  2026. Hum.MaxHealth = 1e100
  2027. Hum.Health = 1e100
  2028. if(not Char:FindFirstChildOfClass'ForceField')then IN("ForceField",Char).Visible = false end
  2029. Hum.Name = M.RNG()*100
  2030. end
  2031.  
  2032. local hitfloor,posfloor = workspace:FindPartOnRay(Ray.new(Root.CFrame.p,((CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector).unit * (4*PlayerSize)), Char)
  2033.  
  2034. local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1)
  2035. local State = (Hum.PlatformStand and 'Paralyzed' or Hum.Sit and 'Sit' or not hitfloor and Root.Velocity.y < -1 and "Fall" or not hitfloor and Root.Velocity.y > 1 and "Jump" or hitfloor and Walking and (Hum.WalkSpeed < 24 and "Walk" or "Run") or hitfloor and "Idle")
  2036. if(not Effects or not Effects.Parent)then
  2037. Effects = IN("Model",Char)
  2038. Effects.Name = "Effects"
  2039. end
  2040. if(State == 'Run')then
  2041. local wsVal = 7 / (Hum.WalkSpeed/16)
  2042. local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
  2043. Change = 1
  2044. RH.C1 = RH.C1:lerp(CF.N(0,1*PlayerSize-.1*M.C(Sine/wsVal),0+.2*M.C(Sine/wsVal))*CF.A(M.R(8-0*M.C(Sine/wsVal))+-M.S(Sine/wsVal)/1.5,0,0),.2)
  2045. LH.C1 = LH.C1:lerp(CF.N(0,1*PlayerSize+.1*M.C(Sine/wsVal),0-.2*M.C(Sine/wsVal))*CF.A(M.R(8+0*M.C(Sine/wsVal))+M.S(Sine/wsVal)/1.5,0,0),.2)
  2046. elseif(State == 'Walk')then
  2047. local wsVal = 7 / (Hum.WalkSpeed/16)
  2048. local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
  2049. Change = 1
  2050. RH.C1 = RH.C1:lerp(CF.N(0,1*PlayerSize-.5*M.C(Sine/wsVal)/2,0+.5*M.C(Sine/wsVal)/2)*CF.A(M.R(15-25*M.C(Sine/wsVal))+-M.S(Sine/wsVal)/2.5,0,0),Alpha)
  2051. LH.C1 = LH.C1:lerp(CF.N(0,1*PlayerSize+.5*M.C(Sine/wsVal)/2,0-.5*M.C(Sine/wsVal)/2)*CF.A(M.R(15+25*M.C(Sine/wsVal))+M.S(Sine/wsVal)/2.5,0,0),Alpha)
  2052. else
  2053. RH.C1 = RH.C1:lerp(CF.N(0,1,0),.2)
  2054. LH.C1 = LH.C1:lerp(CF.N(0,1,0),.2)
  2055. end
  2056. Hum.WalkSpeed = WalkSpeed
  2057. if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end
  2058. if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end
  2059.  
  2060. if(NeutralAnims)then
  2061. if(State == 'Idle')then
  2062. local Alpha = .1
  2063. Change = 1
  2064. RJ.C0 = RJ.C0:lerp(RJC0*CF.N(0,0+.1*M.C(Sine/38),0)*CF.A(0,M.R(-25),0),Alpha)
  2065. NK.C0 = NK.C0:lerp(NKC0*CF.A(0,M.R(25),0),Alpha)
  2066. LS.C0 = LS.C0:lerp(LSC0*CF.N(.95,-.1+.1*M.S(Sine/38),-.3)*CF.A(M.R(65),0,M.R(25)),Alpha)
  2067. RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0+.1*M.S(Sine/38),.3)*CF.A(M.R(65),0,M.R(-25)),Alpha)
  2068. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0-.1*M.C(Sine/38),0),Alpha)
  2069. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0-.1*M.C(Sine/38),0),Alpha)
  2070. HW.C0 = HW.C0:lerp(HWC0*CF.N(.5,-.4,0)*CF.A(0,M.R(-5),0),Alpha)
  2071. -- idle
  2072. elseif(State == 'Run')then
  2073. local wsVal = 7 / (Hum.WalkSpeed/16)
  2074. local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
  2075. RJ.C0 = RJ.C0:lerp(CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(-15+2.5*M.C(Sine/(wsVal/2))),M.R(8*M.C(Sine/wsVal)),0),Alpha)
  2076. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  2077. LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,0-.3*M.S(Sine/wsVal))*CF.A(M.R(0+45*M.S(Sine/wsVal)),0,M.R(-5)),Alpha)
  2078. RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,0+.3*M.S(Sine/wsVal))*CF.A(M.R(0-45*M.S(Sine/wsVal)),0,M.R(5)),Alpha)
  2079. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha)
  2080. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha)
  2081. elseif(State == 'Walk')then
  2082. local wsVal = 7 / (Hum.WalkSpeed/16)
  2083. local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
  2084. local Alpha2 = math.min(.15 * (Hum.WalkSpeed/16),1)
  2085. RJ.C0 = RJ.C0:lerp(RJC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)+-M.S(Sine/(wsVal/2))/7),0)*CF.A(0,M.R(-25),0),Alpha)
  2086. NK.C0 = NK.C0:lerp(NKC0*CF.A(0,M.R(25),0),Alpha)
  2087. LS.C0 = LS.C0:lerp(LSC0*CF.N(.95,-.1+.1*M.S(Sine/38),-.3)*CF.A(M.R(65),0,M.R(25)),Alpha)
  2088. RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0+.1*M.S(Sine/38),.3)*CF.A(M.R(65),0,M.R(-25)),Alpha)
  2089. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0),Alpha)
  2090. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0),Alpha)
  2091. HW.C0 = HW.C0:lerp(HWC0*CF.N(.5,-.4,0)*CF.A(0,M.R(-5),0),Alpha)
  2092. elseif(State == 'Jump')then
  2093. local Alpha = .1
  2094. local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90))
  2095. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)),Alpha)
  2096. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)),Alpha)
  2097. RJ.C0 = RJ.C0:lerp(RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  2098. NK.C0 = NK.C0:lerp(NKC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  2099. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  2100. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  2101. elseif(State == 'Fall')then
  2102. local Alpha = .1
  2103. local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90))
  2104. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha)
  2105. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha)
  2106. RJ.C0 = RJ.C0:lerp(RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  2107. NK.C0 = NK.C0:lerp(NKC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  2108. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  2109. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  2110. elseif(State == 'Paralyzed')then
  2111. -- paralyzed
  2112. elseif(State == 'Sit')then
  2113. -- sit
  2114. end
  2115. end
  2116.  
  2117. for i,v in next, BloodPuddles do
  2118. local mesh = i:FindFirstChild'CylinderMesh'
  2119. BloodPuddles[i] = v + 1
  2120. if(not mesh or i.Transparency >= 1)then
  2121. i:destroy()
  2122. BloodPuddles[i] = nil
  2123. elseif(v >= Frame_Speed*4)then
  2124. local trans = (v-Frame_Speed*4)/(Frame_Speed*2)
  2125. i.Transparency = trans
  2126. if(mesh.Scale.Z > 0)then
  2127. mesh.Scale = mesh.Scale-V3.N(.05,0,.05)
  2128. end
  2129. else
  2130. i.Transparency = 0
  2131. end
  2132. end
  2133. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement