cat568

Untitled

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