SHARE
TWEET

Untitled

Acc_kili Oct 31st, 2018 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5.     print("FE Compatibility code by Mokiros")
  6.     local rp = RealPlayer
  7.     script.Parent = rp.Character
  8.    
  9.     --RemoteEvent for communicating
  10.     local Event = Instance.new("RemoteEvent")
  11.     Event.Name = "UserInput_Event"
  12.  
  13.     --Fake event to make stuff like Mouse.KeyDown work
  14.     local function fakeEvent()
  15.         local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16.         t.connect = t.Connect
  17.         return t
  18.     end
  19.  
  20.     --Creating fake input objects with fake variables
  21.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  22.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25.     end}
  26.     --Merged 2 functions into one by checking amount of arguments
  27.     CAS.UnbindAction = CAS.BindAction
  28.  
  29.     --This function will trigger the events that have been :Connect()'ed
  30.     local function te(self,ev,...)
  31.         local t = m[ev]
  32.         if t and t._fakeEvent then
  33.             for _,f in pairs(t.Functions) do
  34.                 f(...)
  35.             end
  36.         end
  37.     end
  38.     m.TrigEvent = te
  39.     UIS.TrigEvent = te
  40.  
  41.     Event.OnServerEvent:Connect(function(plr,io)
  42.         if plr~=rp then return end
  43.         m.Target = io.Target
  44.         m.Hit = io.Hit
  45.         if not io.isMouse then
  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 Mouse = Player:GetMouse()
  66.     local UIS = game:GetService("UserInputService")
  67.     local input = function(io,a)
  68.         if a then return end
  69.         --Since InputObject is a client-side instance, we create and pass table instead
  70.         Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  71.     end
  72.     UIS.InputBegan:Connect(input)
  73.     UIS.InputEnded:Connect(input)
  74.  
  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.  
  85.     ----Sandboxed game object that allows the usage of client-side methods and services
  86.     --Real game object
  87.     local _rg = game
  88.  
  89.     --Metatable for fake service
  90.     local fsmt = {
  91.         __index = function(self,k)
  92.             local s = rawget(self,"_RealService")
  93.             if s then return s[k] end
  94.         end,
  95.         __newindex = function(self,k,v)
  96.             local s = rawget(self,"_RealService")
  97.             if s then s[k]=v end
  98.         end,
  99.         __call = function(self,...)
  100.             local s = rawget(self,"_RealService")
  101.             if s then return s(...) end
  102.         end
  103.     }
  104.     local function FakeService(t,RealService)
  105.         t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106.         return setmetatable(t,fsmt)
  107.     end
  108.  
  109.     --Fake game object
  110.     local g = {
  111.         GetService = function(self,s)
  112.             return self[s]
  113.         end,
  114.         Players = FakeService({
  115.             LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116.         },"Players"),
  117.         UserInputService = FakeService(UIS,"UserInputService"),
  118.         ContextActionService = FakeService(CAS,"ContextActionService"),
  119.     }
  120.     rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  121.     g.service = g.GetService
  122.    
  123.     g.RunService = FakeService({
  124.         RenderStepped = _rg:GetService("RunService").Heartbeat,
  125.         BindToRenderStep = function(self,name,_,fun)
  126.             self._btrs[name] = self.Heartbeat:Connect(fun)
  127.         end,
  128.         UnbindFromRenderStep = function(self,name)
  129.             self._btrs[name]:Disconnect()
  130.         end,
  131.     },"RunService")
  132.  
  133.     setmetatable(g,{
  134.         __index=function(self,s)
  135.             return _rg:GetService(s) or typeof(_rg[s])=="function"
  136.             and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  137.         end,
  138.         __newindex = fsmt.__newindex,
  139.         __call = fsmt.__call
  140.     })
  141.     --Changing owner to fake player object to support owner:GetMouse()
  142.     game,owner = g,g.Players.LocalPlayer
  143. end
  144. print([[
  145. ___________________________________
  146.  
  147. Kyutatsuki13's アマツミカ·スタライト script
  148. Build 0003
  149. Amatsumika Starlight the Kami of Stars
  150.  
  151. ___________________________________
  152. ]])
  153.  
  154.  
  155. local p = game:GetService("Players").LocalPlayer
  156. local plr = game:GetService("Players").LocalPlayer
  157. local player = game:GetService("Players").LocalPlayer
  158. local char = p.Character
  159. local mouse = p:GetMouse()
  160. local larm = char:WaitForChild("Left Arm")
  161. local rarm = char:WaitForChild("Right Arm")
  162. local lleg = char:WaitForChild("Left Leg")
  163. local rleg = char:WaitForChild("Right Leg")
  164. local hed = char:WaitForChild("Head")
  165. local torso = char:WaitForChild("Torso")
  166. local root = char:WaitForChild("HumanoidRootPart")
  167. local hum = char:FindFirstChildOfClass("Humanoid")
  168. local debris = game:GetService("Debris")
  169. local run = game:GetService("RunService")
  170. local rs = run.RenderStepped
  171. local cam = workspace.CurrentCamera
  172. local movement = 4
  173. local change = 0.4
  174. local DebrisModel = Instance.new("Model",char)
  175. local stealth = false
  176. local debounce = false
  177. hum.MaxHealth = 50000
  178. hum.Health = hum.MaxHealth
  179. themeid = 556122490
  180. themepitch = 1
  181. main = {r = 0;g = 100;b = 255;v = 1}
  182. if p:FindFirstChild("rcolor") then main.r = p.rcolor.Value else local string = Instance.new("StringValue",p) string.Name = "rcolor" end
  183. if p:FindFirstChild("gcolor") then main.g = p.gcolor.Value else local string = Instance.new("StringValue",p) string.Name = "gcolor" end
  184. if p:FindFirstChild("bcolor") then main.b = p.bcolor.Value else local string = Instance.new("StringValue",p) string.Name = "bcolor" end
  185. if p:FindFirstChild("vcolor") then main.v = p.vcolor.Value else local string = Instance.new("StringValue",p) string.Name = "vcolor" end
  186. if p:FindFirstChild("idtheme") then themeid = p.idtheme.Value else local string = Instance.new("StringValue",p) string.Name = "idtheme" end
  187. if p:FindFirstChild("pitchtheme") then themepitch = p.pitchtheme.Value else local string = Instance.new("StringValue",p) string.Name = "pitchtheme" end
  188. pr = p:FindFirstChild("rcolor")
  189. pg = p:FindFirstChild("gcolor")
  190. pb = p:FindFirstChild("bcolor")
  191. pv = p:FindFirstChild("vcolor")
  192. idth = p:FindFirstChild("idtheme")
  193. pith = p:FindFirstChild("pitchtheme")
  194. main_color = Color3.fromRGB(main.r,main.g,main.b)
  195. explosionid = {262562442,144699494,539294959,1388740053}
  196. --919941001
  197. Prefix = "/"
  198. p.Chatted:connect(function(msg)
  199.  
  200.     if msg:lower():sub(1,#Prefix+#'color r ')==Prefix..'color r ' then
  201.     local v = tonumber(msg:sub(#Prefix+#'color r '+1))
  202.     main.r = v
  203.     elseif msg:lower():sub(1,#Prefix+#'color g ')==Prefix..'color g ' then
  204.     local v = tonumber(msg:sub(#Prefix+#'color g '+1))
  205.     main.g = v
  206.     elseif msg:lower():sub(1,#Prefix+#'color b ')==Prefix..'color b ' then
  207.     local v = tonumber(msg:sub(#Prefix+#'color b '+1))
  208.     main.b = v
  209.     elseif msg:lower():sub(1,#Prefix+#'color v ')==Prefix..'color v ' then
  210.     local v = tonumber(msg:sub(#Prefix+#'color v '+1))
  211.     if v > 1 then main.v = 1 elseif v < -1 then main.v = -1 else main.v = v end
  212.  
  213.     elseif msg:lower():sub(1,#Prefix+#'theme ')==Prefix..'theme ' then
  214.     local v = tonumber(msg:sub(#Prefix+#'theme '+1))
  215.     themeid = v
  216.     music(themeid,themepitch)
  217.  
  218.     elseif msg:lower():sub(1,#Prefix+#'pitch ')==Prefix..'pitch ' then
  219.     local v = tonumber(msg:sub(#Prefix+#'pitch '+1))
  220.     themepitch = v
  221.     music(themeid,themepitch)
  222.  
  223.     elseif msg:lower():sub(1,#Prefix+#'prefix ')==Prefix..'prefix ' then
  224.     local v = msg:sub(#Prefix+#'prefix '+1)
  225.     Prefix = v
  226.  
  227.     elseif msg:lower():sub(1,#Prefix+#'reset')==Prefix..'reset' then
  228.     main.r = 0
  229.     main.g = 100
  230.     main.b = 255
  231.     main.v = 1
  232.     themeid = 556122490
  233.     themepitch = 1
  234.     music(themeid,themepitch)
  235.  
  236.     end
  237.  
  238. end)
  239. ----------------------------------------------------------------------------
  240. no_anim = false
  241. attack = false
  242. attacking = false
  243. canjump = true
  244. aiming_anim = false
  245. animid = math.random(0,1)
  246. timer = 0
  247. bg = Instance.new("BodyGyro",root)
  248. bg.P = 100000
  249. bg.D = 100
  250. ----------------------------------------------------------------------------
  251.  
  252. function rswait(value)
  253.   if value ~= nil and value ~= 0 then
  254.     for i=1,value do
  255.      rs:wait()
  256.     end
  257.   else
  258.     rs:wait()
  259.   end
  260. end
  261.  
  262. ----------------------------------------------------------------------------
  263. max = 0
  264. function music(id,pitch)
  265. max = 0
  266. if id == "Stop" then
  267. if not torso:FindFirstChild("MusicRuin") then
  268. soundz = Instance.new("Sound",torso)
  269. end
  270. soundz:Stop()
  271. else
  272. if not torso:FindFirstChild("MusicRuin") then
  273. soundz = Instance.new("Sound",torso)
  274. end
  275. soundz.MaxDistance = 150*5
  276. soundz.EmitterSize = 150/5
  277. soundz.Volume = 10
  278. soundz.Name = "MusicRuin"
  279. soundz.Looped = true
  280. soundz.PlaybackSpeed = pitch
  281. soundz.SoundId = "rbxassetid://"..id
  282. soundz:Stop()
  283. soundz:Play()
  284. end
  285. end
  286.  
  287. ----------------------------------------------------------------------------
  288.  
  289. function lerp(a, b, t)
  290.   return a + (b - a)*t
  291. end
  292.  
  293. ----------------------------------------------------------------------------
  294.  
  295. function Lerp(c1,c2,al)
  296.   local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  297.   local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  298.   for i,v in pairs(com1) do
  299.     com1[i] = v+(com2[i]-v)*al
  300.   end
  301.   return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  302. end
  303.  
  304. ----------------------------------------------------------------------------
  305.  
  306. function slerp(a, b, t)
  307.   dot = a:Dot(b)
  308.   if dot > 0.99999 or dot < -0.99999 then
  309.     return t <= 0.5 and a or b
  310.   else
  311.     r = math.acos(dot)
  312.     return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r)
  313.   end
  314. end
  315.  
  316. ----------------------------------------------------------------------------
  317.  
  318. function clerp(c1,c2,al)
  319.  
  320.   local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  321.  
  322.   local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  323.  
  324.   for i,v in pairs(com1) do
  325.  
  326.     com1[i] = lerp(v,com2[i],al)
  327.  
  328.   end
  329.  
  330.   return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  331.  
  332. end
  333.  
  334. ----------------------------------------------------------------------------
  335.  
  336. function findAllNearestTorso(pos,dist)
  337.     local list = game.Workspace:children()
  338.     local torso = {}
  339.     local temp = nil
  340.     local human = nil
  341.     local temp2 = nil
  342.     for x = 1, #list do
  343.         temp2 = list[x]
  344.         if (temp2.className == "Model") and (temp2 ~= char) then
  345.             local nayem = "Torso"
  346.             if temp2:findFirstChild("UpperTorso") then nayem = "UpperTorso" end
  347.             temp = temp2:findFirstChild(nayem)
  348.             human = temp2:findFirstChildOfClass("Humanoid")
  349.             if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  350.                 if (temp.Position - pos).magnitude < dist then
  351.                     table.insert(torso,temp)
  352.                     dist = (temp.Position - pos).magnitude
  353.                 end
  354.             end
  355.         end
  356.     end
  357.     return torso
  358. end
  359.  
  360. ----------------------------------------------------------------------------
  361.  
  362. local isAPlayer
  363. function checkIfNotPlayer(model)
  364. coroutine.resume(coroutine.create(function()
  365. 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
  366. isAPlayer = true
  367. else
  368. isAPlayer = false
  369. end
  370. end))
  371. return isAPlayer
  372. end
  373.  
  374. ----------------------------------------------------------------------------
  375.  
  376. function computeDirection(vec)
  377. local lenSquared = vec.magnitude * vec.magnitude
  378. local invSqrt = 1 / math.sqrt(lenSquared)
  379. return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
  380. end
  381.  
  382. ----------------------------------------------------------------------------
  383.  
  384. function newWeld(wp0, wp1, wc0x, wc0y, wc0z)
  385.  
  386.   local wld = Instance.new("Weld", wp1)
  387.  
  388.   wld.Part0 = wp0
  389.  
  390.   wld.Part1 = wp1
  391.  
  392.   wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  393.  
  394.   return wld
  395.  
  396. end
  397.  
  398. ----------------------------------------------------------------------------
  399.  
  400. function weld(model)
  401.     local parts,last = {}
  402.     local function scan(parent)
  403.         for _,v in pairs(parent:GetChildren()) do
  404.             if (v:IsA("BasePart")) then
  405.                 if (last) then
  406.                     local w = Instance.new("Weld")
  407.                     w.Name = ("%s_Weld"):format(v.Name)
  408.                     w.Part0,w.Part1 = last,v
  409.                     w.C0 = last.CFrame:inverse()
  410.                     w.C1 = v.CFrame:inverse()
  411.                     w.Parent = last
  412.                 end
  413.                 last = v
  414.                 table.insert(parts,v)
  415.             end
  416.             scan(v)
  417.         end
  418.     end
  419.     scan(model)
  420.     for _,v in pairs(parts) do
  421.         v.Anchored = false
  422.         v.Locked = true
  423.     end
  424. end
  425.  
  426. ----------------------------------------------------------------------------
  427.  
  428. function sound(id,position,vol,pitch,dist,start,finish)
  429.   coroutine.resume(coroutine.create(function()
  430.  
  431.   local part = Instance.new("Part",DebrisModel)
  432.   part.Anchored = true
  433.   part.Position = position
  434.   part.Size = Vector3.new(0,0,0)
  435.   part.CanCollide = false
  436.   part.Transparency = 1
  437.  
  438.   soundasd = Instance.new("Sound",part)
  439.  
  440.   soundasd.SoundId = "rbxassetid://"..id
  441.  
  442.   if vol ~= nil then
  443.     soundasd.Volume = vol
  444.   end
  445.  
  446.   if pitch ~= nil then
  447.     soundasd.PlaybackSpeed = pitch
  448.   end
  449.  
  450.   if dist ~= nil then
  451.     soundasd.MaxDistance = dist*5
  452.     soundasd.EmitterSize = dist/5
  453.   end
  454.  
  455.   delay(0.5,function() debris:AddItem(part,soundasd.TimeLength+3) end)
  456.  
  457.   soundasd:Play()
  458.  
  459.   end))
  460.   return soundasd
  461. end
  462.  
  463. function createsound(id,parent)
  464.  
  465.   local soundz = Instance.new("Sound",parent)
  466.  
  467.   soundz.SoundId = "rbxassetid://"..id
  468.  
  469.   return soundz
  470.  
  471. end
  472.  
  473. function playsound(sond,vol,pitch,start)
  474.  
  475.   if vol ~= nil then
  476.     sond.Volume = vol
  477.   end
  478.  
  479.   if pitch ~= nil then
  480.     sond.PlaybackSpeed = pitch
  481.   end
  482.  
  483.   if start ~= nil then
  484.     sond.TimePosition = start
  485.   end
  486.  
  487.   sond:Play()
  488.  
  489. end
  490.  
  491. ----------------------------------------------------------------------------
  492. eColors={"Really red","Really black"}
  493. function Lightning(Part0,Part1,Times,Offset,Color,Thickness,Trans)
  494.     local magz = (Part0 - Part1).magnitude
  495.     local curpos = Part0
  496.     local trz = {-Offset,Offset}
  497.     for i=1,Times do
  498.         local li = Instance.new("Part", DebrisModel)
  499.         li.TopSurface =0
  500.         li.Material = Enum.Material.Neon
  501.         li.BottomSurface = 0
  502.         li.Anchored = true
  503.         li.Locked = true
  504.         li.Transparency = Trans or 0.4
  505.         li.BrickColor = BrickColor.new(Color)
  506.         li.formFactor = "Custom"
  507.         li.CanCollide = false
  508.         li.Size = Vector3.new(Thickness,Thickness,magz/Times)
  509.         local lim = Instance.new("BlockMesh",li)
  510.         local Offzet = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  511.         local trolpos = CFrame.new(curpos,Part1)*CFrame.new(0,0,magz/Times).p+Offzet
  512.         if Times == i then
  513.         local magz2 = (curpos - Part1).magnitude
  514.         li.Size = Vector3.new(Thickness,Thickness,magz2)
  515.         li.CFrame = CFrame.new(curpos,Part1)*CFrame.new(0,0,-magz2/2)
  516.         else
  517.         li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
  518.         end
  519.         curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p
  520.         li.Name = "LIGHTNING"
  521.     end
  522. end
  523.  
  524. ----------------------------------------------------------------------------
  525.  
  526. local HBill = Instance.new("BillboardGui",hed)
  527. local HMain, HBar = Instance.new("Frame", HBill), Instance.new("Frame")
  528. local HName = Instance.new("TextLabel")
  529. HBill.Size = UDim2.new(15,0,2.2,0)
  530. HBill.StudsOffset = Vector3.new(3.675,1.2,0)
  531. HBill.AlwaysOnTop = true
  532. HBill.Enabled = true
  533. HMain.BackgroundColor3 = Color3.new(0, 0, 0)
  534. HMain.BackgroundTransparency = 1
  535. HMain.Size = UDim2.new(.5,0,.2,0)
  536. HName.Parent = HMain
  537. HName.BackgroundTransparency = 1
  538. HName.BackgroundColor3 = Color3.new(255,255,255)
  539. HName.BorderColor3 = Color3.new(0,0,0)
  540. HName.BorderSizePixel = 2
  541. HName.Size = UDim2.new(1,0,.75,0)
  542. HName.Font = "Code"
  543. HName.Text = [[(Amatsumika Starlight)]]
  544. HName.TextScaled = true
  545. HName.TextColor3 = Color3.new(0.5,0.5,0.5)
  546. HName.TextStrokeColor3 = Color3.new(0.1,0.1,0.1)
  547. HName.TextStrokeTransparency = 0
  548. HName.TextYAlignment = "Bottom"
  549.  
  550. local HBill = Instance.new("BillboardGui",hed)
  551. local HMain, HBar = Instance.new("Frame", HBill), Instance.new("Frame")
  552. local HName = Instance.new("TextLabel")
  553. HBill.Size = UDim2.new(15,0,2.2,0)
  554. HBill.StudsOffset = Vector3.new(3.675,2,0)
  555. HBill.AlwaysOnTop = true
  556. HBill.Enabled = true
  557. HMain.BackgroundColor3 = Color3.new(0, 0, 0)
  558. HMain.BackgroundTransparency = 1
  559. HMain.Size = UDim2.new(.5,0,.5,0)
  560. HName.Parent = HMain
  561. HName.BackgroundTransparency = 1
  562. HName.BackgroundColor3 = Color3.new(255,255,255)
  563. HName.BorderColor3 = Color3.new(0,0,0)
  564. HName.BorderSizePixel = 2
  565. HName.Size = UDim2.new(1,0,.75,0)
  566. HName.Font = "Code"
  567. HName.Text = [[「アマツミカ·スタライト」]]
  568. HName.TextScaled = true
  569. HName.TextColor3 = Color3.new(0,0,0)
  570. HName.TextStrokeColor3 = Color3.new(255,255,255)
  571. HName.TextStrokeTransparency = 0
  572. HName.TextYAlignment = "Bottom"
  573.  
  574. function bigboomrektxd()
  575. coroutine.resume(coroutine.create(function()
  576. local magnitude = nil
  577. local Position = nil
  578. if animid == 0 then
  579. Position = larm.Position
  580. else
  581. Position = rarm.Position
  582. end
  583. --sound(743499393,Position,10,math.random(6,8)/10)
  584. sound(440145223,Position,10,math.random(10,12)/10,50)
  585.  
  586. local Part1 = Instance.new("Part")
  587. local mesh2 = Instance.new("SpecialMesh",Part1)
  588. mesh2.MeshId = "rbxassetid://559831844"
  589. mesh2.Scale = Vector3.new(0,0,0.4)
  590. Part1.Material = Enum.Material.Neon
  591. Part1.CanCollide = false
  592. Part1.Color = Color3.fromHSV(0,0,main.v)
  593. Part1.Parent = DebrisModel
  594. Part1.Size = Vector3.new(0,0,0)
  595. Part1.Anchored = true
  596. Part1.CFrame = CFrame.new(Position,mouse.Hit.p)
  597. Part1.Name = "EXPLOSION2"
  598.  
  599. local Part0 = Instance.new("Part",DebrisModel)
  600. local PointLight2 = Instance.new("PointLight")
  601. Part0.Name = "Bullet"
  602. Part0.Material = Enum.Material.Neon
  603. Part0.Color = Color3.fromHSV(0,0,main.v)
  604. Part0.Anchored = false
  605. Part0.Size = Vector3.new(5, 5, 5)
  606. local mesh = Instance.new("SpecialMesh",Part0)
  607. mesh.MeshType = Enum.MeshType.Sphere
  608. local bforce = Instance.new("BodyForce",Part0)
  609. bforce.force = Vector3.new(0, ((bforce.Parent:getMass())*workspace.Gravity), 0)
  610. Part0.CanCollide = false
  611. PointLight2.Parent = Part0
  612. PointLight2.Color = Part0.Color
  613. local Target = mouse.Hit.p
  614. local direction = Target - Position
  615. local direction = computeDirection(direction)
  616. local pos = Position + (direction * 2)
  617. Part0.CFrame = CFrame.new(pos,  pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0)
  618. Part0.Velocity = direction * 60
  619. local asd = nil
  620. local loop = nil
  621. delay(5, function() Part0:Destroy() loop:disconnect() asd:disconnect() end)
  622. loop = rs:connect(function()
  623. local asdf = math.random(500,1000)/1000
  624. local Part1 = Instance.new("Part")
  625. local mesh2 = Instance.new("SpecialMesh",Part1)
  626. mesh2.MeshType = Enum.MeshType.Sphere
  627. Part1.Material = Enum.Material.Neon
  628. Part1.CanCollide = false
  629. Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v)
  630. Part1.Parent = DebrisModel
  631. Part1.Size = Part0.Size + Vector3.new(asdf,asdf,asdf)
  632. Part1.Anchored = true
  633. Part1.CFrame = CFrame.new(Part0.Position + Vector3.new(math.random(-1000,1000)/750,math.random(-1000,1000)/750,math.random(-1000,1000)/750))
  634. Part1.Name = "SMOKE"
  635. end)
  636. asd = Part0.Touched:connect(function(ht)
  637. local hit=ht.Parent
  638. if checkIfNotPlayer(ht) == true and ht.CanCollide == true then
  639. asd:disconnect()
  640. loop:disconnect()
  641. Part0:Destroy()
  642.  
  643. sound(explosionid[math.random(1,#explosionid)],Part0.Position,10,math.random(6,9)/10,200)
  644. for i,v in pairs(findAllNearestTorso(Part0.Position,50)) do
  645. if v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth >= 9e+99 then
  646. v:Destroy()
  647. else
  648. v.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth/(math.random(50,60)/10))
  649. end
  650. local Position = Part0.Position
  651. local Target = v.Position
  652. local direction = Target - Position
  653. local direction = computeDirection(direction)
  654. local bv = Instance.new("BodyVelocity",v)
  655. bv.Velocity = direction * (50 - ((Position - Target).magnitude/2))
  656. debris:AddItem(bv,1)
  657. end
  658. for i=1,14,2 do for x=1,math.random(0,1) do rs:wait() end
  659. for z=1,math.random(2,3) do
  660. local asdf = math.random(-5,5)*10-(i/20)*8
  661. local Part1 = Instance.new("Part")
  662. local mesh2 = Instance.new("SpecialMesh",Part1)
  663. mesh2.MeshType = Enum.MeshType.Sphere
  664. mesh2.Scale = Vector3.new(0,0,0)
  665. Part1.Material = Enum.Material.Neon
  666. Part1.CanCollide = false
  667. Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v)
  668. Part1.Parent = DebrisModel
  669. Part1.Size = Vector3.new(asdf,asdf,asdf)
  670. Part1.Anchored = true
  671. local a = i*0.5
  672. Part1.CFrame = CFrame.new(Part0.Position + Vector3.new(math.random(-2,2)*a,math.random(-10,10),math.random(-2,2)*a))
  673. Part1.Name = "EXPLOSION"
  674. end
  675. end
  676.  
  677. end
  678. end)
  679. end))
  680. end
  681.  
  682. holdclick=false
  683.  
  684. mouse.Button1Down:connect(function()
  685. if debounce == false then
  686. if animid == 0 then
  687. animid = 1
  688. else
  689. animid = 0
  690. end
  691. debounce = true
  692. holdclick = true
  693. aiming_anim = true
  694. wait(0.2)
  695. repeat
  696. rs:wait()
  697. timer = 150
  698. until holdclick == false
  699. bigboomrektxd()
  700.  
  701. local Position = mouse.Hit.p
  702. local Target = root.Position
  703. local direction = Target - Position
  704. local direction = computeDirection(direction)
  705. root.Velocity = direction * 150
  706.  
  707. aiming_anim = false
  708. delay(0.3,function() debounce = false end)
  709. end
  710. end)
  711.  
  712. mouse.Button1Up:connect(function()
  713. holdclick=false
  714. end)
  715.  
  716. function dashasdf()
  717. debounce = true
  718.  
  719. canjump = false
  720. attack = true
  721.  
  722. for i,v in pairs(char:GetChildren()) do
  723. if v ~= root then
  724. if v:IsA("Part") then
  725. v.Transparency = 1
  726. elseif v:IsA("Accoutrement") then
  727. v:FindFirstChildOfClass("Part").Transparency = 1
  728. end
  729. end
  730. end
  731.  
  732. local tempattachment = Instance.new("Attachment",root)
  733. tempattachment.Position = Vector3.new(0,0,-4)
  734.  
  735. for i=1,20 do rs:wait()
  736. root.Velocity = Vector3.new(0,0,0)
  737. root.CFrame = CFrame.new(tempattachment.WorldPosition) * CFrame.Angles(math.rad(root.Orientation.X),math.rad(root.Orientation.Y),math.rad(root.Orientation.Z))
  738. local asdf = math.random(500,1000)/100
  739. local Part1 = Instance.new("Part")
  740. local mesh2 = Instance.new("SpecialMesh",Part1)
  741. mesh2.MeshType = Enum.MeshType.Sphere
  742. Part1.Material = Enum.Material.Neon
  743. Part1.CanCollide = false
  744. Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v)
  745. Part1.Parent = DebrisModel
  746. Part1.Size = Vector3.new(asdf,asdf,asdf)
  747. Part1.Anchored = true
  748. Part1.CFrame = CFrame.new(root.Position + Vector3.new(math.random(-1000,1000)/500,math.random(-1000,1000)/500,math.random(-1000,1000)/500))
  749. Part1.Name = "SMOKE"
  750. end
  751.  
  752. tempattachment:Destroy()
  753.  
  754. for i,v in pairs(char:GetChildren()) do
  755. if v ~= root then
  756. if v:IsA("Part") then
  757. v.Transparency = 0
  758. elseif v:IsA("Accoutrement") then
  759. v:FindFirstChildOfClass("Part").Transparency = 0
  760. end
  761. end
  762. end
  763.  
  764. canjump = true
  765. attack = false
  766.  
  767. delay(0.1,function() debounce = false end)
  768. end
  769.  
  770. function laz0r()
  771.  
  772. local Position = nil
  773. if animid == 0 then
  774. Position = larm.Position
  775. else
  776. Position = rarm.Position
  777. end
  778.  
  779. local Part1 = Instance.new("Part")
  780. local mesh2 = Instance.new("SpecialMesh",Part1)
  781. mesh2.MeshId = "rbxassetid://559831844"
  782. mesh2.Scale = Vector3.new(0,0,0.4)
  783. Part1.Material = Enum.Material.Neon
  784. Part1.CanCollide = false
  785. Part1.Color = Color3.fromHSV(0,0,main.v)
  786. Part1.Parent = DebrisModel
  787. Part1.Size = Vector3.new(0,0,0)
  788. Part1.Anchored = true
  789. Part1.CFrame = CFrame.new(Position,mouse.Hit.p)
  790. Part1.Name = "EXPLOSION3"
  791.  
  792. local Part0 = Instance.new("Part",DebrisModel)
  793. Part0.Name = "Bullet"
  794. Part0.Material = Enum.Material.Neon
  795. Part0.Color = Color3.fromHSV(0,0,main.v)
  796. Part0.Anchored = true
  797. local mesh = Instance.new("SpecialMesh",Part0)
  798. mesh.MeshType = Enum.MeshType.Sphere
  799. Part0.CanCollide = false
  800. local Target = mouse.Hit.p
  801. local direction = Target - Position
  802. local direction = computeDirection(direction)
  803. local ray = Ray.new(Position, (Target-Position).unit*1048)
  804. local part, endPoint = workspace:FindPartOnRay(ray, char)
  805. Part0.Size = Vector3.new(5,1,5)
  806. mesh.Scale = Vector3.new(1,(Position-endPoint).magnitude,1)
  807. local pos = Position + (direction * (mesh.Scale.Y/2))
  808. Part0.CFrame = CFrame.new(pos,  pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0)
  809.  
  810. clashpart = Instance.new("Part",DebrisModel)
  811. clashpart.Size = Vector3.new(50,50,50)
  812. clashpart.CanCollide = false
  813. clashpart.Anchored = true
  814. clashpart.Transparency = 1
  815. clashpart.Color = main_color
  816. clashpart.Name = "StarLightClash"
  817. clashpart.CFrame = CFrame.new(endPoint, root.Position)
  818.  
  819. sound(1177475476,Position,10,math.random(5,6)/10,300)
  820.  
  821. local z = 10
  822. for i = 1,100 do rs:wait()
  823. if animid == 0 then
  824. Position = larm.Position
  825. else
  826. Position = rarm.Position
  827. end
  828. local Target = mouse.Hit.p
  829. local direction = Target - Position
  830. local direction = computeDirection(direction)
  831. local ray = Ray.new(Position, (Target-Position).unit*1048)
  832. local part, endPoint = workspace:FindPartOnRay(ray, char)
  833. Part0.Size = Vector3.new(5-((i/100)*5),1,5-((i/100)*5))
  834. mesh.Scale = Vector3.new(1,(Position-endPoint).magnitude,1)
  835. mesh.Offset = Vector3.new(math.random(-10000,10000)/20000,math.random(-10000,10000)/20000,0)
  836. local pos = Position + (direction * (mesh.Scale.Y/2))
  837. Part0.CFrame = CFrame.new(pos,  pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0)
  838. clashpart.CFrame = CFrame.new(endPoint, root.Position)
  839.  
  840. local Position = mouse.Hit.p
  841. local Target = root.Position
  842. local direction = Target - Position
  843. local direction = computeDirection(direction)
  844. root.Velocity = direction * 5
  845.  
  846. if i >= z then z = i + 10 sound(explosionid[math.random(1,#explosionid)],endPoint,10,math.random(6,9)/10,200) end
  847.  
  848. Part1 = Part0:Clone()
  849. Part1.Parent = DebrisModel
  850. Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v)
  851. Part1.Name = "SMOKE2"
  852.  
  853. if part ~= nil then
  854. if part.Name == "StarLightClash" then
  855. local asdf = math.random(0,5)*20
  856. local Part1 = Instance.new("Part")
  857. local mesh2 = Instance.new("SpecialMesh",Part1)
  858. mesh2.MeshType = Enum.MeshType.Sphere
  859. mesh2.Scale = Vector3.new(0,0,0)
  860. Part1.Material = Enum.Material.Neon
  861. Part1.CanCollide = false
  862. 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)
  863. Part1.Parent = DebrisModel
  864. Part1.Size = Vector3.new(asdf,asdf,asdf)
  865. Part1.Anchored = true
  866. local a = 1.5
  867. Part1.CFrame = CFrame.new(endPoint + Vector3.new(math.random(-2,2)*a,math.random(-4,4),math.random(-2,2)*a))
  868. Part1.Name = "EXPLOSION"
  869. else
  870. local asdf = math.random(0,5)*10
  871. local Part1 = Instance.new("Part")
  872. local mesh2 = Instance.new("SpecialMesh",Part1)
  873. mesh2.MeshType = Enum.MeshType.Sphere
  874. mesh2.Scale = Vector3.new(0,0,0)
  875. Part1.Material = Enum.Material.Neon
  876. Part1.CanCollide = false
  877. Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v)
  878. Part1.Parent = DebrisModel
  879. Part1.Size = Vector3.new(asdf,asdf,asdf)
  880. Part1.Anchored = true
  881. local a = 1.5
  882. Part1.CFrame = CFrame.new(endPoint + Vector3.new(math.random(-2,2)*a,math.random(-4,4),math.random(-2,2)*a))
  883. Part1.Name = "EXPLOSION"
  884. end
  885. end
  886.  
  887. for i,v in pairs(findAllNearestTorso(endPoint,50)) do
  888. if v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth >= 9e+99 then
  889. v:Destroy()
  890. else
  891. v.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth/math.random(120,180))
  892. end
  893. local Position = mouse.Hit.p
  894. local Target = v.Position
  895. local direction = Target - Position
  896. local direction = computeDirection(direction)
  897. local bv = Instance.new("BodyVelocity",v)
  898. bv.Velocity = direction * (10 - ((Position - Target).magnitude/2))
  899. debris:AddItem(bv,1)
  900. end
  901.  
  902. end
  903. clashpart:Destroy()
  904. Part0:Destroy()
  905. wait(0.3)
  906. aiming_anim = false
  907. delay(0.3,function() debounce = false end)
  908. end
  909.  
  910. function nukewelpo()
  911. coroutine.resume(coroutine.create(function()
  912. local magnitude = nil
  913. local Position = nil
  914. if animid == 0 then
  915. Position = larm.Position
  916. else
  917. Position = rarm.Position
  918. end
  919. --sound(743499393,Position,10,math.random(6,8)/10)
  920. sound(440145223,Position,10,math.random(4,5)/10,100)
  921.  
  922. local Part1 = Instance.new("Part")
  923. local mesh2 = Instance.new("SpecialMesh",Part1)
  924. mesh2.MeshId = "rbxassetid://559831844"
  925. mesh2.Scale = Vector3.new(0,0,0.4)
  926. Part1.Material = Enum.Material.Neon
  927. Part1.CanCollide = false
  928. Part1.Color = Color3.fromHSV(0,0,main.v)
  929. Part1.Parent = DebrisModel
  930. Part1.Size = Vector3.new(0,0,0)
  931. Part1.Anchored = true
  932. Part1.CFrame = CFrame.new(Position,mouse.Hit.p)
  933. Part1.Name = "EXPLOSION3"
  934.  
  935. local Part0 = Instance.new("Part",DebrisModel)
  936. local PointLight2 = Instance.new("PointLight")
  937. Part0.Name = "Bullet"
  938. Part0.Material = Enum.Material.Neon
  939. Part0.Color = Color3.fromHSV(0,0,main.v)
  940. Part0.Anchored = false
  941. Part0.Size = Vector3.new(5, 5, 5)
  942. local mesh = Instance.new("SpecialMesh",Part0)
  943. mesh.MeshType = Enum.MeshType.Sphere
  944. mesh.Scale = Vector3.new(3,3,3)
  945. local bforce = Instance.new("BodyForce",Part0)
  946. bforce.force = Vector3.new(0, ((bforce.Parent:getMass())*workspace.Gravity), 0)
  947. Part0.CanCollide = false
  948. PointLight2.Parent = Part0
  949. PointLight2.Color = Part0.Color
  950. local Target = mouse.Hit.p
  951. local direction = Target - Position
  952. local direction = computeDirection(direction)
  953. local pos = Position + (direction * 2)
  954. Part0.CFrame = CFrame.new(pos,  pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0)
  955. Part0.Velocity = direction * 150
  956. local asd = nil
  957. local loop = nil
  958. delay(5, function() Part0:Destroy() loop:disconnect() asd:disconnect() end)
  959. loop = rs:connect(function()
  960. local asdf = math.random(500,1000)/1000
  961. local Part1 = Instance.new("Part")
  962. local mesh2 = Instance.new("SpecialMesh",Part1)
  963. mesh2.MeshType = Enum.MeshType.Sphere
  964. Part1.Material = Enum.Material.Neon
  965. Part1.CanCollide = false
  966. Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v)
  967. Part1.Parent = DebrisModel
  968. Part1.Size = (Part0.Size*3) + Vector3.new(asdf,asdf,asdf)
  969. Part1.Anchored = true
  970. Part1.CFrame = CFrame.new(Part0.Position + Vector3.new(math.random(-3000,3000)/750,math.random(-3000,3000)/750,math.random(-3000,3000)/750))
  971. Part1.Name = "SMOKE"
  972. end)
  973. asd = Part0.Touched:connect(function(ht)
  974. local hit=ht.Parent
  975. if checkIfNotPlayer(ht) == true and ht.CanCollide == true then
  976. asd:disconnect()
  977. loop:disconnect()
  978. Part0:Destroy()
  979.  
  980. sound(explosionid[math.random(1,#explosionid)],Part0.Position,10,math.random(3,5)/10,500)
  981. for i,v in pairs(findAllNearestTorso(Part0.Position,160)) do
  982. if v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth >= 9e+99 then
  983. v:Destroy()
  984. else
  985. v.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth/(math.random(20,30)/10))
  986. end
  987. local Position = Part0.Position
  988. local Target = v.Position
  989. local direction = Target - Position
  990. local direction = computeDirection(direction)
  991. local bv = Instance.new("BodyVelocity",v)
  992. bv.Velocity = direction * (120 - ((Position - Target).magnitude/2))
  993. debris:AddItem(bv,1)
  994. end
  995. for i=1,10,0.5 do for x=1,math.random(0,1) do rs:wait() end
  996. for z=1,math.random(2,3) do
  997. local asdf = math.random(-5,5)*10-(i/20)*12
  998. local Part1 = Instance.new("Part")
  999. local mesh2 = Instance.new("SpecialMesh",Part1)
  1000. mesh2.MeshType = Enum.MeshType.Sphere
  1001. mesh2.Scale = Vector3.new(0,0,0)
  1002. Part1.Material = Enum.Material.Neon
  1003. Part1.CanCollide = false
  1004. Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v)
  1005. Part1.Parent = DebrisModel
  1006. Part1.Size = Vector3.new(asdf,asdf,asdf)
  1007. Part1.Anchored = true
  1008. local a = i*5
  1009. Part1.CFrame = CFrame.new(Part0.Position + Vector3.new(math.random(-2,2)*a,math.random(-30,30),math.random(-2,2)*a))
  1010. Part1.Name = "EXPLOSION4"
  1011. end
  1012. end
  1013.  
  1014. end
  1015. end)
  1016. end))
  1017. end
  1018.  
  1019. holdq = false
  1020. holdr = false
  1021. cooldownult = false
  1022.  
  1023. mouse.KeyDown:connect(function(key)
  1024. if debounce == false then
  1025. if key == "e" then
  1026. dashasdf()
  1027. elseif key == "r" and cooldownult == false then
  1028. cooldownult = true
  1029. if animid == 0 then
  1030. animid = 1
  1031. else
  1032. animid = 0
  1033. end
  1034. debounce = true
  1035. holdr = true
  1036. aiming_anim = true
  1037. wait(0.2)
  1038. repeat
  1039. rs:wait()
  1040. timer = 150
  1041. until holdr == false
  1042. nukewelpo()
  1043.  
  1044. local Position = mouse.Hit.p
  1045. local Target = root.Position
  1046. local direction = Target - Position
  1047. local direction = computeDirection(direction)
  1048. root.Velocity = direction * 300
  1049.  
  1050. aiming_anim = false
  1051. delay(5,function() cooldownult = false end)
  1052. delay(1,function() debounce = false end)
  1053.  
  1054. elseif key == "q" then
  1055. debounce = true
  1056. if animid == 0 then
  1057. animid = 1
  1058. else
  1059. animid = 0
  1060. end
  1061. holdq = true
  1062. attack = true
  1063. aiming_anim = true
  1064. repeat rs:wait() timer = 150 until holdq == false
  1065. laz0r()
  1066. attack = false
  1067. end
  1068. end
  1069. end)
  1070.  
  1071. mouse.KeyUp:connect(function(key)
  1072. if key == "q" then
  1073. holdq = false
  1074. elseif key == "r" then
  1075. holdr = false
  1076. end
  1077. end)
  1078.  
  1079. ----------------------------------------------------------------------------
  1080. music(themeid,themepitch)
  1081. velocityYFall=0
  1082. velocityYFall2=0
  1083. velocityYFall3=0
  1084. velocityYFall4=0
  1085. neckrotY=0
  1086. neckrotY2=0
  1087. torsorotY=0
  1088. torsorotY2=0
  1089. torsoY=0
  1090. torsoY2=0
  1091. sine = 0
  1092. newWeld(torso, larm, -1.5, 0.5, 0)
  1093. larm.Weld.C1 = CFrame.new(0, 0.5, 0)
  1094. newWeld(torso, rarm, 1.5, 0.5, 0)
  1095. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
  1096. newWeld(torso, hed, 0, 1.5, 0)
  1097. newWeld(torso, lleg, -0.5, -1, 0)
  1098. lleg.Weld.C1 = CFrame.new(0, 1, 0)
  1099. newWeld(torso, rleg, 0.5, -1, 0)
  1100. rleg.Weld.C1 = CFrame.new(0, 1, 0)
  1101. newWeld(root, torso, 0, -1, 0)
  1102. torso.Weld.C1 = CFrame.new(0, -1, 0)
  1103.  
  1104. rs:connect(function()
  1105.  
  1106. bg.MaxTorque = Vector3.new(0,0,0)
  1107.  
  1108. for i,v in pairs(DebrisModel:GetChildren()) do
  1109.    
  1110.  
  1111. if v.Name == "EXPLOSION" then
  1112. local change = 0.04-(v.Transparency*0.02)
  1113. local vm = v:FindFirstChildOfClass("SpecialMesh")
  1114. vm.Scale = vm.Scale + Vector3.new(change,change,change)
  1115. v.Transparency = v.Transparency + 0.02
  1116. if v.Transparency >= 1 then
  1117. v:Destroy()
  1118. end
  1119.  
  1120. elseif v.Name == "EXPLOSION2" then
  1121. local change = 0.04-(v.Transparency*0.04)
  1122. local vm = v:FindFirstChildOfClass("SpecialMesh")
  1123. vm.Scale = vm.Scale + Vector3.new(change,change,0)
  1124. v.Transparency = v.Transparency + 0.025
  1125. if v.Transparency >= 1 then
  1126. v:Destroy()
  1127. end
  1128.  
  1129. elseif v.Name == "EXPLOSION3" then
  1130. local change = 0.5-(v.Transparency*0.5)
  1131. local vm = v:FindFirstChildOfClass("SpecialMesh")
  1132. vm.Scale = vm.Scale + Vector3.new(change,change,0)
  1133. v.Transparency = v.Transparency + 0.1
  1134. if v.Transparency >= 1 then
  1135. v:Destroy()
  1136. end
  1137.  
  1138. elseif v.Name == "EXPLOSION4" then
  1139. local change = 0.15-(v.Transparency*0.125)
  1140. local vm = v:FindFirstChildOfClass("SpecialMesh")
  1141. vm.Scale = vm.Scale + Vector3.new(change,change,change)
  1142. v.Transparency = v.Transparency + 0.01
  1143. if v.Transparency >= 1 then
  1144. v:Destroy()
  1145. end
  1146.  
  1147. elseif v.Name == "SMOKE" then
  1148. local vm = v:FindFirstChildOfClass("SpecialMesh")
  1149. vm.Scale = vm.Scale - Vector3.new(0.075,0.075,0.075)
  1150. if vm.Scale.X <= 0 then
  1151. v:Destroy()
  1152. end
  1153.  
  1154. elseif v.Name == "SMOKE2" then
  1155. local change = 2-(v.Transparency*2)
  1156. local vm = v:FindFirstChildOfClass("SpecialMesh")
  1157. local Position = nil
  1158. if animid == 0 then
  1159. Position = larm.Position
  1160. else
  1161. Position = rarm.Position
  1162. end
  1163. local Target = mouse.Hit.p
  1164. local direction = Target - Position
  1165. local direction = computeDirection(direction)
  1166. local ray = Ray.new(Position, (Target-Position).unit*1048)
  1167. local part, endPoint = workspace:FindPartOnRay(ray, char)
  1168. vm.Scale = Vector3.new(vm.Scale.X,(Position-endPoint).magnitude,vm.Scale.Z) + Vector3.new(change,0,change)
  1169. local pos = Position + (direction * (vm.Scale.Y/2))
  1170. v.CFrame = CFrame.new(pos,  pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0)
  1171. vm.Offset = Vector3.new(math.random(-10000,10000)/10000,math.random(-10000,10000)/10000,0)
  1172. v.Transparency = v.Transparency + 0.1
  1173. if v.Transparency >= 1 then
  1174. v:Destroy()
  1175. end
  1176.  
  1177.  
  1178. elseif v.Name == "LIGHTNING" then
  1179. local vm = v:FindFirstChildOfClass("BlockMesh")
  1180. vm.Scale = vm.Scale - Vector3.new(0.1,0.1,0)
  1181. if vm.Scale.X <= 0 then
  1182. v:Destroy()
  1183. end
  1184.  
  1185. end
  1186. end
  1187.  
  1188. if -root.Velocity.Y/1.5 > 0 and -root.Velocity.Y/1.5 < 160 then
  1189. velocityYFall = root.Velocity.Y/1.5
  1190. end
  1191. if -root.Velocity.Y/180 > 0 and -root.Velocity.Y/180 < 1.2 then
  1192. velocityYFall2 = root.Velocity.Y/180
  1193. end
  1194. if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 50 then
  1195. velocityYFall3 = root.Velocity.Y/1.5
  1196. end
  1197. if -root.Velocity.Y/1.5 > -50 and -root.Velocity.Y/1.5 < 20 then
  1198. velocityYFall4 = root.Velocity.Y/1.5
  1199. end
  1200. if root.RotVelocity.Y/6 < 1 and root.RotVelocity.Y/6 > -1 then
  1201. neckrotY = root.RotVelocity.Y/6
  1202. end
  1203. if root.RotVelocity.Y/8 < 0.6 and root.RotVelocity.Y/8 > -0.6 then
  1204. neckrotY2 = root.RotVelocity.Y/8
  1205. end
  1206.  
  1207. if root.RotVelocity.Y/6 < 0.2 and root.RotVelocity.Y/6 > -0.2 then
  1208. torsorotY = root.RotVelocity.Y/6
  1209. end
  1210. if root.RotVelocity.Y/8 < 0.2 and root.RotVelocity.Y/8 > -0.2 then
  1211. torsorotY2 = root.RotVelocity.Y/8
  1212. end
  1213.  
  1214.  
  1215. torsoY = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/20
  1216. torsoY2 = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/36
  1217.  
  1218. if attack == true then
  1219. hum.WalkSpeed = 1
  1220. else
  1221. hum.WalkSpeed = 8
  1222. end
  1223.  
  1224. if canjump == true then
  1225. hum.JumpPower = 50
  1226. else
  1227. hum.JumpPower = 0
  1228. end
  1229.  
  1230. local jumped = false
  1231. local ray1 = Ray.new(root.Position+Vector3.new(1,0,0),Vector3.new(0, -6, 0))
  1232. local part1, endPoint = workspace:FindPartOnRay(ray1, char)
  1233. local ray2 = Ray.new(root.Position-Vector3.new(1,0,0),Vector3.new(0, -6, 0))
  1234. local part2, endPoint = workspace:FindPartOnRay(ray2, char)
  1235. local ray3 = Ray.new(root.Position+Vector3.new(0,0,0.5),Vector3.new(0, -6, 0))
  1236. local part3, endPoint = workspace:FindPartOnRay(ray3, char)
  1237. local ray4 = Ray.new(root.Position-Vector3.new(0,0,0.5),Vector3.new(0, -6, 0))
  1238. local part4, endPoint = workspace:FindPartOnRay(ray4, char)
  1239.  
  1240. if part1 or part2 or part3 or part4 then jumped = false else endPoint = 0 jumped = true end
  1241.  
  1242. local rlegray = Ray.new(rleg.Position+Vector3.new(0,0.5,0),Vector3.new(0, -1.75, 0))
  1243. local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, char)
  1244.  
  1245. local llegray = Ray.new(lleg.Position+Vector3.new(0,0.5,0),Vector3.new(0, -1.75, 0))
  1246. local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, char)
  1247.  
  1248. if no_anim == false then
  1249. if hum.Health > 0 then
  1250. if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude >= 5 and jumped == false then
  1251. 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)
  1252. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(math.rad(-10),0,0),0.1)
  1253. 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)
  1254. 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)
  1255. 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)
  1256. 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)
  1257. 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)
  1258. elseif jumped == true then
  1259. 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)
  1260. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0,0,0),0.1)
  1261. 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)
  1262. 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)
  1263. 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)
  1264. 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)
  1265. 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)
  1266. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 5 then
  1267. 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)
  1268. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(math.rad(-15),0,0),0.1)
  1269. 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)
  1270. 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)
  1271. 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)
  1272. 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)
  1273. 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)
  1274. end
  1275. for i=1,5 do
  1276. if aiming_anim == true then
  1277. bg.MaxTorque = Vector3.new(9e9,9e9,9e9)
  1278. if jumped == false then
  1279. bg.CFrame = CFrame.new(root.Position,Vector3.new(mouse.Hit.x,root.Position.Y,mouse.Hit.z))
  1280. else
  1281. bg.CFrame = CFrame.new(root.Position,mouse.Hit.p)
  1282. end
  1283. if animid == 0 then
  1284. hed.Weld.C1 =  Lerp(hed.Weld.C1,CFrame.Angles(0,math.rad(-80),0),0.4)
  1285. 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)
  1286. 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)
  1287. else
  1288. hed.Weld.C1 =  Lerp(hed.Weld.C1,CFrame.Angles(0,math.rad(80),0),0.4)
  1289. 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)
  1290. 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)
  1291. end
  1292. else
  1293. if timer <= 0 then
  1294. animid = math.random(0,1)
  1295. else
  1296. timer = timer - 1
  1297. end
  1298. end
  1299. end
  1300. end
  1301. end
  1302. main_color = Color3.fromRGB(main.r,main.g,main.b)
  1303. pr.Value = main.r
  1304. pg.Value = main.g
  1305. pb.Value = main.b
  1306. pv.Value = main.v
  1307. idth.Value = themeid
  1308. pith.Value = themepitch
  1309. HName.TextStrokeColor3 = Color3.fromHSV(Color3.toHSV(main_color),1,main.v/2)
  1310. HName.TextColor3 = Color3.fromHSV(Color3.toHSV(main_color),1,main.v)
  1311. sine = sine + change
  1312. if hum.Health <= 0 then
  1313. debounce = true
  1314. end
  1315. end)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top