Advertisement
JasonLion

Nightmare (local 2?)

May 28th, 2019
213
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 = game:GetService("Players").LocalPlayer
  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. --whitelist--
  88. --chat
  89. Player = owner
  90. PlayerGui = Player.PlayerGui
  91. Cam = workspace.CurrentCamera
  92. Backpack = Player.Backpack
  93. Character = Player.Character
  94. char = Player.Character
  95. Humanoid = Character.Humanoid
  96. RootPart = Character["HumanoidRootPart"]
  97. Torso = Character["Torso"]
  98. Head = Character["Head"]
  99. RightArm = Character["Right Arm"]
  100. LeftArm = Character["Left Arm"]
  101. RightLeg = Character["Right Leg"]
  102. LeftLeg = Character["Left Leg"]
  103. RootJoint = RootPart["RootJoint"]
  104. Neck = Torso["Neck"]
  105. RightShoulder = Torso["Right Shoulder"]
  106. LeftShoulder = Torso["Left Shoulder"]
  107. RightHip = Torso["Right Hip"]
  108. LeftHip = Torso["Left Hip"]
  109.  
  110. local Orin = "http://www.roblox.com/asset/?id=7074786"
  111. Head.face.Texture = Orin
  112. function weld(a, b, acf)
  113. local w = Instance.new("Weld", a)
  114. w.Part0 = a
  115. w.Part1 = b
  116. w.C0 = acf
  117. end
  118. local righteyebrickcolor = "Toothpaste"
  119. local reye = Instance.new("Part", char)
  120. reye.CanCollide = false
  121. reye.BrickColor = BrickColor.new(righteyebrickcolor)
  122. reye.Material = "Neon"
  123. reye.Size = Vector3.new(.25,.35,.15)
  124. weld(reye, char.Head, CFrame.new(0.15,-0.2,0.55), CFrame.new(1,0,0))
  125. m1 = Instance.new("SpecialMesh", reye)
  126. m1.MeshType = "Sphere"
  127. m1.Scale = Vector3.new(0.9,0.9,0.9)
  128. reye.Locked = true
  129. reye.Name = "re"
  130.  
  131.  
  132. --chat
  133.  
  134. local p = owner
  135. local plr = owner
  136. local player = owner
  137. local char = p.Character
  138. local larm = char:WaitForChild("Left Arm")
  139. local rarm = char:WaitForChild("Right Arm")
  140. local lleg = char:WaitForChild("Left Leg")
  141. local rleg = char:WaitForChild("Right Leg")
  142. local hed = char:WaitForChild("Head")
  143. local torso = char:WaitForChild("Torso")
  144. local root = char:WaitForChild("HumanoidRootPart")
  145. local hum = char:FindFirstChildOfClass("Humanoid")
  146. local debris = game:GetService("Debris")
  147. local run = game:GetService("RunService")
  148. local rs = run.Stepped
  149. local cam = workspace.CurrentCamera
  150. local movement = 4
  151. local change = 0.4
  152. local DebrisModel = Instance.new("Model",char)
  153. local stealth = false
  154. local debounce = false
  155. hum.MaxHealth = 50000
  156. hum.Health = hum.MaxHealth
  157. themeid = 175635113
  158. themepitch = 1.4
  159. main = {r = 0;g = 100;b = 255;v = 1}
  160. if p:FindFirstChild("rcolor") then main.r = p.rcolor.Value else local string = Instance.new("StringValue",p) string.Name = "rcolor" end
  161. if p:FindFirstChild("gcolor") then main.g = p.gcolor.Value else local string = Instance.new("StringValue",p) string.Name = "gcolor" end
  162. if p:FindFirstChild("bcolor") then main.b = p.bcolor.Value else local string = Instance.new("StringValue",p) string.Name = "bcolor" end
  163. if p:FindFirstChild("vcolor") then main.v = p.vcolor.Value else local string = Instance.new("StringValue",p) string.Name = "vcolor" end
  164. if p:FindFirstChild("idtheme") then themeid = p.idtheme.Value else local string = Instance.new("StringValue",p) string.Name = "idtheme" end
  165. if p:FindFirstChild("pitchtheme") then themepitch = p.pitchtheme.Value else local string = Instance.new("StringValue",p) string.Name = "pitchtheme" end
  166. pr = p:FindFirstChild("rcolor")
  167. pg = p:FindFirstChild("gcolor")
  168. pb = p:FindFirstChild("bcolor")
  169. pv = p:FindFirstChild("vcolor")
  170. idth = p:FindFirstChild("idtheme")
  171. pith = p:FindFirstChild("pitchtheme")
  172. main_color = Color3.fromRGB(main.r,main.g,main.b)
  173. explosionid = {262562442,144699494,539294959,1388740053}
  174. --919941001
  175. Prefix = "/"
  176. p.Chatted:connect(function(msg)
  177.  
  178. if msg:lower():sub(1,#Prefix+#'color r ')==Prefix..'color r ' then
  179. local v = tonumber(msg:sub(#Prefix+#'color r '+1))
  180. main.r = v
  181. elseif msg:lower():sub(1,#Prefix+#'color g ')==Prefix..'color g ' then
  182. local v = tonumber(msg:sub(#Prefix+#'color g '+1))
  183. main.g = v
  184. elseif msg:lower():sub(1,#Prefix+#'color b ')==Prefix..'color b ' then
  185. local v = tonumber(msg:sub(#Prefix+#'color b '+1))
  186. main.b = v
  187. elseif msg:lower():sub(1,#Prefix+#'color v ')==Prefix..'color v ' then
  188. local v = tonumber(msg:sub(#Prefix+#'color v '+1))
  189. if v > 1 then main.v = 1 elseif v < -1 then main.v = -1 else main.v = v end
  190.  
  191. elseif msg:lower():sub(1,#Prefix+#'theme ')==Prefix..'theme ' then
  192. local v = tonumber(msg:sub(#Prefix+#'theme '+1))
  193. themeid = v
  194. music(themeid,themepitch)
  195.  
  196. elseif msg:lower():sub(1,#Prefix+#'pitch ')==Prefix..'pitch ' then
  197. local v = tonumber(msg:sub(#Prefix+#'pitch '+1))
  198. themepitch = v
  199. music(themeid,themepitch)
  200.  
  201. elseif msg:lower():sub(1,#Prefix+#'prefix ')==Prefix..'prefix ' then
  202. local v = msg:sub(#Prefix+#'prefix '+1)
  203. Prefix = v
  204.  
  205. elseif msg:lower():sub(1,#Prefix+#'reset')==Prefix..'reset' then
  206. main.r = 0
  207. main.g = 100
  208. main.b = 255
  209. main.v = 1
  210. themeid = 175635113
  211. themepitch = 1
  212. music(themeid,themepitch)
  213.  
  214. end
  215.  
  216. end)
  217. ----------------------------------------------------------------------------
  218. no_anim = false
  219. attack = false
  220. attacking = false
  221. canjump = true
  222. aiming_anim = false
  223. animid = math.random(0,1)
  224. timer = 0
  225. bg = Instance.new("BodyGyro",root)
  226. bg.P = 100000
  227. bg.D = 100
  228. ----------------------------------------------------------------------------
  229.  
  230. function rswait(value)
  231. if value ~= nil and value ~= 0 then
  232. for i=1,value do
  233. rs:wait()
  234. end
  235. else
  236. rs:wait()
  237. end
  238. end
  239.  
  240. ----------------------------------------------------------------------------
  241. max = 0
  242. function music(id,pitch)
  243. max = 0
  244. if id == "Stop" then
  245. if not torso:FindFirstChild("MusicRuin") then
  246. soundz = Instance.new("Sound",torso)
  247. end
  248. soundz:Stop()
  249. else
  250. if not torso:FindFirstChild("MusicRuin") then
  251. soundz = Instance.new("Sound",torso)
  252. end
  253. soundz.MaxDistance = 150*5
  254. soundz.EmitterSize = 150/5
  255. soundz.Volume = 10
  256. soundz.Name = "MusicRuin"
  257. soundz.Looped = true
  258. soundz.PlaybackSpeed = pitch
  259. soundz.SoundId = "rbxassetid://"..id
  260. soundz:Stop()
  261. soundz:Play()
  262. end
  263. end
  264.  
  265. ----------------------------------------------------------------------------
  266.  
  267. function lerp(a, b, t)
  268. return a + (b - a)*t
  269. end
  270.  
  271. ----------------------------------------------------------------------------
  272.  
  273. function Lerp(c1,c2,al)
  274. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  275. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  276. for i,v in pairs(com1) do
  277. com1[i] = v+(com2[i]-v)*al
  278. end
  279. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  280. end
  281.  
  282. ----------------------------------------------------------------------------
  283.  
  284. function slerp(a, b, t)
  285. dot = a:Dot(b)
  286. if dot > 0.99999 or dot < -0.99999 then
  287. return t <= 0.5 and a or b
  288. else
  289. r = math.acos(dot)
  290. return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r)
  291. end
  292. end
  293.  
  294. ----------------------------------------------------------------------------
  295.  
  296. function clerp(c1,c2,al)
  297.  
  298. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  299.  
  300. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  301.  
  302. for i,v in pairs(com1) do
  303.  
  304. com1[i] = lerp(v,com2[i],al)
  305.  
  306. end
  307.  
  308. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  309.  
  310. end
  311.  
  312. ----------------------------------------------------------------------------
  313.  
  314. function findAllNearestTorso(pos,dist)
  315. local list = game.Workspace:children()
  316. local torso = {}
  317. local temp = nil
  318. local human = nil
  319. local temp2 = nil
  320. for x = 1, #list do
  321. temp2 = list[x]
  322. if (temp2.className == "Model") and (temp2 ~= char) then
  323. local nayem = "Torso"
  324. if temp2:findFirstChild("UpperTorso") then nayem = "UpperTorso" end
  325. temp = temp2:findFirstChild(nayem)
  326. human = temp2:findFirstChildOfClass("Humanoid")
  327. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  328. if (temp.Position - pos).magnitude < dist then
  329. table.insert(torso,temp)
  330. dist = (temp.Position - pos).magnitude
  331. end
  332. end
  333. end
  334. end
  335. return torso
  336. end
  337.  
  338. ----------------------------------------------------------------------------
  339.  
  340. local isAPlayer
  341. function checkIfNotPlayer(model)
  342. coroutine.resume(coroutine.create(function()
  343. if model ~= char and model.Parent ~= char and model.Parent.Parent ~= char and model.Parent ~= DebrisModel and model.Parent.Parent ~= DebrisModel and model.Parent.Parent.Parent ~= DebrisModel then
  344. isAPlayer = true
  345. else
  346. isAPlayer = false
  347. end
  348. end))
  349. return isAPlayer
  350. end
  351.  
  352. ----------------------------------------------------------------------------
  353.  
  354. function computeDirection(vec)
  355. local lenSquared = vec.magnitude * vec.magnitude
  356. local invSqrt = 1 / math.sqrt(lenSquared)
  357. return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
  358. end
  359.  
  360. ----------------------------------------------------------------------------
  361.  
  362. function newWeld(wp0, wp1, wc0x, wc0y, wc0z)
  363.  
  364. local wld = Instance.new("Weld", wp1)
  365.  
  366. wld.Part0 = wp0
  367.  
  368. wld.Part1 = wp1
  369.  
  370. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  371.  
  372. return wld
  373.  
  374. end
  375.  
  376. ----------------------------------------------------------------------------
  377.  
  378. function weld(model)
  379. local parts,last = {}
  380. local function scan(parent)
  381. for _,v in pairs(parent:GetChildren()) do
  382. if (v:IsA("BasePart")) then
  383. if (last) then
  384. local w = Instance.new("Weld")
  385. w.Name = ("%s_Weld"):format(v.Name)
  386. w.Part0,w.Part1 = last,v
  387. w.C0 = last.CFrame:inverse()
  388. w.C1 = v.CFrame:inverse()
  389. w.Parent = last
  390. end
  391. last = v
  392. table.insert(parts,v)
  393. end
  394. scan(v)
  395. end
  396. end
  397. scan(model)
  398. for _,v in pairs(parts) do
  399. v.Anchored = false
  400. v.Locked = true
  401. end
  402. end
  403.  
  404. ----------------------------------------------------------------------------
  405.  
  406. function sound(id,position,vol,pitch,dist,start,finish)
  407. coroutine.resume(coroutine.create(function()
  408.  
  409. local part = Instance.new("Part",DebrisModel)
  410. part.Anchored = true
  411. part.Position = position
  412. part.Size = Vector3.new(0,0,0)
  413. part.CanCollide = false
  414. part.Transparency = 1
  415.  
  416. soundasd = Instance.new("Sound",part)
  417.  
  418. soundasd.SoundId = "rbxassetid://"..id
  419.  
  420. if vol ~= nil then
  421. soundasd.Volume = vol
  422. end
  423.  
  424. if pitch ~= nil then
  425. soundasd.PlaybackSpeed = pitch
  426. end
  427.  
  428. if dist ~= nil then
  429. soundasd.MaxDistance = dist*5
  430. soundasd.EmitterSize = dist/5
  431. end
  432.  
  433. delay(0.5,function() debris:AddItem(part,soundasd.TimeLength+3) end)
  434.  
  435. soundasd:Play()
  436.  
  437. end))
  438. return soundasd
  439. end
  440.  
  441. function createsound(id,parent)
  442.  
  443. local soundz = Instance.new("Sound",parent)
  444.  
  445. soundz.SoundId = "rbxassetid://"..id
  446.  
  447. return soundz
  448.  
  449. end
  450.  
  451. function playsound(sond,vol,pitch,start)
  452.  
  453. if vol ~= nil then
  454. sond.Volume = vol
  455. end
  456.  
  457. if pitch ~= nil then
  458. sond.PlaybackSpeed = pitch
  459. end
  460.  
  461. if start ~= nil then
  462. sond.TimePosition = start
  463. end
  464.  
  465. sond:Play()
  466.  
  467. end
  468.  
  469. ----------------------------------------------------------------------------
  470. eColors={"Really red","Really black"}
  471. function Lightning(Part0,Part1,Times,Offset,Color,Thickness,Trans)
  472. local magz = (Part0 - Part1).magnitude
  473. local curpos = Part0
  474. local trz = {-Offset,Offset}
  475. for i=1,Times do
  476. local li = Instance.new("Part", DebrisModel)
  477. li.TopSurface =0
  478. li.Material = Enum.Material.Neon
  479. li.BottomSurface = 0
  480. li.Anchored = true
  481. li.Locked = true
  482. li.Transparency = Trans or 0.4
  483. li.BrickColor = BrickColor.new(Color)
  484. li.formFactor = "Custom"
  485. li.CanCollide = false
  486. li.Size = Vector3.new(Thickness,Thickness,magz/Times)
  487. local lim = Instance.new("BlockMesh",li)
  488. local Offzet = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  489. local trolpos = CFrame.new(curpos,Part1)*CFrame.new(0,0,magz/Times).p+Offzet
  490. if Times == i then
  491. local magz2 = (curpos - Part1).magnitude
  492. li.Size = Vector3.new(Thickness,Thickness,magz2)
  493. li.CFrame = CFrame.new(curpos,Part1)*CFrame.new(0,0,-magz2/2)
  494. else
  495. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
  496. end
  497. curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p
  498. li.Name = "LIGHTNING"
  499. end
  500. end
  501.  
  502. ----------------------------------------------------------------------------
  503.  
  504. local HBill = Instance.new("BillboardGui",hed)
  505. local HMain, HBar = Instance.new("Frame", HBill), Instance.new("Frame")
  506. local HName = Instance.new("TextLabel")
  507. HBill.Size = UDim2.new(15,0,2.2,0)
  508. HBill.StudsOffset = Vector3.new(3.675,1.2,0)
  509. HBill.AlwaysOnTop = true
  510. HBill.Enabled = true
  511. HMain.BackgroundColor3 = Color3.new(0, 0, 0)
  512. HMain.BackgroundTransparency = 1
  513. HMain.Size = UDim2.new(.5,0,.2,0)
  514. HName.Parent = HMain
  515. HName.BackgroundTransparency = 1
  516. HName.BackgroundColor3 = Color3.new(244,255,25)
  517. HName.BorderColor3 = Color3.new(244,255,25)
  518. HName.BorderSizePixel = 2
  519. HName.Size = UDim2.new(1,0,.75,0)
  520. HName.Font = "Code"
  521. HName.Text = [[( Dream!Tale )]]
  522. HName.TextScaled = true
  523. HName.TextColor3 = Color3.new(244,255,25)
  524. HName.TextStrokeColor3 = Color3.new(0.1,0.1,0.1)
  525. HName.TextStrokeTransparency = 0
  526. HName.TextYAlignment = "Bottom"
  527.  
  528. local HBill = Instance.new("BillboardGui",hed)
  529. local HMain, HBar = Instance.new("Frame", HBill), Instance.new("Frame")
  530. local HName = Instance.new("TextLabel")
  531. HBill.Size = UDim2.new(15,0,2.2,0)
  532. HBill.StudsOffset = Vector3.new(3.675,2,0)
  533. HBill.AlwaysOnTop = true
  534. HBill.Enabled = true
  535. HMain.BackgroundColor3 = Color3.new(0, 0, 0)
  536. HMain.BackgroundTransparency = 1
  537. HMain.Size = UDim2.new(.5,0,.5,0)
  538. HName.Parent = HMain
  539. HName.BackgroundTransparency = 1
  540. HName.BackgroundColor3 = Color3.new(0,0,0)
  541. HName.BorderColor3 = Color3.new(0,0,0)
  542. HName.BorderSizePixel = 2
  543. HName.Size = UDim2.new(1,0,.75,0)
  544. HName.Font = "Antique"
  545. HName.Text = [[Nightmare!Sans]]
  546. HName.TextScaled = true
  547. HName.TextColor3 = Color3.new(0,0,0)
  548. HName.TextStrokeColor3 = Color3.new(0,0,0)
  549. HName.TextStrokeTransparency = 0
  550. HName.TextYAlignment = "Bottom"
  551.  
  552. function bigboomrektxd()
  553. coroutine.resume(coroutine.create(function()
  554. local magnitude = nil
  555. local Position = nil
  556. if animid == 0 then
  557. Position = larm.Position
  558. else
  559. Position = rarm.Position
  560. end
  561. --sound(743499393,Position,10,math.random(6,8)/10)
  562. sound(440145223,Position,10,math.random(10,12)/10,50)
  563.  
  564. local Part1 = Instance.new("Part")
  565. local mesh2 = Instance.new("SpecialMesh",Part1)
  566. mesh2.MeshId = "rbxassetid://559831844"
  567. mesh2.Scale = Vector3.new(0,0,0.4)
  568. Part1.Material = Enum.Material.Neon
  569. Part1.CanCollide = false
  570. Part1.Color = Color3.fromHSV(0,0,main.v)
  571. Part1.Parent = DebrisModel
  572. Part1.Size = Vector3.new(0,0,0)
  573. Part1.Anchored = true
  574. Part1.CFrame = CFrame.new(Position,mouse.Hit.p)
  575. Part1.Name = "EXPLOSION2"
  576.  
  577. local Part0 = Instance.new("Part",DebrisModel)
  578. local PointLight2 = Instance.new("PointLight")
  579. Part0.Name = "Bullet"
  580. Part0.Material = Enum.Material.Neon
  581. Part0.Color = Color3.fromHSV(0,0,main.v)
  582. Part0.Anchored = false
  583. Part0.Size = Vector3.new(5, 5, 5)
  584. local mesh = Instance.new("SpecialMesh",Part0)
  585. mesh.MeshType = Enum.MeshType.Sphere
  586. local bforce = Instance.new("BodyForce",Part0)
  587. bforce.force = Vector3.new(0, ((bforce.Parent:getMass())*workspace.Gravity), 0)
  588. Part0.CanCollide = false
  589. PointLight2.Parent = Part0
  590. PointLight2.Color = Part0.Color
  591. local Target = mouse.Hit.p
  592. local direction = Target - Position
  593. local direction = computeDirection(direction)
  594. local pos = Position + (direction * 2)
  595. Part0.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0)
  596. Part0.Velocity = direction * 60
  597. local asd = nil
  598. local loop = nil
  599. delay(5, function() Part0:Destroy() loop:disconnect() asd:disconnect() end)
  600. loop = rs:connect(function()
  601. local asdf = math.random(500,1000)/1000
  602. local Part1 = Instance.new("Part")
  603. local mesh2 = Instance.new("SpecialMesh",Part1)
  604. mesh2.MeshType = Enum.MeshType.Sphere
  605. Part1.Material = Enum.Material.Neon
  606. Part1.CanCollide = false
  607. Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v)
  608. Part1.Parent = DebrisModel
  609. Part1.Size = Part0.Size + Vector3.new(asdf,asdf,asdf)
  610. Part1.Anchored = true
  611. Part1.CFrame = CFrame.new(Part0.Position + Vector3.new(math.random(-1000,1000)/750,math.random(-1000,1000)/750,math.random(-1000,1000)/750))
  612. Part1.Name = "SMOKE"
  613. end)
  614. asd = Part0.Touched:connect(function(ht)
  615. local hit=ht.Parent
  616. if checkIfNotPlayer(ht) == true and ht.CanCollide == true then
  617. asd:disconnect()
  618. loop:disconnect()
  619. Part0:Destroy()
  620.  
  621. sound(explosionid[math.random(1,#explosionid)],Part0.Position,10,math.random(6,9)/10,200)
  622. for i,v in pairs(findAllNearestTorso(Part0.Position,50)) do
  623. if v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth >= 9e+99 then
  624. v:Destroy()
  625. else
  626. v.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth/(math.random(50,60)/10))
  627. end
  628. local Position = Part0.Position
  629. local Target = v.Position
  630. local direction = Target - Position
  631. local direction = computeDirection(direction)
  632. local bv = Instance.new("BodyVelocity",v)
  633. bv.Velocity = direction * (50 - ((Position - Target).magnitude/2))
  634. debris:AddItem(bv,1)
  635. end
  636. for i=1,14,2 do for x=1,math.random(0,1) do rs:wait() end
  637. for z=1,math.random(2,3) do
  638. local asdf = math.random(-5,5)*10-(i/20)*8
  639. local Part1 = Instance.new("Part")
  640. local mesh2 = Instance.new("SpecialMesh",Part1)
  641. mesh2.MeshType = Enum.MeshType.Sphere
  642. mesh2.Scale = Vector3.new(0,0,0)
  643. Part1.Material = Enum.Material.Neon
  644. Part1.CanCollide = false
  645. Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v)
  646. Part1.Parent = DebrisModel
  647. Part1.Size = Vector3.new(asdf,asdf,asdf)
  648. Part1.Anchored = true
  649. local a = i*0.5
  650. Part1.CFrame = CFrame.new(Part0.Position + Vector3.new(math.random(-2,2)*a,math.random(-10,10),math.random(-2,2)*a))
  651. Part1.Name = "EXPLOSION"
  652. end
  653. end
  654.  
  655. end
  656. end)
  657. end))
  658. end
  659.  
  660. holdclick=false
  661.  
  662. mouse.Button1Down:connect(function()
  663. if debounce == false then
  664. if animid == 0 then
  665. animid = 1
  666. else
  667. animid = 0
  668. end
  669. debounce = true
  670. holdclick = true
  671. aiming_anim = true
  672. wait(0.2)
  673. repeat
  674. rs:wait()
  675. timer = 150
  676. until holdclick == false
  677. bigboomrektxd()
  678.  
  679. local Position = mouse.Hit.p
  680. local Target = root.Position
  681. local direction = Target - Position
  682. local direction = computeDirection(direction)
  683. root.Velocity = direction * 150
  684.  
  685. aiming_anim = false
  686. delay(0.3,function() debounce = false end)
  687. end
  688. end)
  689.  
  690. mouse.Button1Up:connect(function()
  691. holdclick=false
  692. end)
  693.  
  694. function dashasdf()
  695. debounce = true
  696.  
  697. canjump = false
  698. attack = true
  699.  
  700. for i,v in pairs(char:GetChildren()) do
  701. if v ~= root then
  702. if v:IsA("Part") then
  703. v.Transparency = 1
  704. elseif v:IsA("Accoutrement") then
  705. v:FindFirstChildOfClass("Part").Transparency = 1
  706. end
  707. end
  708. end
  709.  
  710. local tempattachment = Instance.new("Attachment",root)
  711. tempattachment.Position = Vector3.new(0,0,-4)
  712.  
  713. for i=1,20 do rs:wait()
  714. root.Velocity = Vector3.new(0,0,0)
  715. root.CFrame = CFrame.new(tempattachment.WorldPosition) * CFrame.Angles(math.rad(root.Orientation.X),math.rad(root.Orientation.Y),math.rad(root.Orientation.Z))
  716. local asdf = math.random(500,1000)/100
  717. local Part1 = Instance.new("Part")
  718. local mesh2 = Instance.new("SpecialMesh",Part1)
  719. mesh2.MeshType = Enum.MeshType.Sphere
  720. Part1.Material = Enum.Material.Neon
  721. Part1.CanCollide = false
  722. Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v)
  723. Part1.Parent = DebrisModel
  724. Part1.Size = Vector3.new(asdf,asdf,asdf)
  725. Part1.Anchored = true
  726. Part1.CFrame = CFrame.new(root.Position + Vector3.new(math.random(-1000,1000)/500,math.random(-1000,1000)/500,math.random(-1000,1000)/500))
  727. Part1.Name = "SMOKE"
  728. end
  729.  
  730. tempattachment:Destroy()
  731.  
  732. for i,v in pairs(char:GetChildren()) do
  733. if v ~= root then
  734. if v:IsA("Part") then
  735. v.Transparency = 0
  736. elseif v:IsA("Accoutrement") then
  737. v:FindFirstChildOfClass("Part").Transparency = 0
  738. end
  739. end
  740. end
  741.  
  742. canjump = true
  743. attack = false
  744.  
  745. delay(0.1,function() debounce = false end)
  746. end
  747.  
  748. function laz0r()
  749.  
  750. local Position = nil
  751. if animid == 0 then
  752. Position = larm.Position
  753. else
  754. Position = rarm.Position
  755. end
  756.  
  757. local Part1 = Instance.new("Part")
  758. local mesh2 = Instance.new("SpecialMesh",Part1)
  759. mesh2.MeshId = "rbxassetid://559831844"
  760. mesh2.Scale = Vector3.new(0,0,0.4)
  761. Part1.Material = Enum.Material.Neon
  762. Part1.CanCollide = false
  763. Part1.Color = Color3.fromHSV(0,0,main.v)
  764. Part1.Parent = DebrisModel
  765. Part1.Size = Vector3.new(0,0,0)
  766. Part1.Anchored = true
  767. Part1.CFrame = CFrame.new(Position,mouse.Hit.p)
  768. Part1.Name = "EXPLOSION3"
  769.  
  770. local Part0 = Instance.new("Part",DebrisModel)
  771. Part0.Name = "Bullet"
  772. Part0.Material = Enum.Material.Neon
  773. Part0.Color = Color3.fromHSV(0,0,main.v)
  774. Part0.Anchored = true
  775. local mesh = Instance.new("SpecialMesh",Part0)
  776. mesh.MeshType = Enum.MeshType.Sphere
  777. Part0.CanCollide = false
  778. local Target = mouse.Hit.p
  779. local direction = Target - Position
  780. local direction = computeDirection(direction)
  781. local ray = Ray.new(Position, (Target-Position).unit*1048)
  782. local part, endPoint = workspace:FindPartOnRay(ray, char)
  783. Part0.Size = Vector3.new(5,1,5)
  784. mesh.Scale = Vector3.new(1,(Position-endPoint).magnitude,1)
  785. local pos = Position + (direction * (mesh.Scale.Y/2))
  786. Part0.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0)
  787.  
  788. clashpart = Instance.new("Part",DebrisModel)
  789. clashpart.Size = Vector3.new(50,50,50)
  790. clashpart.CanCollide = false
  791. clashpart.Anchored = true
  792. clashpart.Transparency = 1
  793. clashpart.Color = main_color
  794. clashpart.Name = "StarLightClash"
  795. clashpart.CFrame = CFrame.new(endPoint, root.Position)
  796.  
  797. sound(1177475476,Position,10,math.random(5,6)/10,300)
  798.  
  799. local z = 10
  800. for i = 1,100 do rs:wait()
  801. if animid == 0 then
  802. Position = larm.Position
  803. else
  804. Position = rarm.Position
  805. end
  806. local Target = mouse.Hit.p
  807. local direction = Target - Position
  808. local direction = computeDirection(direction)
  809. local ray = Ray.new(Position, (Target-Position).unit*1048)
  810. local part, endPoint = workspace:FindPartOnRay(ray, char)
  811. Part0.Size = Vector3.new(5-((i/100)*5),1,5-((i/100)*5))
  812. mesh.Scale = Vector3.new(1,(Position-endPoint).magnitude,1)
  813. mesh.Offset = Vector3.new(math.random(-10000,10000)/20000,math.random(-10000,10000)/20000,0)
  814. local pos = Position + (direction * (mesh.Scale.Y/2))
  815. Part0.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0)
  816. clashpart.CFrame = CFrame.new(endPoint, root.Position)
  817.  
  818. local Position = mouse.Hit.p
  819. local Target = root.Position
  820. local direction = Target - Position
  821. local direction = computeDirection(direction)
  822. root.Velocity = direction * 5
  823.  
  824. if i >= z then z = i + 10 sound(explosionid[math.random(1,#explosionid)],endPoint,10,math.random(6,9)/10,200) end
  825.  
  826. Part1 = Part0:Clone()
  827. Part1.Parent = DebrisModel
  828. Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v)
  829. Part1.Name = "SMOKE2"
  830.  
  831. if part ~= nil then
  832. if part.Name == "StarLightClash" then
  833. local asdf = math.random(0,5)*20
  834. local Part1 = Instance.new("Part")
  835. local mesh2 = Instance.new("SpecialMesh",Part1)
  836. mesh2.MeshType = Enum.MeshType.Sphere
  837. mesh2.Scale = Vector3.new(0,0,0)
  838. Part1.Material = Enum.Material.Neon
  839. Part1.CanCollide = false
  840. Part1.Color = Color3.fromHSV(Color3.toHSV(Color3.fromRGB((main.r+(255*part.Color.r))/2,(main.g+(255*part.Color.g))/2,(main.b+(255*part.Color.b))/2)),math.random(5000,10000)/10000,main.v)
  841. Part1.Parent = DebrisModel
  842. Part1.Size = Vector3.new(asdf,asdf,asdf)
  843. Part1.Anchored = true
  844. local a = 1.5
  845. Part1.CFrame = CFrame.new(endPoint + Vector3.new(math.random(-2,2)*a,math.random(-4,4),math.random(-2,2)*a))
  846. Part1.Name = "EXPLOSION"
  847. else
  848. local asdf = math.random(0,5)*10
  849. local Part1 = Instance.new("Part")
  850. local mesh2 = Instance.new("SpecialMesh",Part1)
  851. mesh2.MeshType = Enum.MeshType.Sphere
  852. mesh2.Scale = Vector3.new(0,0,0)
  853. Part1.Material = Enum.Material.Neon
  854. Part1.CanCollide = false
  855. Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v)
  856. Part1.Parent = DebrisModel
  857. Part1.Size = Vector3.new(asdf,asdf,asdf)
  858. Part1.Anchored = true
  859. local a = 1.5
  860. Part1.CFrame = CFrame.new(endPoint + Vector3.new(math.random(-2,2)*a,math.random(-4,4),math.random(-2,2)*a))
  861. Part1.Name = "EXPLOSION"
  862. end
  863. end
  864.  
  865. for i,v in pairs(findAllNearestTorso(endPoint,50)) do
  866. if v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth >= 9e+99 then
  867. v:Destroy()
  868. else
  869. v.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth/math.random(120,180))
  870. end
  871. local Position = mouse.Hit.p
  872. local Target = v.Position
  873. local direction = Target - Position
  874. local direction = computeDirection(direction)
  875. local bv = Instance.new("BodyVelocity",v)
  876. bv.Velocity = direction * (10 - ((Position - Target).magnitude/2))
  877. debris:AddItem(bv,1)
  878. end
  879.  
  880. end
  881. clashpart:Destroy()
  882. Part0:Destroy()
  883. wait(0.3)
  884. aiming_anim = false
  885. delay(0.3,function() debounce = false end)
  886. end
  887.  
  888. function nukewelpo()
  889. coroutine.resume(coroutine.create(function()
  890. local magnitude = nil
  891. local Position = nil
  892. if animid == 0 then
  893. Position = larm.Position
  894. else
  895. Position = rarm.Position
  896. end
  897. --sound(743499393,Position,10,math.random(6,8)/10)
  898. sound(440145223,Position,10,math.random(4,5)/10,100)
  899.  
  900. local Part1 = Instance.new("Part")
  901. local mesh2 = Instance.new("SpecialMesh",Part1)
  902. mesh2.MeshId = "rbxassetid://559831844"
  903. mesh2.Scale = Vector3.new(0,0,0.4)
  904. Part1.Material = Enum.Material.Neon
  905. Part1.CanCollide = false
  906. Part1.Color = Color3.fromHSV(0,0,main.v)
  907. Part1.Parent = DebrisModel
  908. Part1.Size = Vector3.new(0,0,0)
  909. Part1.Anchored = true
  910. Part1.CFrame = CFrame.new(Position,mouse.Hit.p)
  911. Part1.Name = "EXPLOSION3"
  912.  
  913. local Part0 = Instance.new("Part",DebrisModel)
  914. local PointLight2 = Instance.new("PointLight")
  915. Part0.Name = "Bullet"
  916. Part0.Material = Enum.Material.Neon
  917. Part0.Color = Color3.fromHSV(0,0,main.v)
  918. Part0.Anchored = false
  919. Part0.Size = Vector3.new(5, 5, 5)
  920. local mesh = Instance.new("SpecialMesh",Part0)
  921. mesh.MeshType = Enum.MeshType.Sphere
  922. mesh.Scale = Vector3.new(3,3,3)
  923. local bforce = Instance.new("BodyForce",Part0)
  924. bforce.force = Vector3.new(0, ((bforce.Parent:getMass())*workspace.Gravity), 0)
  925. Part0.CanCollide = false
  926. PointLight2.Parent = Part0
  927. PointLight2.Color = Part0.Color
  928. local Target = mouse.Hit.p
  929. local direction = Target - Position
  930. local direction = computeDirection(direction)
  931. local pos = Position + (direction * 2)
  932. Part0.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0)
  933. Part0.Velocity = direction * 150
  934. local asd = nil
  935. local loop = nil
  936. delay(5, function() Part0:Destroy() loop:disconnect() asd:disconnect() end)
  937. loop = rs:connect(function()
  938. local asdf = math.random(500,1000)/1000
  939. local Part1 = Instance.new("Part")
  940. local mesh2 = Instance.new("SpecialMesh",Part1)
  941. mesh2.MeshType = Enum.MeshType.Sphere
  942. Part1.Material = Enum.Material.Neon
  943. Part1.CanCollide = false
  944. Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v)
  945. Part1.Parent = DebrisModel
  946. Part1.Size = (Part0.Size*3) + Vector3.new(asdf,asdf,asdf)
  947. Part1.Anchored = true
  948. Part1.CFrame = CFrame.new(Part0.Position + Vector3.new(math.random(-3000,3000)/750,math.random(-3000,3000)/750,math.random(-3000,3000)/750))
  949. Part1.Name = "SMOKE"
  950. end)
  951. asd = Part0.Touched:connect(function(ht)
  952. local hit=ht.Parent
  953. if checkIfNotPlayer(ht) == true and ht.CanCollide == true then
  954. asd:disconnect()
  955. loop:disconnect()
  956. Part0:Destroy()
  957.  
  958. sound(explosionid[math.random(1,#explosionid)],Part0.Position,10,math.random(3,5)/10,500)
  959. for i,v in pairs(findAllNearestTorso(Part0.Position,160)) do
  960. if v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth >= 9e+99 then
  961. v:Destroy()
  962. else
  963. v.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth/(math.random(20,30)/10))
  964. end
  965. local Position = Part0.Position
  966. local Target = v.Position
  967. local direction = Target - Position
  968. local direction = computeDirection(direction)
  969. local bv = Instance.new("BodyVelocity",v)
  970. bv.Velocity = direction * (120 - ((Position - Target).magnitude/2))
  971. debris:AddItem(bv,1)
  972. end
  973. for i=1,10,0.5 do for x=1,math.random(0,1) do rs:wait() end
  974. for z=1,math.random(2,3) do
  975. local asdf = math.random(-5,5)*10-(i/20)*12
  976. local Part1 = Instance.new("Part")
  977. local mesh2 = Instance.new("SpecialMesh",Part1)
  978. mesh2.MeshType = Enum.MeshType.Sphere
  979. mesh2.Scale = Vector3.new(0,0,0)
  980. Part1.Material = Enum.Material.Neon
  981. Part1.CanCollide = false
  982. Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v)
  983. Part1.Parent = DebrisModel
  984. Part1.Size = Vector3.new(asdf,asdf,asdf)
  985. Part1.Anchored = true
  986. local a = i*5
  987. Part1.CFrame = CFrame.new(Part0.Position + Vector3.new(math.random(-2,2)*a,math.random(-30,30),math.random(-2,2)*a))
  988. Part1.Name = "EXPLOSION4"
  989. end
  990. end
  991.  
  992. end
  993. end)
  994. end))
  995. end
  996.  
  997. holdq = false
  998. holdr = false
  999. cooldownult = false
  1000.  
  1001. mouse.KeyDown:connect(function(key)
  1002. if debounce == false then
  1003. if key == "e" then
  1004. dashasdf()
  1005. elseif key == "r" and cooldownult == false then
  1006. cooldownult = true
  1007. if animid == 0 then
  1008. animid = 1
  1009. else
  1010. animid = 0
  1011. end
  1012. debounce = true
  1013. holdr = true
  1014. aiming_anim = true
  1015. wait(0.2)
  1016. repeat
  1017. rs:wait()
  1018. timer = 150
  1019. until holdr == false
  1020. nukewelpo()
  1021.  
  1022. local Position = mouse.Hit.p
  1023. local Target = root.Position
  1024. local direction = Target - Position
  1025. local direction = computeDirection(direction)
  1026. root.Velocity = direction * 300
  1027.  
  1028. aiming_anim = false
  1029. delay(5,function() cooldownult = false end)
  1030. delay(1,function() debounce = false end)
  1031.  
  1032. elseif key == "q" then
  1033. debounce = true
  1034. if animid == 0 then
  1035. animid = 1
  1036. else
  1037. animid = 0
  1038. end
  1039. holdq = true
  1040. attack = true
  1041. aiming_anim = true
  1042. repeat rs:wait() timer = 150 until holdq == false
  1043. laz0r()
  1044. attack = false
  1045. end
  1046. end
  1047. end)
  1048.  
  1049. mouse.KeyUp:connect(function(key)
  1050. if key == "q" then
  1051. holdq = false
  1052. elseif key == "r" then
  1053. holdr = false
  1054. end
  1055. end)
  1056.  
  1057. ----------------------------------------------------------------------------
  1058. music(themeid,themepitch)
  1059. velocityYFall=0
  1060. velocityYFall2=0
  1061. velocityYFall3=0
  1062. velocityYFall4=0
  1063. neckrotY=0
  1064. neckrotY2=0
  1065. torsorotY=0
  1066. torsorotY2=0
  1067. torsoY=0
  1068. torsoY2=0
  1069. sine = 0
  1070. newWeld(torso, larm, -1.5, 0.5, 0)
  1071. larm.Weld.C1 = CFrame.new(0, 0.5, 0)
  1072. newWeld(torso, rarm, 1.5, 0.5, 0)
  1073. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
  1074. newWeld(torso, hed, 0, 1.5, 0)
  1075. newWeld(torso, lleg, -0.5, -1, 0)
  1076. lleg.Weld.C1 = CFrame.new(0, 1, 0)
  1077. newWeld(torso, rleg, 0.5, -1, 0)
  1078. rleg.Weld.C1 = CFrame.new(0, 1, 0)
  1079. newWeld(root, torso, 0, -1, 0)
  1080. torso.Weld.C1 = CFrame.new(0, -1, 0)
  1081.  
  1082. rs:connect(function()
  1083.  
  1084. bg.MaxTorque = Vector3.new(0,0,0)
  1085.  
  1086. for i,v in pairs(DebrisModel:GetChildren()) do
  1087.  
  1088.  
  1089. if v.Name == "EXPLOSION" then
  1090. local change = 0.04-(v.Transparency*0.02)
  1091. local vm = v:FindFirstChildOfClass("SpecialMesh")
  1092. vm.Scale = vm.Scale + Vector3.new(change,change,change)
  1093. v.Transparency = v.Transparency + 0.02
  1094. if v.Transparency >= 1 then
  1095. v:Destroy()
  1096. end
  1097.  
  1098. elseif v.Name == "EXPLOSION2" then
  1099. local change = 0.04-(v.Transparency*0.04)
  1100. local vm = v:FindFirstChildOfClass("SpecialMesh")
  1101. vm.Scale = vm.Scale + Vector3.new(change,change,0)
  1102. v.Transparency = v.Transparency + 0.025
  1103. if v.Transparency >= 1 then
  1104. v:Destroy()
  1105. end
  1106.  
  1107. elseif v.Name == "EXPLOSION3" then
  1108. local change = 0.5-(v.Transparency*0.5)
  1109. local vm = v:FindFirstChildOfClass("SpecialMesh")
  1110. vm.Scale = vm.Scale + Vector3.new(change,change,0)
  1111. v.Transparency = v.Transparency + 0.1
  1112. if v.Transparency >= 1 then
  1113. v:Destroy()
  1114. end
  1115.  
  1116. elseif v.Name == "EXPLOSION4" then
  1117. local change = 0.15-(v.Transparency*0.125)
  1118. local vm = v:FindFirstChildOfClass("SpecialMesh")
  1119. vm.Scale = vm.Scale + Vector3.new(change,change,change)
  1120. v.Transparency = v.Transparency + 0.01
  1121. if v.Transparency >= 1 then
  1122. v:Destroy()
  1123. end
  1124.  
  1125. elseif v.Name == "SMOKE" then
  1126. local vm = v:FindFirstChildOfClass("SpecialMesh")
  1127. vm.Scale = vm.Scale - Vector3.new(0.075,0.075,0.075)
  1128. if vm.Scale.X <= 0 then
  1129. v:Destroy()
  1130. end
  1131.  
  1132. elseif v.Name == "SMOKE2" then
  1133. local change = 2-(v.Transparency*2)
  1134. local vm = v:FindFirstChildOfClass("SpecialMesh")
  1135. local Position = nil
  1136. if animid == 0 then
  1137. Position = larm.Position
  1138. else
  1139. Position = rarm.Position
  1140. end
  1141. local Target = mouse.Hit.p
  1142. local direction = Target - Position
  1143. local direction = computeDirection(direction)
  1144. local ray = Ray.new(Position, (Target-Position).unit*1048)
  1145. local part, endPoint = workspace:FindPartOnRay(ray, char)
  1146. vm.Scale = Vector3.new(vm.Scale.X,(Position-endPoint).magnitude,vm.Scale.Z) + Vector3.new(change,0,change)
  1147. local pos = Position + (direction * (vm.Scale.Y/2))
  1148. v.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0)
  1149. vm.Offset = Vector3.new(math.random(-10000,10000)/10000,math.random(-10000,10000)/10000,0)
  1150. v.Transparency = v.Transparency + 0.1
  1151. if v.Transparency >= 1 then
  1152. v:Destroy()
  1153. end
  1154.  
  1155.  
  1156. elseif v.Name == "LIGHTNING" then
  1157. local vm = v:FindFirstChildOfClass("BlockMesh")
  1158. vm.Scale = vm.Scale - Vector3.new(0.1,0.1,0)
  1159. if vm.Scale.X <= 0 then
  1160. v:Destroy()
  1161. end
  1162.  
  1163. end
  1164. end
  1165.  
  1166. if -root.Velocity.Y/1.5 > 0 and -root.Velocity.Y/1.5 < 160 then
  1167. velocityYFall = root.Velocity.Y/1.5
  1168. end
  1169. if -root.Velocity.Y/180 > 0 and -root.Velocity.Y/180 < 1.2 then
  1170. velocityYFall2 = root.Velocity.Y/180
  1171. end
  1172. if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 50 then
  1173. velocityYFall3 = root.Velocity.Y/1.5
  1174. end
  1175. if -root.Velocity.Y/1.5 > -50 and -root.Velocity.Y/1.5 < 20 then
  1176. velocityYFall4 = root.Velocity.Y/1.5
  1177. end
  1178. if root.RotVelocity.Y/6 < 1 and root.RotVelocity.Y/6 > -1 then
  1179. neckrotY = root.RotVelocity.Y/6
  1180. end
  1181. if root.RotVelocity.Y/8 < 0.6 and root.RotVelocity.Y/8 > -0.6 then
  1182. neckrotY2 = root.RotVelocity.Y/8
  1183. end
  1184.  
  1185. if root.RotVelocity.Y/6 < 0.2 and root.RotVelocity.Y/6 > -0.2 then
  1186. torsorotY = root.RotVelocity.Y/6
  1187. end
  1188. if root.RotVelocity.Y/8 < 0.2 and root.RotVelocity.Y/8 > -0.2 then
  1189. torsorotY2 = root.RotVelocity.Y/8
  1190. end
  1191.  
  1192.  
  1193. torsoY = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/20
  1194. torsoY2 = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/36
  1195.  
  1196. if attack == true then
  1197. hum.WalkSpeed = 1
  1198. else
  1199. hum.WalkSpeed = 10
  1200. end
  1201.  
  1202. if canjump == true then
  1203. hum.JumpPower = 50
  1204. else
  1205. hum.JumpPower = 0
  1206. end
  1207.  
  1208. local jumped = false
  1209. local ray1 = Ray.new(root.Position+Vector3.new(1,0,0),Vector3.new(0, -6, 0))
  1210. local part1, endPoint = workspace:FindPartOnRay(ray1, char)
  1211. local ray2 = Ray.new(root.Position-Vector3.new(1,0,0),Vector3.new(0, -6, 0))
  1212. local part2, endPoint = workspace:FindPartOnRay(ray2, char)
  1213. local ray3 = Ray.new(root.Position+Vector3.new(0,0,0.5),Vector3.new(0, -6, 0))
  1214. local part3, endPoint = workspace:FindPartOnRay(ray3, char)
  1215. local ray4 = Ray.new(root.Position-Vector3.new(0,0,0.5),Vector3.new(0, -6, 0))
  1216. local part4, endPoint = workspace:FindPartOnRay(ray4, char)
  1217.  
  1218. if part1 or part2 or part3 or part4 then jumped = false else endPoint = 0 jumped = true end
  1219.  
  1220. local rlegray = Ray.new(rleg.Position+Vector3.new(0,0.5,0),Vector3.new(0, -1.75, 0))
  1221. local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, char)
  1222.  
  1223. local llegray = Ray.new(lleg.Position+Vector3.new(0,0.5,0),Vector3.new(0, -1.75, 0))
  1224. local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, char)
  1225.  
  1226. if no_anim == false then
  1227. if hum.Health > 0 then
  1228. if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude >= 5 and jumped == false then
  1229. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-.2)*CFrame.Angles(math.rad(-18),math.rad(0+math.rad(0+2*math.cos(sine/2))),0), 0.1)
  1230. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(math.rad(-10),0,0),0.1)
  1231. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.62-(movement/30)*math.cos(sine/4)/2,(movement/50)*math.cos(sine/4))*CFrame.Angles(math.rad(-5-(movement*2)*math.cos(sine/4))+ -(movement/10)*math.sin(sine/4),math.rad(0-(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
  1232. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.62+(movement/30)*math.cos(sine/4)/2,-(movement/50)*math.cos(sine/4))*CFrame.Angles(math.rad(-5+(movement*2)*math.cos(sine/4))+ (movement/10)*math.sin(sine/4),math.rad(0-(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
  1233. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1+(movement/20)*math.cos(sine/2), 0) * CFrame.Angles(math.rad(-(change*20)-4*math.cos(sine/2)), torsorotY2+math.rad(0-4*math.cos(sine/4)), torsorotY2+math.rad(0-1*math.cos(sine/4))), 0.1)
  1234. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.85-(movement/10)*math.cos(sine/4)/2,-0.1+(movement/15)*math.cos(sine/4))*CFrame.Angles(math.rad(-10+(change*5)-movement*math.cos(sine/4))+ -(movement/10)*math.sin(sine/4),math.rad(0+(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
  1235. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,-0.85+(movement/10)*math.cos(sine/4)/2,-0.1-(movement/15)*math.cos(sine/4))*CFrame.Angles(math.rad(-10+(change*5)+movement*math.cos(sine/4))+ (movement/10)*math.sin(sine/4),math.rad(0+(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
  1236. elseif jumped == true then
  1237. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-.2)*CFrame.Angles(math.rad(-18),math.rad(0+math.rad(0+2*math.cos(sine/2))),0), 0.1)
  1238. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0,0,0),0.1)
  1239. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,1-0.1*math.cos(sine/16)/2,0.1*math.cos(sine/16))*CFrame.Angles(math.rad(0),math.rad(0-1*math.cos(sine/16)),math.rad(-50-1*math.cos(sine/8))), 0.2)
  1240. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,1-0.1*math.cos(sine/16)/2,0.1*math.cos(sine/16))*CFrame.Angles(math.rad(0),math.rad(0-1*math.cos(sine/16)),math.rad(50+1*math.cos(sine/8))), 0.2)
  1241. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1-0.1*math.cos(sine/16), 0) * CFrame.Angles(math.rad(0-2*math.cos(sine/16)),math.rad(0), math.rad(0-1*math.cos(sine/32))), 0.1)
  1242. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.925+0.1*math.cos(sine/16),0)*CFrame.Angles(math.rad(-35-1*math.cos(sine/16)),math.rad(0-1*math.cos(sine/16)),math.rad(-2-0.5*math.cos(sine/8))), 0.2)
  1243. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,0+0.1*math.cos(sine/16),-0.8)*CFrame.Angles(math.rad(-25+1*math.cos(sine/16)),math.rad(0-1*math.cos(sine/16)),math.rad(2+0.5*math.cos(sine/8))), 0.2)
  1244. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 5 then
  1245. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-.1)*CFrame.Angles(math.rad(-18),math.rad(0+math.rad(0+2*math.cos(sine/2))),0), 0.1)
  1246. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(math.rad(-15),0,0),0.1)
  1247. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55-0.1*math.cos(sine/16)/2,-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(0),math.rad(0-1*math.cos(sine/16)),math.rad(-5-1*math.cos(sine/8))), 0.2)
  1248. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55-0.1*math.cos(sine/16)/2,-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(0),math.rad(0-1*math.cos(sine/16)),math.rad(5+1*math.cos(sine/8))), 0.2)
  1249. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1.1-0.1*math.cos(sine/16), 0) * CFrame.Angles(math.rad(0-2*math.cos(sine/16)),math.rad(0), math.rad(0-1*math.cos(sine/32))), 0.1)
  1250. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(0,llegendPoint.Y-lleg.Position.Y,0)*CFrame.new(-0.5,0+0.1*math.cos(sine/16),0)*CFrame.Angles(math.rad(0-1*math.cos(sine/16)),math.rad(0-1*math.cos(sine/16)),math.rad(-2-0.5*math.cos(sine/8))), 0.2)
  1251. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0,rlegendPoint.Y-rleg.Position.Y,0)*CFrame.new(0.5,0+0.1*math.cos(sine/16),0)*CFrame.Angles(math.rad(0+1*math.cos(sine/16)),math.rad(0-1*math.cos(sine/16)),math.rad(2+0.5*math.cos(sine/8))), 0.2)
  1252. end
  1253. for i=1,5 do
  1254. if aiming_anim == true then
  1255. bg.MaxTorque = Vector3.new(9e9,9e9,9e9)
  1256. if jumped == false then
  1257. bg.CFrame = CFrame.new(root.Position,Vector3.new(mouse.Hit.x,root.Position.Y,mouse.Hit.z))
  1258. else
  1259. bg.CFrame = CFrame.new(root.Position,mouse.Hit.p)
  1260. end
  1261. if animid == 0 then
  1262. hed.Weld.C1 = Lerp(hed.Weld.C1,CFrame.Angles(0,math.rad(-80),0),0.4)
  1263. torso.Weld.C0 = Lerp(torso.Weld.C0,CFrame.new(0, -1.1-0.1*math.cos(sine/16), 0) * CFrame.Angles(math.rad(0-2*math.cos(sine/16)),math.rad(-80), math.rad(0-1*math.cos(sine/32))),0.2)
  1264. larm.Weld.C0 = Lerp(larm.Weld.C0,CFrame.new(-1.5,0.55-0.1*math.cos(sine/16)/2,-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(0),math.rad(-10-1*math.cos(sine/16)),math.rad(-90-1*math.cos(sine/8))),0.4)
  1265. else
  1266. hed.Weld.C1 = Lerp(hed.Weld.C1,CFrame.Angles(0,math.rad(80),0),0.4)
  1267. torso.Weld.C0 = Lerp(torso.Weld.C0,CFrame.new(0, -1.1-0.1*math.cos(sine/16), 0) * CFrame.Angles(math.rad(0-2*math.cos(sine/16)),math.rad(80), math.rad(0-1*math.cos(sine/32))),0.2)
  1268. rarm.Weld.C0 = Lerp(rarm.Weld.C0,CFrame.new(1.5,0.55-0.1*math.cos(sine/16)/2,-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(0),math.rad(10-1*math.cos(sine/16)),math.rad(90+1*math.cos(sine/8))),0.4)
  1269. end
  1270. else
  1271. if timer <= 0 then
  1272. animid = math.random(0,1)
  1273. else
  1274. timer = timer - 1
  1275. end
  1276. end
  1277. end
  1278. end
  1279. end
  1280. main_color = Color3.fromRGB(main.r,main.g,main.b)
  1281. pr.Value = main.r
  1282. pg.Value = main.g
  1283. pb.Value = main.b
  1284. pv.Value = main.v
  1285. idth.Value = themeid
  1286. pith.Value = themepitch
  1287. HName.TextStrokeColor3 = Color3.fromHSV(Color3.toHSV(main_color),1,main.v/2)
  1288. HName.TextColor3 = Color3.fromHSV(Color3.toHSV(main_color),1,main.v)
  1289. sine = sine + change
  1290. if hum.Health <= 0 then
  1291. debounce = true
  1292. end
  1293. end)
  1294.  
  1295.  
  1296.  
  1297. --Extras--
  1298. q = char:GetChildren()
  1299. for u = 1, #q do
  1300. if q[u].ClassName == "Accessory" or q[u].ClassName == "Hat" then
  1301. q[u]:remove()
  1302. elseif q[u].ClassName == "CharacterMesh" then
  1303. q[u]:remove()
  1304. elseif q[u].ClassName == "ShirtGraphic" then
  1305. q[u]:remove()
  1306. elseif q[u].ClassName == "Shirt" then
  1307. q[u]:Destroy()
  1308. elseif q[u].ClassName == "Pants" then
  1309. q[u]:Destroy()
  1310. end
  1311. end
  1312. local top = Instance.new("Shirt")
  1313. top.ShirtTemplate = "rbxassetid://1042097476"
  1314. top.Parent = char
  1315. local bottom = Instance.new("Pants")
  1316. bottom.PantsTemplate = "rbxassetid://1042097548"
  1317. bottom.Parent = char
  1318.  
  1319. local BodyColors = char:FindFirstChildOfClass"BodyColors"
  1320. if BodyColors then
  1321. BodyColors.HeadColor = BrickColor.new"Really black"
  1322. BodyColors.TorsoColor = BrickColor.new"Really black"
  1323. BodyColors.LeftArmColor = BrickColor.new"Really black"
  1324. BodyColors.RightArmColor = BrickColor.new"Really black"
  1325. BodyColors.LeftLegColor = BrickColor.new"Really black"
  1326. BodyColors.RightLegColor = BrickColor.new"Really black"
  1327. end
  1328.  
  1329. --extras
  1330. local talksound = Instance.new("Sound",char.Torso)
  1331. talksound.SoundId = "rbxassetid://928210219"
  1332. talksound.Volume = 4
  1333. local blastsound = Instance.new("Sound",char.Torso)
  1334. blastsound.Name = "blast_sound"
  1335. blastsound.SoundId = "rbxassetid://345052019"
  1336. blastsound.Volume = 4
  1337. function swait(num)
  1338. if num==0 or num==nil then
  1339. game:service'RunService'.Stepped:wait(0)
  1340. else
  1341. for i=0,num do
  1342. game:service'RunService'.Stepped:wait(0)
  1343. end
  1344. end
  1345. end
  1346.  
  1347. function chatfunc(text)
  1348. local chat = coroutine.wrap(function()
  1349. if char:FindFirstChild("TalkingBillBoard") ~= nil then
  1350. char:FindFirstChild("TalkingBillBoard"):Destroy()
  1351. end
  1352. local naeeym2 = Instance.new("BillboardGui",char)
  1353. naeeym2.Size = UDim2.new(0,100,0,40)
  1354. naeeym2.StudsOffset = Vector3.new(0,3,0)
  1355. naeeym2.Adornee = char.Head
  1356. naeeym2.Name = "TalkingBillBoard"
  1357. local tecks2 = Instance.new("TextLabel",naeeym2)
  1358. tecks2.BackgroundTransparency = 1
  1359. tecks2.BorderSizePixel = 0
  1360. tecks2.Text = ""
  1361. tecks2.Font = "Fantasy"
  1362. tecks2.TextSize = 30
  1363. tecks2.TextStrokeTransparency = 0
  1364. tecks2.TextColor3 = Color3.new(.6,0,0)
  1365. tecks2.TextStrokeColor3 = Color3.new(0,0,0)
  1366. tecks2.Size = UDim2.new(1,0,0.5,0)
  1367. local tecks3 = Instance.new("TextLabel",naeeym2)
  1368. tecks3.BackgroundTransparency = 1
  1369. tecks3.BorderSizePixel = 0
  1370. tecks3.Text = ""
  1371. tecks3.Font = "Fantasy"
  1372. tecks3.TextSize = 30
  1373. tecks3.TextStrokeTransparency = 0
  1374. tecks3.TextColor3 = Color3.new(0,0,0)
  1375. tecks3.TextStrokeColor3 = Color3.new(1,1,1)
  1376. tecks3.Size = UDim2.new(1,0,0.5,0)
  1377. for i = 1,string.len(text),1 do
  1378. tecks2.Text = string.sub(text,1,i)
  1379. tecks3.Text = string.sub(text,1,i)
  1380. tecks3.Text = string.sub(text,1,i)
  1381. talksound:Play()
  1382. wait(0.01)
  1383. end
  1384. wait(2)
  1385. for i = 1, 50 do
  1386. swait()
  1387. tecks2.Position = tecks2.Position - UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5))
  1388. tecks2.Rotation = tecks2.Rotation - .8
  1389. tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
  1390. tecks2.TextTransparency = tecks2.TextTransparency + .04
  1391. tecks3.Position = tecks2.Position - UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5))
  1392. tecks3.Rotation = tecks2.Rotation + .8
  1393. tecks3.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
  1394. tecks3.TextTransparency = tecks2.TextTransparency + .04
  1395. end
  1396. naeeym2:Destroy()
  1397. end)
  1398. chat()
  1399. end
  1400. function onChatted(msg)
  1401. chatfunc(msg)
  1402. end
  1403. plr.Chatted:connect(onChatted)
  1404. wait(2)
  1405. chatfunc("It´s a beatefule night in void..")
  1406. wait(2)
  1407. chatfunc("Black is rising...")
  1408. wait(2)
  1409. chatfunc("Dream!Sans is dying....")
  1410. wait(2)
  1411. chatfunc("On days like these... Chara like you...")
  1412. wait(2)
  1413. chatfunc("Should be erasing in hell.")
  1414. wait(0.5)
  1415. char.Humanoid.Name = "Sans"
  1416.  
  1417. --chat
  1418.  
  1419. function Blast(AAA)
  1420. if AAA == "f" then
  1421. local chatmath = math.random(1,3)
  1422. if chatmath == 1 then
  1423. chatfunc("Gaster Blaster!")
  1424. end
  1425. if chatmath == 2 then
  1426. chatfunc("This is what you get for killing everybody.")
  1427. end
  1428. if chatmath == 3 then
  1429. chatfunc("Look, I gave up trying to go back a long time ago.")
  1430. end
  1431. local gasterblaster = Instance.new("Part",char.Torso)
  1432. gasterblaster.Size = Vector3.new(7, 16, 4)
  1433. gasterblaster.CanCollide = false
  1434. local gasterblastermesh = Instance.new("FileMesh",gasterblaster)
  1435. gasterblastermesh.MeshId = "rbxassetid://431908407"
  1436. gasterblastermesh.Scale = Vector3.new(0.05,0.05,0.05)
  1437. local gasterblastertexture = Instance.new("Decal",gasterblaster)
  1438. gasterblastertexture.Face = "Back"
  1439. gasterblastertexture.Texture = "http://www.roblox.com/asset/?id=441975828"
  1440. local weeld = Instance.new("Weld",gasterblaster)
  1441. weeld.Part0 = gasterblaster
  1442. weeld.Part1 = char.Torso
  1443. weeld.C0 = CFrame.new(3.71674585, -11.54426, -0.129204988, -0.999741375, 0, 0.0227420069, 0, 1, 0, -0.0227420069, 0, -0.999741375)
  1444. blastsound:Play()
  1445. char.Head.Anchored = true
  1446. wait(1)
  1447. local blast = Instance.new("Part",gasterblaster)
  1448. blast.Size = Vector3.new(18.07, 16.36, 73.54)
  1449. blast.Transparency = 0.7
  1450. blast.Material = "Neon"
  1451. blast.Color = Color3.new(1,1,1)
  1452. blast.CanCollide = true
  1453. local blastweld = Instance.new("Weld",blast)
  1454. blastweld.Part0 = blast
  1455. blastweld.Part1 = gasterblaster
  1456. blastweld.C0 = CFrame.new(-0.430000305, 1.73999977, -40.1399994, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1457. blast.Touched:connect(function(part)
  1458. part.Parent:FindFirstChildOfClass("Humanoid"):Destroy() -- Makes them not able to move
  1459. end)
  1460. wait(2)
  1461. char.Head.Anchored = false
  1462. blast:Destroy()
  1463. gasterblaster:Destroy()
  1464. end
  1465. end
  1466. mouse.KeyDown:connect(Blast)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement