SHOW:
|
|
- or go back to the newest paste.
| 1 | -- woah | |
| 2 | ||
| 3 | -- Created by Nebula_Zorua | |
| 4 | -- Click to attack | |
| 5 | -- Uses skybox's sun | |
| 6 | ||
| 7 | wait() | |
| 8 | script.Parent = nil | |
| 9 | ||
| 10 | - | local me = game:service'Players'.localPlayer; |
| 10 | + | |
| 11 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
| |
| 12 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
| 13 | local RealPlayer = Player | |
| 14 | do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
| |
| 15 | ||
| 16 | local me = owner | |
| 17 | local mouse = me:GetMouse() | |
| 18 | ||
| 19 | local I = Instance.new | |
| 20 | function IT(instance,parent,properties) | |
| 21 | local inst = I(instance) | |
| 22 | for i,v in next, properties do | |
| 23 | pcall(function() inst[v[1]] = v[2] end) | |
| 24 | end | |
| 25 | inst.Parent = parent | |
| 26 | return inst | |
| 27 | end | |
| 28 | ||
| 29 | function PARTANDMESH(parent,brickcolor,material,anchored,cancollide,locked,size,cframe,meshid,textureid,scale,partProps,meshProps) | |
| 30 | local part = IT("Part",parent or me.Character,{{"TopSurface",10},{"BottomSurface",10},{"BrickColor",brickcolor},{"Anchored",anchored},{"CanCollide",cancollide},{"Locked",locked},{"Material",material}, {"Size",size},{"CFrame",cframe}})
| |
| 31 | local mesh = IT("SpecialMesh",part,{{"MeshId",meshid},{"TextureId",textureid},{"Scale",scale}})
| |
| 32 | for i,v in next, partProps do | |
| 33 | pcall(function() part[i] = v end) | |
| 34 | end | |
| 35 | for i,v in next, meshProps do | |
| 36 | pcall(function() mesh[i] = v end) | |
| 37 | end | |
| 38 | return part,mesh | |
| 39 | end | |
| 40 | local RANDOM = math.random | |
| 41 | ||
| 42 | function PART(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
| 43 | local NEWPART = IT("Part",PARENT,{})
| |
| 44 | NEWPART.formFactor = FORMFACTOR | |
| 45 | NEWPART.Reflectance = REFLECTANCE | |
| 46 | NEWPART.Transparency = TRANSPARENCY | |
| 47 | NEWPART.CanCollide = false | |
| 48 | NEWPART.Locked = true | |
| 49 | NEWPART.Anchored = true | |
| 50 | if ANCHOR == false then | |
| 51 | NEWPART.Anchored = false | |
| 52 | end | |
| 53 | NEWPART.BrickColor = BrickColor.new(tostring(BRICKCOLOR)) | |
| 54 | NEWPART.Name = NAME | |
| 55 | NEWPART.Size = SIZE | |
| 56 | NEWPART.Position = me.Character.Torso.CFrame.p | |
| 57 | NEWPART.Material = MATERIAL | |
| 58 | NEWPART:BreakJoints() | |
| 59 | return NEWPART | |
| 60 | end | |
| 61 | ||
| 62 | function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR) -- thanks shack BB | |
| 63 | local STATPART = PART(3, me.Character, "SmoothPlastic", 0, 1, "Really black", "Effect", Vector3.new()) | |
| 64 | STATPART.CFrame = CFrame.new(CFRAME.p + Vector3.new(0, 1.5, 0)) | |
| 65 | local BODYGYRO = IT("BodyGyro", STATPART,{})
| |
| 66 | local BODYPOSITION = IT("BodyPosition", STATPART,{})
| |
| 67 | BODYPOSITION.P = 2000 | |
| 68 | BODYPOSITION.D = 100 | |
| 69 | BODYPOSITION.maxForce = Vector3.new(math.huge, math.huge, math.huge) | |
| 70 | if LABELTYPE == "Normal" then | |
| 71 | BODYPOSITION.position = STATPART.Position + Vector3.new(RANDOM(-2, 2), 6, RANDOM(-2, 2)) | |
| 72 | elseif LABELTYPE == "Debuff" then | |
| 73 | BODYPOSITION.position = STATPART.Position + Vector3.new(RANDOM(-2, 2), 8, RANDOM(-2, 2)) | |
| 74 | elseif LABELTYPE == "Interruption" then | |
| 75 | BODYPOSITION.position = STATPART.Position + Vector3.new(RANDOM(-2,2), 8, RANDOM(-2, 2)) | |
| 76 | end | |
| 77 | game:GetService("Debris"):AddItem(STATPART ,5)
| |
| 78 | local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
| |
| 79 | BILLBOARDGUI.Adornee = STATPART | |
| 80 | BILLBOARDGUI.Size = UDim2.new(2.5, 0, 2.5 ,0) | |
| 81 | BILLBOARDGUI.StudsOffset = Vector3.new(-2, 2, 0) | |
| 82 | BILLBOARDGUI.AlwaysOnTop = false | |
| 83 | local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
| |
| 84 | TEXTLABEL.BackgroundTransparency = 1 | |
| 85 | TEXTLABEL.Size = UDim2.new(2.5, 0, 2.5, 0) | |
| 86 | TEXTLABEL.Text = TEXT | |
| 87 | TEXTLABEL.Font = "SciFi" | |
| 88 | TEXTLABEL.FontSize="Size42" | |
| 89 | TEXTLABEL.TextColor3 = COLOR | |
| 90 | TEXTLABEL.TextStrokeTransparency = 1 | |
| 91 | TEXTLABEL.TextScaled = true | |
| 92 | TEXTLABEL.TextWrapped = true | |
| 93 | coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL) | |
| 94 | wait(0.2) | |
| 95 | for i=1, 5 do | |
| 96 | wait() | |
| 97 | THEBODYPOSITION.Position = THEPART.Position - Vector3.new(0, 0.5 ,0) | |
| 98 | end | |
| 99 | wait(1.2) | |
| 100 | for i=1, 5 do | |
| 101 | wait() | |
| 102 | THETEXTLABEL.TextTransparency = THETEXTLABEL.TextTransparency + 0.2 | |
| 103 | THETEXTLABEL.TextStrokeTransparency = THETEXTLABEL.TextStrokeTransparency + 0.2 | |
| 104 | THEBODYPOSITION.position = THEPART.Position + Vector3.new(0, 0.5, 0) | |
| 105 | end | |
| 106 | THEPART.Parent = nil | |
| 107 | end),STATPART, BODYPOSITION, TEXTLABEL) | |
| 108 | end | |
| 109 | ||
| 110 | function GETREGION(point,range,ignore) | |
| 111 | return workspace:FindPartsInRegion3WithIgnoreList(Region3.new(point-Vector3.new(1,1,1)*range/2,point+Vector3.new(1,1,1)*range/2),ignore,250) | |
| 112 | end | |
| 113 | ||
| 114 | ||
| 115 | function AoEDAMAGE(pos,rad,min,max,avoidbyjump,critRate,critMult,kill) | |
| 116 | local dmg = RANDOM(min,max) | |
| 117 | local R3 = GETREGION(pos,rad,{me.Character})
| |
| 118 | local Hit = {}
| |
| 119 | for _,v in next, R3 do | |
| 120 | local h = (v and v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil) | |
| 121 | if(h and not Hit[h])then | |
| 122 | Hit[h] = true | |
| 123 | if(v.Parent:FindFirstChild'Head' and v.Parent.Head:IsA'BasePart' and v.Parent.Name ~= 'CKbackup' and v.Parent.Name ~= 'Nebula_Zorua' and v.Parent.Name ~= 'Salvo_Starly')then | |
| 124 | ||
| 125 | local hed = v.Parent.Head | |
| 126 | local crit = RANDOM(1,100) | |
| 127 | local dmgText = (crit <= critRate and "? - "..dmg*critMult or " - "..dmg) | |
| 128 | ||
| 129 | if(kill)then | |
| 130 | dmgText = "INSTANT" | |
| 131 | v.Parent:breakJoints() | |
| 132 | end | |
| 133 | if(not avoidbyjump or hed.CFrame.y <= pos.y+3)then | |
| 134 | if(crit <= critRate)then | |
| 135 | --dmg*critMult | |
| 136 | h.Health = h.Health - dmg*critMult | |
| 137 | else | |
| 138 | h.Health = h.Health - dmg | |
| 139 | end | |
| 140 | StatLabel('Normal',hed.CFrame * CFrame.new(0, 0 + hed.Size.z - 1, 0),dmgText,(dmgText:find"?" and BrickColor.new'New Yeller' or dmgText == "INSTANT" and BrickColor.new'Really red' or BrickColor.new'Navy blue').Color)
| |
| 141 | end | |
| 142 | end | |
| 143 | end | |
| 144 | end | |
| 145 | end | |
| 146 | ||
| 147 | ||
| 148 | ||
| 149 | function SOUND(id,parent,pitch,volume,looped) | |
| 150 | local SOUND = I("Sound")
| |
| 151 | SOUND.SoundId = id; | |
| 152 | SOUND.Parent = parent | |
| 153 | SOUND.Pitch = pitch or 1 | |
| 154 | SOUND.Looped = looped or false | |
| 155 | SOUND.Volume = volume or 1 | |
| 156 | return SOUND; | |
| 157 | end | |
| 158 | ||
| 159 | ||
| 160 | function FX(id,parent,pitch,volume) | |
| 161 | return coroutine.wrap(function() | |
| 162 | local FX = SOUND(id,parent,pitch,volume) | |
| 163 | FX:Play() | |
| 164 | repeat wait() until FX.IsLoaded | |
| 165 | game:service'Debris':AddItem(FX,FX.TimeLength+1) | |
| 166 | end)() | |
| 167 | ||
| 168 | end | |
| 169 | ||
| 170 | warn"Can we go on land?" | |
| 171 | warn"No." | |
| 172 | warn"Why?" | |
| 173 | warn"The sun is a deadly lazer" | |
| 174 | ||
| 175 | ||
| 176 | mouse.Button1Down:connect(function() | |
| 177 | FX("rbxassetid://811841430",workspace,1,10)
| |
| 178 | local beam = I("Part",workspace)
| |
| 179 | beam.TopSurface,beam.BottomSurface,beam.Size,beam.Anchored,beam.CanCollide,beam.Archivable = 10,10,Vector3.new(1,1,1),true,false,false | |
| 180 | beam.Material,beam.BrickColor = Enum.Material.Neon,BrickColor.new'New Yeller' | |
| 181 | local look = CFrame.new(Vector3.new(),game:service'Lighting':GetSunDirection()) | |
| 182 | local kthx = IT("Part",nil,{
| |
| 183 | {'Transparency',1},{'CanCollide',false},{'Anchored',true},{'Position',mouse.Hit.p}
| |
| 184 | }) | |
| 185 | local mesh = I("BlockMesh",beam)
| |
| 186 | mesh.Scale = Vector3.new(5,5,1e4) | |
| 187 | local explosion,explosionMesh = PARTANDMESH(workspace,BrickColor.new'New Yeller',"Neon",true,false,true,Vector3.new(1,1,1),mouse.Hit,"","",Vector3.new(5,5,5),{},{MeshType=Enum.MeshType.Sphere})
| |
| 188 | AoEDAMAGE(explosion.CFrame.p,25,1e25,1e25,false,100,2,true) | |
| 189 | for trans = 0, 1, .05 do | |
| 190 | explosion.Transparency = trans | |
| 191 | explosionMesh.Scale = explosionMesh.Scale + Vector3.new(2,2,2) | |
| 192 | beam.CFrame = CFrame.new(kthx.Position) * look * CFrame.new(0,0,-5000) | |
| 193 | mesh.Scale = Vector3.new(5-(trans/1)*5,5-(trans/1)*5,1e4) | |
| 194 | beam.Transparency = beam.Transparency + 0.035 | |
| 195 | wait() | |
| 196 | end | |
| 197 | beam:destroy() | |
| 198 | explosion:destroy() | |
| 199 | end) | |
| 200 | ||
| 201 | if(game:service'Players'.localPlayer.UserId == 201729767)then | |
| 202 | while true do | |
| 203 | coroutine.wrap(function() | |
| 204 | for i = 1, 50 do | |
| 205 | warn("hi abuser bb")
| |
| 206 | end | |
| 207 | end)() | |
| 208 | wait() | |
| 209 | end | |
| 210 | end |