Advertisement
kqdragon

kid

Mar 31st, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 48.71 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  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,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = owner
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87. --[[ A script By makhail07
  88.  
  89.  
  90. Discord demitasse#2958
  91.  
  92. Description:Just,Just......Why?
  93.  
  94. Also Join Our Discord Server :D discord.gg/fhhzeNq
  95. ]]--
  96.  
  97. local IDs = {340106355,927529620,876981900,840433326}
  98.  
  99. function swait(num)
  100. if num==0 or num==nil then
  101. game:service'RunService'.Stepped:wait(0)
  102. else
  103. for i=0,num do
  104. game:service'RunService'.Stepped:wait(0)
  105. end
  106. end
  107. end
  108. function thread(f)
  109. coroutine.resume(coroutine.create(f))
  110. end
  111. function clerp(a, b, t)
  112. local qa = {
  113. QuaternionFromCFrame(a)
  114. }
  115. local qb = {
  116. QuaternionFromCFrame(b)
  117. }
  118. local ax, ay, az = a.x, a.y, a.z
  119. local bx, by, bz = b.x, b.y, b.z
  120. local _t = 1 - t
  121. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  122. end
  123. function QuaternionFromCFrame(cf)
  124. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  125. local trace = m00 + m11 + m22
  126. if trace > 0 then
  127. local s = math.sqrt(1 + trace)
  128. local recip = 0.5 / s
  129. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  130. else
  131. local i = 0
  132. if m00 < m11 then
  133. i = 1
  134. end
  135. if m22 > (i == 0 and m00 or m11) then
  136. i = 2
  137. end
  138. if i == 0 then
  139. local s = math.sqrt(m00 - m11 - m22 + 1)
  140. local recip = 0.5 / s
  141. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  142. elseif i == 1 then
  143. local s = math.sqrt(m11 - m22 - m00 + 1)
  144. local recip = 0.5 / s
  145. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  146. elseif i == 2 then
  147. local s = math.sqrt(m22 - m00 - m11 + 1)
  148. local recip = 0.5 / s
  149. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  150. end
  151. end
  152. end
  153. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  154. local xs, ys, zs = x + x, y + y, z + z
  155. local wx, wy, wz = w * xs, w * ys, w * zs
  156. local xx = x * xs
  157. local xy = x * ys
  158. local xz = x * zs
  159. local yy = y * ys
  160. local yz = y * zs
  161. local zz = z * zs
  162. return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  163. end
  164. function QuaternionSlerp(a, b, t)
  165. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  166. local startInterp, finishInterp
  167. if cosTheta >= 1.0E-4 then
  168. if 1 - cosTheta > 1.0E-4 then
  169. local theta = math.acos(cosTheta)
  170. local invSinTheta = 1 / math.sin(theta)
  171. startInterp = math.sin((1 - t) * theta) * invSinTheta
  172. finishInterp = math.sin(t * theta) * invSinTheta
  173. else
  174. startInterp = 1 - t
  175. finishInterp = t
  176. end
  177. elseif 1 + cosTheta > 1.0E-4 then
  178. local theta = math.acos(-cosTheta)
  179. local invSinTheta = 1 / math.sin(theta)
  180. startInterp = math.sin((t - 1) * theta) * invSinTheta
  181. finishInterp = math.sin(t * theta) * invSinTheta
  182. else
  183. startInterp = t - 1
  184. finishInterp = t
  185. end
  186. return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
  187. end
  188. function rayCast(Position, Direction, Range, Ignore)
  189. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  190. end
  191. --Wait what okay
  192. wait()
  193. local plr = owner
  194. local char = plr.Character
  195. local hum = char.Humanoid
  196. local ra = char["Right Arm"]
  197. local la= char["Left Arm"]
  198. local rl= char["Right Leg"]
  199. local ll = char["Left Leg"]
  200. local hed = char.Head
  201. local root = char.HumanoidRootPart
  202. local rootj = root.RootJoint
  203. local tors = char.Torso
  204. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  205. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  206. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  207. local maincolor = BrickColor.new("Magenta")
  208. cf = CFrame.new
  209. angles = CFrame.Angles
  210. attack = false
  211. euler=CFrame.fromEulerAnglesXYZ
  212. equipped = false
  213. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  214. RSH, LSH = nil, nil
  215. RW = Instance.new("Weld")
  216. LW = Instance.new("Weld")
  217. RH = tors["Right Hip"]
  218. LH = tors["Left Hip"]
  219. RSH = tors["Right Shoulder"]
  220. LSH = tors["Left Shoulder"]
  221. RSH.Parent = nil
  222. LSH.Parent = nil
  223. RW.Name = "RW"
  224. RW.Part0 = tors
  225. RW.C0 = CFrame.new(1.5, 0.5, 0)
  226. RW.C1 = CFrame.new(0, 0.5, 0)
  227. RW.Part1 = ra
  228. RW.Parent = tors
  229. LW.Name = "LW"
  230. LW.Part0 = tors
  231. LW.C0 = CFrame.new(-1.5, 0.5, 0)
  232. LW.C1 = CFrame.new(0, 0.5, 0)
  233. LW.Part1 = la
  234. LW.Parent = tors
  235. print('User is '..plr.Name)
  236. Effects = {}
  237.  
  238. ArtificialHB = Instance.new("BindableEvent", script)
  239. ArtificialHB.Name = "Heartbeat"
  240.  
  241. script:WaitForChild("Heartbeat")
  242.  
  243. frame = 1 / 60
  244. tf = 0
  245. allowframeloss = false
  246. tossremainder = false
  247. lastframe = tick()
  248. script.Heartbeat:Fire()
  249.  
  250. game:GetService("RunService").Heartbeat:connect(function(s, p)
  251. tf = tf + s
  252. if tf >= frame then
  253. if allowframeloss then
  254. script.Heartbeat:Fire()
  255. lastframe = tick()
  256. else
  257. for i = 1, math.floor(tf / frame) do
  258. script.Heartbeat:Fire()
  259. end
  260. lastframe = tick()
  261. end
  262. if tossremainder then
  263. tf = 0
  264. else
  265. tf = tf - frame * math.floor(tf / frame)
  266. end
  267. end
  268. end)
  269. local RbxUtility = LoadLibrary("RbxUtility")
  270. local Create = RbxUtility.Create
  271.  
  272. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  273. if hit.Parent == nil then
  274. return
  275. end
  276. local h = hit.Parent:FindFirstChildOfClass("Humanoid")
  277. for _, v in pairs(hit.Parent:children()) do
  278. if v:IsA("Humanoid") then
  279. h = v
  280. end
  281. end
  282. if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then
  283. warn'No R15 allowed'
  284. hit.Parent:FindFirstChild("Head"):BreakJoints()
  285. end
  286.  
  287. if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  288. if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  289. if hit.Parent.DebounceHit.Value == true then
  290. return
  291. end
  292. end
  293. if insta == true then
  294. hit.Parent:FindFirstChild("Head"):BreakJoints()
  295. end
  296. local c = Create("ObjectValue"){
  297. Name = "creator",
  298. Value = game:service("Players").LocalPlayer,
  299. Parent = h,
  300. }
  301. game:GetService("Debris"):AddItem(c, .5)
  302. if HitSound ~= nil and HitPitch ~= nil then
  303. CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  304. end
  305. local Damage = math.random(minim, maxim)
  306. local blocked = false
  307. local block = hit.Parent:findFirstChild("Block")
  308. if block ~= nil then
  309. if block.className == "IntValue" then
  310. if block.Value > 0 then
  311. blocked = true
  312. block.Value = block.Value - 1
  313. print(block.Value)
  314. end
  315. end
  316. end
  317. if blocked == false then
  318. h.Health = h.Health - Damage
  319. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  320. else
  321. h.Health = h.Health - (Damage / 2)
  322. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  323. end
  324. if Type == "Knockdown" then
  325. local hum = hit.Parent.Humanoid
  326. hum.PlatformStand = true
  327. coroutine.resume(coroutine.create(function(HHumanoid)
  328. swait(1)
  329. HHumanoid.PlatformStand = false
  330. end), hum)
  331. local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  332. local bodvol = Create("BodyVelocity"){
  333. velocity = angle * knockback,
  334. P = 5000,
  335. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  336. Parent = hit,
  337. }
  338. local rl = Create("BodyAngularVelocity"){
  339. P = 3000,
  340. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  341. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  342. Parent = hit,
  343. }
  344. game:GetService("Debris"):AddItem(bodvol, .5)
  345. game:GetService("Debris"):AddItem(rl, .5)
  346. elseif Type == "Normal" then
  347. local vp = Create("BodyVelocity"){
  348. P = 500,
  349. maxForce = Vector3.new(math.huge, 0, math.huge),
  350. velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
  351. }
  352. if knockback > 0 then
  353. vp.Parent = hit.Parent.Torso
  354. end
  355. game:GetService("Debris"):AddItem(vp, .5)
  356. elseif Type == "Up" then
  357. local bodyVelocity = Create("BodyVelocity"){
  358. velocity = Vector3.new(0, 20, 0),
  359. P = 5000,
  360. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  361. Parent = hit,
  362. }
  363. game:GetService("Debris"):AddItem(bodyVelocity, .5)
  364. elseif Type == "DarkUp" then
  365. coroutine.resume(coroutine.create(function()
  366. for i = 0, 1, 0.1 do
  367. swait()
  368. Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
  369. end
  370. end))
  371. local bodyVelocity = Create("BodyVelocity"){
  372. velocity = Vector3.new(0, 20, 0),
  373. P = 5000,
  374. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  375. Parent = hit,
  376. }
  377. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  378. elseif Type == "Snare" then
  379. local bp = Create("BodyPosition"){
  380. P = 2000,
  381. D = 100,
  382. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  383. position = hit.Parent.Torso.Position,
  384. Parent = hit.Parent.Torso,
  385. }
  386. game:GetService("Debris"):AddItem(bp, 1)
  387. elseif Type == "Freeze" then
  388. local BodPos = Create("BodyPosition"){
  389. P = 50000,
  390. D = 1000,
  391. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  392. position = hit.Parent.Torso.Position,
  393. Parent = hit.Parent.Torso,
  394. }
  395. local BodGy = Create("BodyGyro") {
  396. maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  397. P = 20e+003,
  398. Parent = hit.Parent.Torso,
  399. cframe = hit.Parent.Torso.CFrame,
  400. }
  401. hit.Parent.Torso.Anchored = true
  402. coroutine.resume(coroutine.create(function(Part)
  403. swait(1.5)
  404. Part.Anchored = false
  405. end), hit.Parent.Torso)
  406. game:GetService("Debris"):AddItem(BodPos, 3)
  407. game:GetService("Debris"):AddItem(BodGy, 3)
  408. end
  409. local debounce = Create("BoolValue"){
  410. Name = "DebounceHit",
  411. Parent = hit.Parent,
  412. Value = true,
  413. }
  414. game:GetService("Debris"):AddItem(debounce, Delay)
  415. c = Create("ObjectValue"){
  416. Name = "creator",
  417. Value = Player,
  418. Parent = h,
  419. }
  420. game:GetService("Debris"):AddItem(c, .5)
  421. end
  422. end
  423.  
  424. function ShowDamage(Pos, Text, Time, Color)
  425. local Rate = (1 / 30)
  426. local Pos = (Pos or Vector3.new(0, 0, 0))
  427. local Text = (Text or "")
  428. local Time = (Time or 2)
  429. local Color = (Color or Color3.new(1, 0, 1))
  430. local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  431. EffectPart.Anchored = true
  432. local BillboardGui = Create("BillboardGui"){
  433. Size = UDim2.new(3, 0, 3, 0),
  434. Adornee = EffectPart,
  435. Parent = EffectPart,
  436. }
  437. local TextLabel = Create("TextLabel"){
  438. BackgroundTransparency = 1,
  439. Size = UDim2.new(1, 0, 1, 0),
  440. Text = Text,
  441. Font = "Highway",
  442. TextColor3 = Color,
  443. TextScaled = true,
  444. Parent = BillboardGui,
  445. }
  446. game.Debris:AddItem(EffectPart, (Time))
  447. EffectPart.Parent = game:GetService("Workspace")
  448. delay(0, function()
  449. local Frames = (Time / Rate)
  450. for Frame = 1, Frames do
  451. wait(Rate)
  452. local Percent = (Frame / Frames)
  453. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  454. TextLabel.TextTransparency = Percent
  455. end
  456. if EffectPart and EffectPart.Parent then
  457. EffectPart:Destroy()
  458. end
  459. end)
  460. end
  461. function MagnitudeDamage(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch)
  462. for _, c in pairs(workspace:children()) do
  463. local hum = c:findFirstChild("Humanoid")
  464. if hum ~= nil then
  465. local head = c:findFirstChild("Torso") or c:findFirstChild("UpperTorso") or c:FindFirstChild('LowerTorso')
  466. if head ~= nil then
  467. local targ = head.Position - Part.Position
  468. local mag = targ.magnitude
  469. if mag <= Magnitude and c.Name ~= plr.Name then
  470. Damage(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, root, .1, "rbxassetid://" .. HitSound, HitPitch)
  471. end
  472. end
  473. end
  474. end
  475. end
  476. CFuncs = {
  477. Part = {
  478. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  479. local Part = Create("Part")({
  480. Parent = Parent,
  481. Reflectance = Reflectance,
  482. Transparency = Transparency,
  483. CanCollide = false,
  484. Locked = true,
  485. BrickColor = BrickColor.new(tostring(BColor)),
  486. Name = Name,
  487. Size = Size,
  488. Material = Material
  489. })
  490. RemoveOutlines(Part)
  491. return Part
  492. end
  493. },
  494. Mesh = {
  495. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  496. local Msh = Create(Mesh)({
  497. Parent = Part,
  498. Offset = OffSet,
  499. Scale = Scale
  500. })
  501. if Mesh == "SpecialMesh" then
  502. Msh.MeshType = MeshType
  503. Msh.MeshId = MeshId
  504. end
  505. return Msh
  506. end
  507. },
  508. Mesh = {
  509. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  510. local Msh = Create(Mesh)({
  511. Parent = Part,
  512. Offset = OffSet,
  513. Scale = Scale
  514. })
  515. if Mesh == "SpecialMesh" then
  516. Msh.MeshType = MeshType
  517. Msh.MeshId = MeshId
  518. end
  519. return Msh
  520. end
  521. },
  522. Weld = {
  523. Create = function(Parent, Part0, Part1, C0, C1)
  524. local Weld = Create("Weld")({
  525. Parent = Parent,
  526. Part0 = Part0,
  527. Part1 = Part1,
  528. C0 = C0,
  529. C1 = C1
  530. })
  531. return Weld
  532. end
  533. },
  534. Sound = {
  535. Create = function(id, par, vol, pit)
  536. coroutine.resume(coroutine.create(function()
  537. local S = Create("Sound")({
  538. Volume = vol,
  539. Pitch = pit or 1,
  540. SoundId = id,
  541. Parent = par or workspace
  542. })
  543. wait()
  544. S:play()
  545. game:GetService("Debris"):AddItem(S, 6)
  546. end))
  547. end
  548. },
  549. ParticleEmitter = {
  550. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  551. local fp = Create("ParticleEmitter")({
  552. Parent = Parent,
  553. Color = ColorSequence.new(Color1, Color2),
  554. LightEmission = LightEmission,
  555. Size = Size,
  556. Texture = Texture,
  557. Transparency = Transparency,
  558. ZOffset = ZOffset,
  559. Acceleration = Accel,
  560. Drag = Drag,
  561. LockedToPart = LockedToPart,
  562. VelocityInheritance = VelocityInheritance,
  563. EmissionDirection = EmissionDirection,
  564. Enabled = Enabled,
  565. Lifetime = LifeTime,
  566. Rate = Rate,
  567. Rotation = Rotation,
  568. RotSpeed = RotSpeed,
  569. Speed = Speed,
  570. VelocitySpread = VelocitySpread
  571. })
  572. return fp
  573. end
  574. }
  575. }
  576. function RemoveOutlines(part)
  577. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  578. end
  579. function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  580. local Part = Create("Part")({
  581. formFactor = FormFactor,
  582. Parent = Parent,
  583. Reflectance = Reflectance,
  584. Transparency = Transparency,
  585. CanCollide = false,
  586. Locked = true,
  587. BrickColor = BrickColor.new(tostring(BColor)),
  588. Name = Name,
  589. Size = Size,
  590. Material = Material
  591. })
  592. RemoveOutlines(Part)
  593. return Part
  594. end
  595. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  596. local Msh = Create(Mesh)({
  597. Parent = Part,
  598. Offset = OffSet,
  599. Scale = Scale
  600. })
  601. if Mesh == "SpecialMesh" then
  602. Msh.MeshType = MeshType
  603. Msh.MeshId = MeshId
  604. end
  605. return Msh
  606. end
  607. function CreateWeld(Parent, Part0, Part1, C0, C1)
  608. local Weld = Create("Weld")({
  609. Parent = Parent,
  610. Part0 = Part0,
  611. Part1 = Part1,
  612. C0 = C0,
  613. C1 = C1
  614. })
  615. return Weld
  616. end
  617. EffectModel = Instance.new("Model", char)
  618. Effects = {
  619. Block = {
  620. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  621. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  622. prt.Anchored = true
  623. prt.CFrame = cframe
  624. local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  625. game:GetService("Debris"):AddItem(prt, 10)
  626. if Type == 1 or Type == nil then
  627. table.insert(Effects, {
  628. prt,
  629. "Block1",
  630. delay,
  631. x3,
  632. y3,
  633. z3,
  634. msh
  635. })
  636. elseif Type == 2 then
  637. table.insert(Effects, {
  638. prt,
  639. "Block2",
  640. delay,
  641. x3,
  642. y3,
  643. z3,
  644. msh
  645. })
  646. else
  647. table.insert(Effects, {
  648. prt,
  649. "Block3",
  650. delay,
  651. x3,
  652. y3,
  653. z3,
  654. msh
  655. })
  656. end
  657. end
  658. },
  659. Sphere = {
  660. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  661. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  662. prt.Anchored = true
  663. prt.CFrame = cframe
  664. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  665. game:GetService("Debris"):AddItem(prt, 10)
  666. table.insert(Effects, {
  667. prt,
  668. "Cylinder",
  669. delay,
  670. x3,
  671. y3,
  672. z3,
  673. msh
  674. })
  675. end
  676. },
  677. Cylinder = {
  678. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  679. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  680. prt.Anchored = true
  681. prt.CFrame = cframe
  682. local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  683. game:GetService("Debris"):AddItem(prt, 10)
  684. table.insert(Effects, {
  685. prt,
  686. "Cylinder",
  687. delay,
  688. x3,
  689. y3,
  690. z3,
  691. msh
  692. })
  693. end
  694. },
  695. Wave = {
  696. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  697. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  698. prt.Anchored = true
  699. prt.CFrame = cframe
  700. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://431164262", Vector3.new(0, 0, 0), Vector3.new(x1 / 60, y1 / 60, z1 / 60))
  701. game:GetService("Debris"):AddItem(prt, 10)
  702. table.insert(Effects, {
  703. prt,
  704. "Cylinder",
  705. delay,
  706. x3 / 60,
  707. y3 / 60,
  708. z3 / 60,
  709. msh
  710. })
  711. end
  712. },
  713. Ring = {
  714. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  715. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  716. prt.Anchored = true
  717. prt.CFrame = cframe
  718. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  719. game:GetService("Debris"):AddItem(prt, 10)
  720. table.insert(Effects, {
  721. prt,
  722. "Cylinder",
  723. delay,
  724. x3,
  725. y3,
  726. z3,
  727. msh
  728. })
  729. end
  730. },
  731. Break = {
  732. Create = function(brickcolor, cframe, x1, y1, z1)
  733. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  734. prt.Anchored = true
  735. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  736. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  737. local num = math.random(10, 50) / 1000
  738. game:GetService("Debris"):AddItem(prt, 10)
  739. table.insert(Effects, {
  740. prt,
  741. "Shatter",
  742. num,
  743. prt.CFrame,
  744. math.random() - math.random(),
  745. 0,
  746. math.random(50, 100) / 100
  747. })
  748. end
  749. }
  750. }
  751. function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  752. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  753. prt.Anchored = true
  754. prt.CFrame = cframe
  755. local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  756. game:GetService("Debris"):AddItem(prt, 10)
  757. if Type == 1 or Type == nil then
  758. table.insert(Effects, {
  759. prt,
  760. "Block1",
  761. delay,
  762. x3,
  763. y3,
  764. z3,
  765. msh
  766. })
  767. elseif Type == 2 then
  768. table.insert(Effects, {
  769. prt,
  770. "Block2",
  771. delay,
  772. x3,
  773. y3,
  774. z3,
  775. msh
  776. })
  777. elseif Type == 3 then
  778. table.insert(Effects, {
  779. prt,
  780. "Block3",
  781. delay,
  782. x3,
  783. y3,
  784. z3,
  785. msh
  786. })
  787. end
  788. end
  789. function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  790. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  791. prt.Anchored = true
  792. prt.CFrame = cframe
  793. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  794. game:GetService("Debris"):AddItem(prt, 10)
  795. table.insert(Effects, {
  796. prt,
  797. "Cylinder",
  798. delay,
  799. x3,
  800. y3,
  801. z3,
  802. msh
  803. })
  804. end
  805. function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  806. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  807. prt.Anchored = true
  808. prt.CFrame = cframe * CFrame.new(x1, y1, z1)
  809. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "264766957", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  810. game:GetService("Debris"):AddItem(prt, 10)
  811. table.insert(Effects, {
  812. prt,
  813. "Cylinder",
  814. delay,
  815. x3,
  816. y3,
  817. z3,
  818. msh
  819. })
  820. end
  821. function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  822. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  823. prt.Anchored = true
  824. prt.CFrame = cframe
  825. local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  826. game:GetService("Debris"):AddItem(prt, 10)
  827. table.insert(Effects, {
  828. prt,
  829. "Cylinder",
  830. delay,
  831. x3,
  832. y3,
  833. z3,
  834. msh
  835. })
  836. end
  837. function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  838. local prt = CreatePart(3, workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  839. prt.Anchored = true
  840. prt.CFrame = cframe
  841. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "264766957", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  842. game:GetService("Debris"):AddItem(prt, 10)
  843. table.insert(Effects, {
  844. prt,
  845. "Cylinder",
  846. delay,
  847. x3,
  848. y3,
  849. z3,
  850. msh
  851. })
  852. end
  853. function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  854. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  855. prt.Anchored = true
  856. prt.CFrame = cframe
  857. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  858. game:GetService("Debris"):AddItem(prt, 10)
  859. table.insert(Effects, {
  860. prt,
  861. "Cylinder",
  862. delay,
  863. x3,
  864. y3,
  865. z3,
  866. msh
  867. })
  868. end
  869. function BreakEffect(brickcolor, cframe, x1, y1, z1)
  870. local prt = CreatePart(3, workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  871. prt.Anchored = true
  872. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  873. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  874. local num = math.random(10, 50) / 1000
  875. game:GetService("Debris"):AddItem(prt, 10)
  876. table.insert(Effects, {
  877. prt,
  878. "Shatter",
  879. num,
  880. prt.CFrame,
  881. math.random() - math.random(),
  882. 0,
  883. math.random(50, 100) / 100
  884. })
  885. end
  886.  
  887.  
  888.  
  889.  
  890.  
  891. --[[
  892. Thanks for using Build-To-Lua by jarredbcv.
  893. ]]--
  894.  
  895. New = function(Object, Parent, Name, Data)
  896. local Object = Instance.new(Object)
  897. for Index, Value in pairs(Data or {}) do
  898. Object[Index] = Value
  899. end
  900. Object.Parent = Parent
  901. Object.Name = Name
  902. return Object
  903. end
  904.  
  905. Model = New("Model",char,"Model",{})
  906. Handle = New("Part",Model,"Handle",{BrickColor = BrickColor.new("Reddish brown"),Material = Enum.Material.Wood,Size = Vector3.new(0.300000131, 3.89999866, 0.299999565),CFrame = CFrame.new(119.050049, 1.950001, -79.2499695, 1, 0, 0, 0, 1, 0, 0, 0, 1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.411765, 0.25098, 0.156863),})
  907. Part = New("Part",Model,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.300000012, 0.199998289, 0.299999565),CFrame = CFrame.new(120.651886, 3.42561507, -79.2499695, 0, 0.342021108, -0.939692378, 0, 0.939692378, 0.342021108, 1, 0, 0),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  908. Mesh = New("SpecialMesh",Part,"Mesh",{MeshType = Enum.MeshType.Wedge,})
  909. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0.342021108, 0.939692378, 0, -0.939692378, 0.342021108, 0),C1 = CFrame.new(1.60183716, 1.47561407, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  910. Part = New("Part",Model,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.500000119, 0.499998271, 0.499999553),CFrame = CFrame.new(119.050049, 3.54999804, -79.2499695, 1, 0, 0, 0, 1, 0, 0, 0, 1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  911. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(0, 1.59999704, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  912. Part = New("Part",Model,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.700000048, 0.199998289, 0.299999565),CFrame = CFrame.new(119.550079, 3.6999979, -79.2499695, 1, 0, 0, 0, 1, 0, 0, 0, 1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  913. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(0.500030518, 1.7499969, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  914. Part = New("Part",Model,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.700000048, 0.199998289, 0.299999565),CFrame = CFrame.new(120.195541, 3.5917089, -79.2499695, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736, 0, 0, 0, 1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  915. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0.939692736, -0.342019916, 0, 0.342019886, 0.939692736, 0, 0, 0, 1),C1 = CFrame.new(1.14549255, 1.6417079, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  916. Part = New("Part",Model,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.700000048, 0.199998289, 0.299999565),CFrame = CFrame.new(117.867294, 3.59170794, -79.2499771, -0.939692736, -0.342019886, 0, -0.342019916, 0.939692736, 0, 0, 0, -1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  917. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, -0.939692736, -0.342019916, 0, -0.342019886, 0.939692736, 0, 0, 0, -1),C1 = CFrame.new(-1.18275452, 1.64170694, -7.62939453e-06, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  918. Part = New("Part",Model,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.700000048, 0.199998289, 0.299999565),CFrame = CFrame.new(118.512802, 3.69999695, -79.2500076, -1, 0, 0, 0, 1, 0, 0, 0, -1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  919. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1),C1 = CFrame.new(-0.537246704, 1.74999595, -3.81469727e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  920. Part = New("Part",Model,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.300000012, 0.199998289, 0.299999565),CFrame = CFrame.new(117.410965, 3.42561197, -79.2499695, 0, -0.342022002, 0.93969208, 0, 0.93969202, 0.342022002, -1, 0, 0),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  921. Mesh = New("SpecialMesh",Part,"Mesh",{MeshType = Enum.MeshType.Wedge,})
  922. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1, -0.342022002, 0.93969202, 0, 0.93969208, 0.342022002, 0),C1 = CFrame.new(-1.63908386, 1.47561097, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  923.  
  924.  
  925. Sword = New("Model",char,"Sword",{})
  926. Handle2 = New("Part",Sword,"Handle",{BrickColor = BrickColor.new("Reddish brown"),Material = Enum.Material.Wood,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.399997711, 1.20000005, 0.200000003),CFrame = CFrame.new(115.200005, 4.20000219, -75.9000397, 1, 0, 0, 0, 1, 0, 0, 0, 1),BackSurface = Enum.SurfaceType.SmoothNoOutlines,BottomSurface = Enum.SurfaceType.SmoothNoOutlines,FrontSurface = Enum.SurfaceType.SmoothNoOutlines,LeftSurface = Enum.SurfaceType.SmoothNoOutlines,RightSurface = Enum.SurfaceType.SmoothNoOutlines,TopSurface = Enum.SurfaceType.SmoothNoOutlines,Color = Color3.new(0.411765, 0.25098, 0.156863),})
  927. Part = New("Part",Sword,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.SmoothPlastic,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.400000036, 0.400000036),CFrame = CFrame.new(115.400002, 8.40000153, -75.9000397, -1.49011612e-08, 0, -0.999999762, 0, 1, 0, 0.999999762, 0, -1.49011612e-08),BackSurface = Enum.SurfaceType.SmoothNoOutlines,BottomSurface = Enum.SurfaceType.SmoothNoOutlines,FrontSurface = Enum.SurfaceType.SmoothNoOutlines,LeftSurface = Enum.SurfaceType.SmoothNoOutlines,RightSurface = Enum.SurfaceType.SmoothNoOutlines,TopSurface = Enum.SurfaceType.SmoothNoOutlines,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  928. Mesh = New("SpecialMesh",Part,"Mesh",{MeshType = Enum.MeshType.Wedge,})
  929. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle2,C0 = CFrame.new(0, 0, 0, -1.49011612e-08, 0, 0.999999762, 0, 1, 0, -0.999999762, 0, -1.49011612e-08),C1 = CFrame.new(0.199996948, 4.19999933, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  930. Part = New("Part",Sword,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.SmoothPlastic,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.799997687, 3.20000005, 0.200000003),CFrame = CFrame.new(115.200005, 6.5999999, -75.9000397, 1, 0, 0, 0, 1, 0, 0, 0, 1),BackSurface = Enum.SurfaceType.SmoothNoOutlines,BottomSurface = Enum.SurfaceType.SmoothNoOutlines,FrontSurface = Enum.SurfaceType.SmoothNoOutlines,LeftSurface = Enum.SurfaceType.SmoothNoOutlines,RightSurface = Enum.SurfaceType.SmoothNoOutlines,TopSurface = Enum.SurfaceType.SmoothNoOutlines,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  931. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle2,C1 = CFrame.new(0, 2.39999771, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  932. Part = New("Part",Sword,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.SmoothPlastic,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.400000036, 0.400000036),CFrame = CFrame.new(115.000008, 8.40000153, -75.9000397, 7.4505806e-08, 0, 0.999999583, 0, 1, 0, -0.999999583, 0, 7.4505806e-08),BackSurface = Enum.SurfaceType.SmoothNoOutlines,BottomSurface = Enum.SurfaceType.SmoothNoOutlines,FrontSurface = Enum.SurfaceType.SmoothNoOutlines,LeftSurface = Enum.SurfaceType.SmoothNoOutlines,RightSurface = Enum.SurfaceType.SmoothNoOutlines,TopSurface = Enum.SurfaceType.SmoothNoOutlines,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  933. Mesh = New("SpecialMesh",Part,"Mesh",{MeshType = Enum.MeshType.Wedge,})
  934. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle2,C0 = CFrame.new(0, 0, 0, 7.4505806e-08, 0, -0.999999583, 0, 1, 0, 0.999999583, 0, 7.4505806e-08),C1 = CFrame.new(-0.199996948, 4.19999933, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  935. Part = New("Part",Sword,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.Slate,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(1.20000005, 0.200000003, 0.400000006),CFrame = CFrame.new(115.200005, 4.89999914, -75.9000397, 1, 0, 0, 0, 1, 0, 0, 0, 1),BackSurface = Enum.SurfaceType.SmoothNoOutlines,BottomSurface = Enum.SurfaceType.SmoothNoOutlines,FrontSurface = Enum.SurfaceType.SmoothNoOutlines,LeftSurface = Enum.SurfaceType.SmoothNoOutlines,RightSurface = Enum.SurfaceType.SmoothNoOutlines,TopSurface = Enum.SurfaceType.SmoothNoOutlines,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  936. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle2,C1 = CFrame.new(0, 0.699996948, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  937. Part = New("Part",Sword,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.Slate,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.5, 0.200000003, 0.300000012),CFrame = CFrame.new(115.200005, 3.50000191, -75.9000397, 1, 0, 0, 0, 1, 0, 0, 0, 1),BackSurface = Enum.SurfaceType.SmoothNoOutlines,BottomSurface = Enum.SurfaceType.SmoothNoOutlines,FrontSurface = Enum.SurfaceType.SmoothNoOutlines,LeftSurface = Enum.SurfaceType.SmoothNoOutlines,RightSurface = Enum.SurfaceType.SmoothNoOutlines,TopSurface = Enum.SurfaceType.SmoothNoOutlines,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  938. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle2,C1 = CFrame.new(0, -0.700000286, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  939. for _,v in next, Model:children() do
  940. if v:IsA'BasePart' then
  941.  
  942. v.CanCollide = false
  943. end
  944. end
  945. for _,v in next, Sword:children() do
  946. if v:IsA'BasePart' then
  947.  
  948.  
  949. v.CanCollide = false
  950. end
  951. end
  952.  
  953.  
  954.  
  955. local NewInstance = function(instance,parent,properties)
  956. local inst = Instance.new(instance,parent)
  957. if(properties)then
  958. for i,v in next, properties do
  959. pcall(function() inst[i] = v end)
  960. end
  961. end
  962. return inst;
  963. end
  964. local HW2 = NewInstance('Weld',char,{Part0=ra,Part1=Handle,C0 = CFrame.new(0,-1,-1)*CFrame.Angles(math.rad(-90),math.rad(90),math.rad(0))})
  965. local HW = NewInstance('Weld',char,{Part0=la,Part1=Handle2,C0 = CFrame.new(0,-1,0)*CFrame.Angles(math.rad(-90),math.rad(90),math.rad(0))})
  966. music = Instance.new("Sound",tors)
  967. music.SoundId = "rbxassetid://840433326"
  968. music.Volume = 1.5
  969. music.Looped = true
  970. music:Play()
  971. torch=false
  972. mouse.KeyDown:connect(function(key)
  973. if key == 'z' and attack == false and torch==false then
  974. UPick()
  975. torch=true
  976. elseif key == 'z' and attack == false and torch==true then
  977. Pick()
  978. torch=false
  979. end
  980. end)
  981.  
  982. function attackoneS()
  983. attack=true
  984. for i = 0,2,0.1 do
  985. swait()
  986. rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-90)),0.15)
  987. tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(90)),.3)
  988. HW.C0 = clerp(HW.C0, CFrame.new(0,-1,0) * angles(math.rad(0),math.rad(0),math.rad(125)),.2)
  989. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5+0.04, 0) * angles(math.rad(90 - 1), math.rad(0), math.rad(50)), 0.1)
  990. end
  991. local con = la.Touched:connect(function(hit)
  992. Damage(la, hit, 25, 34, math.random(1, 5), "Normal", root, .2, "rbxassetid://146163522", 1)
  993. end) --Was way to lazy to make a hitbox since this script was just me being fucking bored
  994. for i = 0,2,0.1 do
  995. swait()
  996. tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(90)),.3)
  997. rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-55)),0.15)
  998. LW.C0=clerp(LW.C0,cf(-1.5,.5,0)*angles(math.rad(89),math.rad(0),math.rad(-90)),.3)
  999. end
  1000. con:Disconnect()
  1001. attack=false
  1002. end
  1003.  
  1004. function attacktwoS()
  1005. attack=true
  1006. for i = 0,1.5,0.1 do
  1007. swait()
  1008. rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-55)),0.15)
  1009. RW.C0=clerp(RW.C0,cf(1.5,.5,0)*angles(math.rad(0),math.rad(0),math.rad(55)),.3)
  1010. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(90), math.rad(-0), math.rad(-55)),.2)
  1011. HW.C0 = clerp(HW.C0, CFrame.new(0,-1,0) * angles(math.rad(5),math.rad(90),math.rad(-90)),.2)
  1012. end
  1013. local con = ra.Touched:connect(function(hit)
  1014. Damage(ra, hit, 25, 34, math.random(1, 5), "Normal", root, .2, "rbxassetid://146163522", 1)
  1015. end) --Was way to lazy to make a hitbox since this script was just me being fucking bored
  1016. for i = 0,2,0.1 do
  1017. swait()
  1018. tors.Neck.C0=clerp(tors.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(-75)),.3)
  1019. rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(90)),0.15)
  1020. RW.C0=clerp(RW.C0,cf(1.5,.5,0)*angles(math.rad(0),math.rad(0),math.rad(90)),.3)
  1021. HW.C0 = clerp(HW.C0, CFrame.new(0,-1,0) * angles(math.rad(5),math.rad(90),math.rad(-180)),.2)
  1022. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(55), math.rad(-0), math.rad(-25)),.2)
  1023. end
  1024. attack=false
  1025. con:Disconnect()
  1026. end
  1027.  
  1028. function UPick()
  1029. attack=true
  1030. for i = 0,1.5,0.1 do
  1031. swait()
  1032.  
  1033. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-10), math.rad(-0), math.rad(-0)),.2)
  1034.  
  1035.  
  1036. end
  1037. for _,v in next, Model:children() do
  1038. if v:IsA'BasePart' then
  1039.  
  1040. v.Transparency = 1
  1041. v.CanCollide = false
  1042. end
  1043. end
  1044. attack=false
  1045. end
  1046.  
  1047. function Pick()
  1048. attack=true
  1049. for i = 0,1.5,0.1 do
  1050. swait()
  1051.  
  1052. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-25), math.rad(-0), math.rad(-0)),.2)
  1053.  
  1054. end
  1055. for _,v in next, Model:children() do
  1056. if v:IsA'BasePart' then
  1057.  
  1058. v.Transparency = 0
  1059. v.CanCollide = false
  1060. end
  1061. end
  1062. attack=false
  1063. end
  1064.  
  1065.  
  1066.  
  1067. attacktype=1
  1068. mouse.Button1Down:connect(function()
  1069. if attack==false then
  1070. if attacktype==1 then
  1071. attack=true
  1072. attacktype=2
  1073. attackoneS()
  1074. elseif attacktype==2 then
  1075. attack=true
  1076. attacktype=1
  1077. attacktwoS()
  1078. end
  1079. end
  1080. end)
  1081. hum.Health = math.huge
  1082. hum.MaxHealth = math.huge
  1083. hum.WalkSpeed = 6
  1084. idle=0
  1085. local sine = 0
  1086. local change = 1
  1087. local val = 0
  1088. toim = 0
  1089. hum.Animator.Parent = nil
  1090. idleanim=.4
  1091. while true do
  1092. swait()
  1093. sine = sine + change
  1094. local torvel=(root.Velocity*Vector3.new(1,0,1)).magnitude
  1095. local velderp=root.Velocity.y
  1096. hitfloor,posfloor=rayCast(root.Position,(CFrame.new(root.Position,root.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  1097. if equipped==true or equipped==false then
  1098. if attack==false then
  1099. idle=idle+1
  1100. else
  1101. idle=0
  1102. end
  1103. if root.Velocity.y > 1 and hitfloor==nil then
  1104. Anim="Jump"
  1105. if attack==false then
  1106. rootj.C0 = clerp(rootj.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1107. tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  1108. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(10)), 0.3)
  1109. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3)
  1110. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-20)),.3)
  1111. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(0)),.3)
  1112. end
  1113. elseif root.Velocity.y < -1 and hitfloor==nil then
  1114. Anim="Fall"
  1115. if attack==false then
  1116. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-20)),.3)
  1117. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(0)),.3)
  1118. rootj.C0 = clerp(rootj.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1119. tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(40),math.rad(0),math.rad(0)),.3)
  1120. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.65, 0) * angles(math.rad(-10), math.rad(0), math.rad(90)), 0.3)
  1121. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.65, 0) * angles(math.rad(-10), math.rad(0), math.rad(-90)), 0.3)
  1122. end
  1123. elseif torvel<1 and hitfloor~=nil then
  1124. Anim="Idle"
  1125. change = 1
  1126. if attack==false then
  1127. HW.C0 = clerp(HW.C0, CFrame.new(0,-1,0) * angles(math.rad(15),math.rad(-90),math.rad(50)),.2)
  1128. rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,-0.1+0.1*math.cos(sine/20))*angles(math.rad(0),math.rad(0),math.rad(0)),0.15)
  1129. tors.Neck.C0=clerp(tors.Neck.C0,necko*angles(math.rad(5.5*math.cos(sine/30)),math.rad(0),math.rad(0)),.3)
  1130. RH.C0=clerp(RH.C0,cf(1,-0.9-0.1*math.cos(sine/20),0.025*math.cos(sine/20))*angles(math.rad(-2.5),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),0.15)
  1131. LH.C0=clerp(LH.C0,cf(-1,-0.9-0.1*math.cos(sine/20),0.025*math.cos(sine/20))*angles(math.rad(-2.5),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),0.15)
  1132. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5+0.05*math.sin(sine/30), 0) * angles(math.rad(3), math.rad(15*math.cos(sine/40)), math.rad(15)),.2)
  1133. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5+0.05*math.sin(sine/30), 0) * angles(math.rad(75), math.rad(-15*math.cos(sine/40)), math.rad(-10)),.2)
  1134.  
  1135. end
  1136. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  1137. Anim="Walk"
  1138. change = .6
  1139. if attack==false then
  1140. rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,-0.175+0.025*math.cos(sine/3.5)+ -math.sin(sine/3.5)/7)*angles(math.rad(5-2.5*math.cos(sine/3.5)),math.rad(0),math.rad(20*math.cos(sine/7))),0.15)
  1141. tors.Neck.C0 = clerp(tors.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(15*math.cos(sine/7))), 0.3)
  1142. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*angles(math.rad(30*math.cos(sine/7))+ math.sin(sine/7)/2.5,math.rad(0),math.rad(10)),0.15)
  1143. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.5,0)*angles(math.rad(-30*math.cos(sine/7))+ -math.sin(sine/7)/2.5,math.rad(0),math.rad(-10)),0.15)
  1144. RH.C0=clerp(RH.C0,cf(1,-0.925-0.5*math.cos(sine/7)/2,0.5*math.cos(sine/7)/1.5)*angles(math.rad(-5-15*math.cos(sine/7))+ -math.sin(sine/7)/2.5,math.rad(90-10*math.cos(sine/7)),math.rad(0))*angles(math.rad(0+3.5*math.cos(sine/7)),math.rad(0),math.rad(0)),0.15)
  1145. LH.C0=clerp(LH.C0,cf(-1,-0.925+0.5*math.cos(sine/7)/2,-0.5*math.cos(sine/7)/1.5)*angles(math.rad(-5+15*math.cos(sine/7))+ math.sin(sine/7)/2.5,math.rad(-90-10*math.cos(sine/7)),math.rad(0))*angles(math.rad(0-3.5*math.cos(sine/7)),math.rad(0),math.rad(0)),0.15)
  1146. HW.C0 = clerp(HW.C0, CFrame.new(0,-1,0) * angles(math.rad(-90),math.rad(90),math.rad(0)),.2)
  1147. end
  1148. elseif torvel>=22 and hitfloor~=nil then
  1149. Anim="Run"
  1150. if attack==false then
  1151. rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,-0.175+0.025*math.cos(sine/3.5)+ -math.sin(sine/3.5)/7)*angles(math.rad(5-2.5*math.cos(sine/3.5)),math.rad(0),math.rad(10*math.cos(sine/7))),0.15)
  1152. tors.Neck.C0 = clerp(tors.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  1153. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*angles(math.rad(30*math.cos(sine/7))+ math.sin(sine/7)/2.5,math.rad(0),math.rad(10)),0.15)
  1154. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.5,0)*angles(math.rad(-30*math.cos(sine/7))+ -math.sin(sine/7)/2.5,math.rad(0),math.rad(-10)),0.15)
  1155. RH.C0=clerp(RH.C0,cf(1,-0.925-0.5*math.cos(sine/7)/2,0.5*math.cos(sine/7)/2)*angles(math.rad(-25-15*math.cos(sine/7))+ -math.sin(sine/7),math.rad(90-10*math.cos(sine/7)),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),0.15)
  1156. LH.C0=clerp(LH.C0,cf(-1,-0.925+0.5*math.cos(sine/7)/2,-0.5*math.cos(sine/7)/2)*angles(math.rad(-25+15*math.cos(sine/7))+ math.sin(sine/7),math.rad(-90-10*math.cos(sine/7)),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),0.15)
  1157. end
  1158. end
  1159. end
  1160. if 0 < #Effects then
  1161. for e = 1, #Effects do
  1162. if Effects[e] ~= nil then
  1163. local Thing = Effects[e]
  1164. if Thing ~= nil then
  1165. local Part = Thing[1]
  1166. local Mode = Thing[2]
  1167. local Delay = Thing[3]
  1168. local IncX = Thing[4]
  1169. local IncY = Thing[5]
  1170. local IncZ = Thing[6]
  1171. if 1 >= Thing[1].Transparency then
  1172. if Thing[2] == "Block1" then
  1173. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1174. local Mesh = Thing[1].Mesh
  1175. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1176. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1177. elseif Thing[2] == "Block2" then
  1178. Thing[1].CFrame = Thing[1].CFrame + Vector3.new(0, 0, 0)
  1179. local Mesh = Thing[7]
  1180. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1181. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1182. elseif Thing[2] == "Block3" then
  1183. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) + Vector3.new(0, 0.15, 0)
  1184. local Mesh = Thing[7]
  1185. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1186. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1187. elseif Thing[2] == "Cylinder" then
  1188. local Mesh = Thing[1].Mesh
  1189. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1190. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1191. elseif Thing[2] == "Blood" then
  1192. local Mesh = Thing[7]
  1193. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0)
  1194. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1195. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1196. elseif Thing[2] == "Elec" then
  1197. local Mesh = Thing[1].Mesh
  1198. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1199. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1200. elseif Thing[2] == "Disappear" then
  1201. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1202. elseif Thing[2] == "Shatter" then
  1203. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1204. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  1205. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  1206. Thing[6] = Thing[6] + Thing[5]
  1207. end
  1208. else
  1209. Part.Parent = nil
  1210. table.remove(Effects, e)
  1211. end
  1212. end
  1213. end
  1214. end
  1215. end
  1216. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement