SHOW:
|
|
- or go back to the newest paste.
| 1 | --https://github.com/Mokiros/roblox-FE-compatibility | |
| 2 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
| |
| 3 | local Player,game,owner = owner,game | |
| 4 | local RealPlayer = Player | |
| 5 | do | |
| 6 | print("FE Compatibility code V2 by Mokiros")
| |
| 7 | local RealPlayer = RealPlayer | |
| 8 | script.Parent = RealPlayer.Character | |
| 9 | ||
| 10 | --Fake event to make stuff like Mouse.KeyDown work | |
| 11 | local Disconnect_Function = function(this) | |
| 12 | this[1].Functions[this[2]] = nil | |
| 13 | end | |
| 14 | local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
| |
| 15 | local FakeEvent_Metatable = {__index={
| |
| 16 | Connect = function(this,f) | |
| 17 | local i = tostring(math.random(0,10000)) | |
| 18 | while this.Functions[i] do | |
| 19 | i = tostring(math.random(0,10000)) | |
| 20 | end | |
| 21 | this.Functions[i] = f | |
| 22 | return setmetatable({this,i},Disconnect_Metatable)
| |
| 23 | end | |
| 24 | }} | |
| 25 | FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect | |
| 26 | local function fakeEvent() | |
| 27 | return setmetatable({Functions={}},FakeEvent_Metatable)
| |
| 28 | end | |
| 29 | ||
| 30 | --Creating fake input objects with fake variables | |
| 31 | local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
| |
| 32 | FakeMouse.keyUp = FakeMouse.KeyUp | |
| 33 | FakeMouse.keyDown = FakeMouse.KeyDown | |
| 34 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 35 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
| |
| 36 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
| |
| 37 | end} | |
| 38 | --Merged 2 functions into one by checking amount of arguments | |
| 39 | CAS.UnbindAction = CAS.BindAction | |
| 40 | ||
| 41 | --This function will trigger the events that have been :Connect()'ed | |
| 42 | local function TriggerEvent(self,ev,...) | |
| 43 | for _,f in pairs(self[ev].Functions) do | |
| 44 | f(...) | |
| 45 | end | |
| 46 | end | |
| 47 | FakeMouse.TriggerEvent = TriggerEvent | |
| 48 | UIS.TriggerEvent = TriggerEvent | |
| 49 | ||
| 50 | --Client communication | |
| 51 | local Event = Instance.new("RemoteEvent")
| |
| 52 | Event.Name = "UserInput_Event" | |
| 53 | Event.OnServerEvent:Connect(function(plr,io) | |
| 54 | if plr~=RealPlayer then return end | |
| 55 | FakeMouse.Target = io.Target | |
| 56 | FakeMouse.Hit = io.Hit | |
| 57 | if not io.isMouse then | |
| 58 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 59 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 60 | return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up") | |
| 61 | end | |
| 62 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
| 63 | return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up") | |
| 64 | end | |
| 65 | for _,t in pairs(CAS.Actions) do | |
| 66 | for _,k in pairs(t.Keys) do | |
| 67 | if k==io.KeyCode then | |
| 68 | t.Function(t.Name,io.UserInputState,io) | |
| 69 | end | |
| 70 | end | |
| 71 | end | |
| 72 | FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
| 73 | UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false) | |
| 74 | end | |
| 75 | end) | |
| 76 | Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
| |
| 77 | local Mouse = owner:GetMouse() | |
| 78 | local UIS = game:GetService("UserInputService")
| |
| 79 | local input = function(io,RobloxHandled) | |
| 80 | if RobloxHandled then return end | |
| 81 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 82 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
| |
| 83 | end | |
| 84 | UIS.InputBegan:Connect(input) | |
| 85 | UIS.InputEnded:Connect(input) | |
| 86 | ||
| 87 | local h,t | |
| 88 | --Give the server mouse data every second frame, but only if the values changed | |
| 89 | --If player is not moving their mouse, client won't fire events | |
| 90 | local HB = game:GetService("RunService").Heartbeat
| |
| 91 | while true do | |
| 92 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 93 | h,t=Mouse.Hit,Mouse.Target | |
| 94 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 95 | end | |
| 96 | --Wait 2 frames | |
| 97 | for i=1,2 do | |
| 98 | HB:Wait() | |
| 99 | end | |
| 100 | end]==],script) | |
| 101 | ||
| 102 | ----Sandboxed game object that allows the usage of client-side methods and services | |
| 103 | --Real game object | |
| 104 | local RealGame = game | |
| 105 | ||
| 106 | --Metatable for fake service | |
| 107 | local FakeService_Metatable = {
| |
| 108 | __index = function(self,k) | |
| 109 | local s = rawget(self,"_RealService") | |
| 110 | if s then | |
| 111 | return typeof(s[k])=="function" | |
| 112 | and function(_,...)return s[k](s,...)end or s[k] | |
| 113 | end | |
| 114 | end, | |
| 115 | __newindex = function(self,k,v) | |
| 116 | local s = rawget(self,"_RealService") | |
| 117 | if s then s[k]=v end | |
| 118 | end | |
| 119 | } | |
| 120 | local function FakeService(t,RealService) | |
| 121 | t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService | |
| 122 | return setmetatable(t,FakeService_Metatable) | |
| 123 | end | |
| 124 | ||
| 125 | --Fake game object | |
| 126 | local FakeGame = {
| |
| 127 | GetService = function(self,s) | |
| 128 | return rawget(self,s) or RealGame:GetService(s) | |
| 129 | end, | |
| 130 | Players = FakeService({
| |
| 131 | LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
| |
| 132 | },"Players"), | |
| 133 | UserInputService = FakeService(UIS,"UserInputService"), | |
| 134 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
| 135 | RunService = FakeService({
| |
| 136 | _btrs = {},
| |
| 137 | RenderStepped = RealGame:GetService("RunService").Heartbeat,
| |
| 138 | BindToRenderStep = function(self,name,_,fun) | |
| 139 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
| 140 | end, | |
| 141 | UnbindFromRenderStep = function(self,name) | |
| 142 | self._btrs[name]:Disconnect() | |
| 143 | end, | |
| 144 | },"RunService") | |
| 145 | } | |
| 146 | rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer) | |
| 147 | FakeGame.service = FakeGame.GetService | |
| 148 | FakeService(FakeGame,game) | |
| 149 | --Changing owner to fake player object to support owner:GetMouse() | |
| 150 | game,owner = FakeGame,FakeGame.Players.LocalPlayer | |
| 151 | end | |
| 152 | repeat game:GetService('RunService').Stepped:wait() until game:GetService('Players').LocalPlayer.Character
| |
| 153 | ---- | |
| 154 | ---- | |
| 155 | sit = true | |
| 156 | cn = CFrame.new | |
| 157 | v3 = Vector3.new | |
| 158 | c3 = Color3.new | |
| 159 | bn = BrickColor.new | |
| 160 | ca2 = CFrame.Angles | |
| 161 | ca = function(x,y,z) return ca2(math.rad(x),math.rad(y),math.rad(z)) end | |
| 162 | ud2 = UDim2.new | |
| 163 | ---- | |
| 164 | ---- | |
| 165 | local Player = game:GetService('Players').LocalPlayer
| |
| 166 | local Char = Player.Character | |
| 167 | local Human = Char.Humanoid | |
| 168 | local Mouse = Player:GetMouse() | |
| 169 | ---- | |
| 170 | ---- | |
| 171 | Human.WalkSpeed = 0 | |
| 172 | print ('Loading...')
| |
| 173 | wait(.5) | |
| 174 | ---- | |
| 175 | ---- | |
| 176 | la = Char['Left Arm'] | |
| 177 | ra = Char['Right Arm'] | |
| 178 | ll = Char['Left Leg'] | |
| 179 | rl = Char['Right Leg'] | |
| 180 | tr = Char['Torso'] | |
| 181 | hd = Char['Head'] | |
| 182 | rp = Char['HumanoidRootPart'] | |
| 183 | ---- | |
| 184 | ---- | |
| 185 | ram = tr['Right Shoulder'] | |
| 186 | lam = tr['Left Shoulder'] | |
| 187 | llm = tr['Left Hip'] | |
| 188 | rlm = tr['Right Hip'] | |
| 189 | hm = tr['Neck'] | |
| 190 | rj = rp['RootJoint'] | |
| 191 | ---- | |
| 192 | ---- | |
| 193 | InputService = game:GetService('UserInputService')
| |
| 194 | RunService = game:GetService('RunService')
| |
| 195 | ---- | |
| 196 | ---- | |
| 197 | LastMade = nil | |
| 198 | ||
| 199 | xNew=function(Table) | |
| 200 | local Obj=Instance.new(Table[1]) | |
| 201 | for Ind,Val in pairs(Table) do | |
| 202 | if Ind~=1 and Ind~=2 then | |
| 203 | Obj[Ind] = Val | |
| 204 | end | |
| 205 | end | |
| 206 | Obj.Parent=Table[2] | |
| 207 | LastMade= Obj | |
| 208 | return Obj | |
| 209 | end | |
| 210 | ||
| 211 | xPart=function(tab) | |
| 212 | local v=Instance.new(tab.type or "Part") | |
| 213 | if tab.type~="CornerWedgePart" then v.formFactor="Custom" end | |
| 214 | v.CanCollide=false | |
| 215 | v.TopSurface=10 v.BottomSurface=10 v.RightSurface=10 v.LeftSurface=10 v.FrontSurface=10 v.BackSurface=10 | |
| 216 | v.Size=v3(tab[2],tab[3],tab[4]) | |
| 217 | if tab.co then v.BrickColor=bn(tab.co) end | |
| 218 | if tab.tr then v.Transparency=tab.tr end | |
| 219 | if tab.rf then v.Reflectance=tab.rf end | |
| 220 | if tab.cf then v.CFrame=tab.cf end | |
| 221 | if tab.an then v.Anchored=tab.an end | |
| 222 | if tab.mt then v.Material=tab.mt end | |
| 223 | if tab.ca then v.CanCollide=tab.ca end | |
| 224 | v.Parent=tab[1] | |
| 225 | LastMade= v | |
| 226 | return v | |
| 227 | end | |
| 228 | ||
| 229 | xWeld = function(a,b,between,type) | |
| 230 | local Weld = xNew{type or 'Weld',a,Part0 = a,Part1 = b, C0 = cn()}
| |
| 231 | if between then | |
| 232 | Weld.C1 = b.CFrame:inverse() * a.CFrame | |
| 233 | else | |
| 234 | Weld.C1 = cn() | |
| 235 | end | |
| 236 | return Weld | |
| 237 | end | |
| 238 | ||
| 239 | function xSound(id,parent,pitch) | |
| 240 | local s = xNew{'Sound', PlayOnRemove = true, SoundId = 'http://roblox.com/asset/?id='..id,Pitch = pitch}
| |
| 241 | s.Parent = parent | |
| 242 | s:Destroy() | |
| 243 | end | |
| 244 | ||
| 245 | ---- | |
| 246 | ---- | |
| 247 | do local function QuaternionFromCFrame(cf) local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() local trace = m00 + m11 + m22 if trace > 0 then local s = math.sqrt(1 + trace) local recip = 0.5/s return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 else local i = 0 if m11 > m00 then i = 1 end if m22 > (i == 0 and m00 or m11) then i = 2 end if i == 0 then local s = math.sqrt(m00-m11-m22+1) local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip elseif i == 1 then local s = math.sqrt(m11-m22-m00+1) local recip = 0.5/s return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip elseif i == 2 then local s = math.sqrt(m22-m00-m11+1) local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip end end end local function QuaternionToCFrame(px, py, pz, x, y, z, w) local xs, ys, zs = x + x, y + y, z + z local wx, wy, wz = w*xs, w*ys, w*zs local xx = x*xs local xy = x*ys local xz = x*zs local yy = y*ys local yz = y*zs local zz = z*zs return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) end local function QuaternionSlerp(a, b, t) local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] local startInterp, finishInterp; if cosTheta >= 0.0001 then if (1 - cosTheta) > 0.0001 then local theta = math.acos(cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((1-t)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = 1-t finishInterp = t end else if (1+cosTheta) > 0.0001 then local theta = math.acos(-cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((t-1)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = t-1 finishInterp = t end end return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp end function clerp(a,b,t) local qa = {QuaternionFromCFrame(a)} local qb = {QuaternionFromCFrame(b)} local ax, ay, az = a.x, a.y, a.z local bx, by, bz = b.x, b.y, b.z local _t = 1-t return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) end end
| |
| 248 | function xlerp(weld,to,tim) | |
| 249 | if weld.C1 ~= to then | |
| 250 | --weld.C1 = clerp(weld.C1,to,tim) | |
| 251 | weld.C1 = weld.C1:lerp(to,tim) | |
| 252 | end | |
| 253 | end | |
| 254 | function lerp(a,b,c)return a+(b-a)*c end | |
| 255 | ---- | |
| 256 | ---- | |
| 257 | Char.Health:Destroy() | |
| 258 | wait(.25) | |
| 259 | ---- | |
| 260 | ra.Size = ra.Size * 3 | |
| 261 | la.Size = la.Size * 3 | |
| 262 | ll.Size = ll.Size * 3 | |
| 263 | rl.Size = rl.Size * 3 | |
| 264 | tr.Size = tr.Size * 3 | |
| 265 | hd.Size = hd.Size * 3 | |
| 266 | rp.Size = rp.Size * 3 | |
| 267 | -- | |
| 268 | local tw = xWeld(rp,tr) | |
| 269 | tw.C1 = cn(0,0,0) | |
| 270 | local law = xWeld(tr,la) | |
| 271 | law.C0 = cn(-4.5,.5,0) | |
| 272 | law.C1 = cn(0,.5,0) | |
| 273 | local raw = xWeld(tr,ra) | |
| 274 | raw.C0 = cn(4.5,.5,0) | |
| 275 | raw.C1 = cn(0,.5,0) | |
| 276 | local llw = xWeld(tr,ll) | |
| 277 | llw.C0 = cn(-1.5,-5,0) | |
| 278 | llw.C1 = cn(0,1,0) | |
| 279 | local rlw = xWeld(tr,rl) | |
| 280 | rlw.C0 = cn(1.5,-5,0) | |
| 281 | rlw.C1 = cn(0,1,0) | |
| 282 | local hw = xWeld(tr,hd) | |
| 283 | hw.C1 = cn(0,-4.5,0) | |
| 284 | ras = raw.C1 | |
| 285 | las = law.C1 | |
| 286 | lls = llw.C1 | |
| 287 | rls = rlw.C1 | |
| 288 | ts = tw.C1 | |
| 289 | hs = hw.C1 | |
| 290 | ----- | |
| 291 | for _,Part in pairs(Char:GetChildren()) do | |
| 292 | if Part:IsA('BasePart') then
| |
| 293 | Part.CustomPhysicalProperties = PhysicalProperties.new(0, .3, .5) | |
| 294 | end | |
| 295 | end | |
| 296 | -------------------------------------------------------- | |
| 297 | -------------------------------------------------------- | |
| 298 | -----------------------CONSTANTS------------------------ | |
| 299 | -------------------------------------------------------- | |
| 300 | -------------------------------------------------------- | |
| 301 | REGEN_SPEED = 0 | |
| 302 | WEAPON_NAME = 'Grandark' | |
| 303 | ---------------------------------------------------- | |
| 304 | ---------------------------------------------------- | |
| 305 | -----------------------MODEL------------------------ | |
| 306 | ---------------------------------------------------- | |
| 307 | ---------------------------------------------------- | |
| 308 | local Handle | |
| 309 | local Blade | |
| 310 | local haw | |
| 311 | Pack = Instance.new('Model', Char)
| |
| 312 | Pack.Name = WEAPON_NAME | |
| 313 | do | |
| 314 | Handle = xPart{Pack,0.54285717, 4.96428585, 1.02857149} Handle.BrickColor = BrickColor.new('Black') Handle.Material = Enum.Material.Plastic; haw = xWeld(ra,Handle); LastMade.C1 = ca(90,0,180)*cn(0,3,0) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 315 | xNew{'BlockMesh',Handle,Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 316 | local Part = xPart{Pack,0.285714328, 0.949999154, 1.8714298} Part.BrickColor = BrickColor.new('Smoky grey') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, -3.22142696, 1.4642868, -1, 0, -5.96046377e-008, 0, 1, 0, 5.96046377e-008, 0, -1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 317 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 318 | local Part = xPart{Pack,0.521428645, 0.1, 4.92857265} Part.BrickColor = BrickColor.new('Really black') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, -2.59285641, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 319 | xNew{'BlockMesh',Part,Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 320 | local Part = xPart{Pack,0.864285767, 0.221428677, 5.65714407} Part.BrickColor = BrickColor.new('Dark orange') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, -2.57142735, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 321 | xNew{'BlockMesh',Part,Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 322 | local Part = xPart{Pack,0.54285717, 1.01428556, 1.02857149} Part.BrickColor = BrickColor.new('Really red') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, -1.4428587, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 323 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.FileMesh, MeshId = 'http://www.roblox.com/Asset/?id=9756362', TextureId = '', Scale = v3(0.714285731, 1.42857146, 0.714285731), Offset = v3(0, 0, 0)}
| |
| 324 | local Part = xPart{Pack,0.54285717, 0.657142878, 1.02857149} Part.BrickColor = BrickColor.new('Dark orange') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, 2.81071377, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 325 | xNew{'BlockMesh',Part,Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 326 | local Part = xPart{Pack,0.54285717, 0.657142937, 1.02857149} Part.BrickColor = BrickColor.new('Dark orange') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, 2.81071377, 1.02857018, 1, 0, 0, 0, 1, 0, 0, 0, 1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 327 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 328 | local Part = xPart{Pack,0.54285717, 0.657142937, 1.02857149} Part.BrickColor = BrickColor.new('Dark orange') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, 2.81071377, 1.02857208, -1, 0, 8.74227695e-008, 0, 1, 0, -8.74227695e-008, 0, -1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 329 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 330 | local Part = xPart{Pack,0.54285717, 1.11428583, 0.371428579} Part.BrickColor = BrickColor.new('Dark orange') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, 2.23928523, 0.699998856, 1, -8.74227695e-008, 8.74227837e-008, 8.74227766e-008, 1, -8.74227695e-008, -8.74227766e-008, 8.74227766e-008, 1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 331 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 332 | local Part = xPart{Pack,0.54285717, 1.11428583, 0.371428579} Part.BrickColor = BrickColor.new('Dark orange') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, 2.23928547, 0.700000763, -1, 8.74227695e-008, 8.74227837e-008, 8.74227766e-008, 1, 8.74227695e-008, -8.74227695e-008, 8.74227766e-008, -1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 333 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 334 | local Part = xPart{Pack,0.342857182, 0.585714281, 0.514285684} Part.BrickColor = BrickColor.new('Really red') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(2.91071415, 0, 0.257143021, -5.96046377e-008, 1, 1.49781926e-007, -1, -5.96046306e-008, -3.92309403e-008, -3.92309296e-008, -1.49781926e-007, 1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 335 | xNew{'CylinderMesh',Part,Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 336 | local Part = xPart{Pack,0.342857182, 0.585714281, 0.514285684} Part.BrickColor = BrickColor.new('Really red') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(2.91071415, 0, -0.257143021, -5.96046377e-008, 1, 1.49781926e-007, -1, -5.96046306e-008, -3.92309403e-008, -3.92309296e-008, -1.49781926e-007, 1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 337 | xNew{'CylinderMesh',Part,Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 338 | local Part = xPart{Pack,0.564285755, 0.257142901, 0.514285743} Part.BrickColor = BrickColor.new('Dark orange') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, 2.35357094, 0.257143021, -1, 8.74227695e-008, 8.74227837e-008, 8.74227766e-008, 1, 8.74227695e-008, -8.74227695e-008, 8.74227766e-008, -1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 339 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 340 | local Part = xPart{Pack,0.564285755, 0.257142901, 0.514285743} Part.BrickColor = BrickColor.new('Dark orange') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, 2.35357118, 0.257141113, 1, 3.51124925e-008, -2.6822093e-007, -3.51123965e-008, 1, 3.53819075e-007, 2.6822093e-007, -3.53819075e-007, 1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 341 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 342 | local Part = xPart{Pack,0.564285755, 1.73571444, 0.200000003} Part.BrickColor = BrickColor.new('Dark orange') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, 1.50000012, 0.0714263916, 1, 3.51124925e-008, -2.6822093e-007, -3.51123965e-008, 1, 3.53819075e-007, 2.6822093e-007, -3.53819075e-007, 1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 343 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 0.714285672), Offset = v3(0, 0, 0)}
| |
| 344 | local Part = xPart{Pack,0.564285755, 1.73571444, 0.200000003} Part.BrickColor = BrickColor.new('Dark orange') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, 1.49999988, 0.0714321136, -1, 6.27284535e-008, 3.87430191e-007, 6.27285388e-008, 1, 2.26830267e-007, -3.87430163e-007, 2.26830295e-007, -1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 345 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 0.714285672), Offset = v3(0, 0, 0)}
| |
| 346 | local Part = xPart{Pack,0.54285717, 0.657142937, 1.02857149} Part.BrickColor = BrickColor.new('Dark orange') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, 2.81071377, 1.02857208, -1, 0, 8.74227695e-008, 0, 1, 0, -8.74227695e-008, 0, -1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 347 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 348 | local Part = xPart{Pack,0.864285767, 0.657142937, 1.02857149} Part.BrickColor = BrickColor.new('Dark orange') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, 2.48571396, -1.96071529, 1, -4.47536763e-009, -5.65906291e-008, -5.65906291e-008, -1.58996982e-023, -1, 4.47536763e-009, 1, -2.53263884e-016) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 349 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 350 | local Part = xPart{Pack,0.864285767, 0.657142937, 1.02857149} Part.BrickColor = BrickColor.new('Dark orange') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, 2.48571205, -1.96071529, -1, -1.90377425e-009, 5.96046377e-008, 5.96046377e-008, 6.53269716e-010, 1, -1.90377425e-009, 1, -6.53269605e-010) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 351 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 352 | Blade = xPart{Pack,0.285714328, 12.2071428, 2.38571548} Blade.BrickColor = BrickColor.new('Smoky grey') Handle.Material = Enum.Material.Plastic xWeld(Handle,Blade) LastMade.C1 = CFrame.new(0, -8.56428432, 0.649999619, 1, 0, 0, 0, 1, 0, 0, 0, 1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 353 | xNew{'BlockMesh',Blade,Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 354 | local Part = xPart{Pack,0.285714328, 0.949999154, 1.8714298} Part.BrickColor = BrickColor.new('Smoky grey') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, -4.22142696, 1.4642868, -1, 0, -5.96046377e-008, 0, 1, 0, 5.96046377e-008, 0, -1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 355 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 356 | local Part = xPart{Pack,0.285714328, 0.949999154, 1.8714298} Part.BrickColor = BrickColor.new('Smoky grey') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, -5.22142696, 1.4642868, -1, 0, -5.96046377e-008, 0, 1, 0, 5.96046377e-008, 0, -1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 357 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 358 | local Part = xPart{Pack,0.285714328, 0.949999154, 1.8714298} Part.BrickColor = BrickColor.new('Smoky grey') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, -6.22142696, 1.4642868, -1, 0, -5.96046377e-008, 0, 1, 0, 5.96046377e-008, 0, -1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 359 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 360 | local Part = xPart{Pack,0.285714328, 0.949999154, 1.8714298} Part.BrickColor = BrickColor.new('Smoky grey') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, -7.22142696, 1.4642868, -1, 0, -5.96046377e-008, 0, 1, 0, 5.96046377e-008, 0, -1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 361 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 362 | local Part = xPart{Pack,0.285714328, 0.949999154, 1.8714298} Part.BrickColor = BrickColor.new('Smoky grey') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, -11.221427, 1.4642868, -1, 0, -5.96046377e-008, 0, 1, 0, 5.96046377e-008, 0, -1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 363 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 364 | local Part = xPart{Pack,0.285714328, 0.949999154, 1.8714298} Part.BrickColor = BrickColor.new('Smoky grey') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, -8.22142696, 1.4642868, -1, 0, -5.96046377e-008, 0, 1, 0, 5.96046377e-008, 0, -1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 365 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 366 | local Part = xPart{Pack,0.285714328, 0.949999154, 1.8714298} Part.BrickColor = BrickColor.new('Smoky grey') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, -9.22142696, 1.4642868, -1, 0, -5.96046377e-008, 0, 1, 0, 5.96046377e-008, 0, -1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 367 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 368 | local Part = xPart{Pack,0.285714328, 0.949999154, 1.8714298} Part.BrickColor = BrickColor.new('Smoky grey') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, -10.221427, 1.4642868, -1, 0, -5.96046377e-008, 0, 1, 0, 5.96046377e-008, 0, -1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 369 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 370 | local Part = xPart{Pack,0.285714328, 0.949999154, 1.8714298} Part.BrickColor = BrickColor.new('Smoky grey') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, -12.221427, 1.4642868, -1, 0, -5.96046377e-008, 0, 1, 0, 5.96046377e-008, 0, -1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 371 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 372 | local Part = xPart{Pack,0.285714328, 0.949999154, 1.8714298} Part.BrickColor = BrickColor.new('Smoky grey') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, -13.2214279, 1.4642868, -1, 0, -5.96046377e-008, 0, 1, 0, 5.96046377e-008, 0, -1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 373 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 374 | local Part = xPart{Pack,0.285714328, 0.949999154, 2.01428699} Part.BrickColor = BrickColor.new('Smoky grey') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, 14.1928558, 1.5357151, 1, 1.06776947e-016, 2.85758261e-009, 1.39271539e-016, -1, -1.13713643e-008, 2.85758261e-009, 1.13713643e-008, -1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 375 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 376 | local Part = xPart{Pack,0.285714328, 0.949999154, 1.15714407} Part.BrickColor = BrickColor.new('Smoky grey') Handle.Material = Enum.Material.Plastic xWeld(Handle,Part) LastMade.C1 = CFrame.new(0, 14.1928558, 2.3214283, -1, 2.33221598e-009, 0, -2.33221553e-009, -1, -4.92687668e-010, 0, -4.92687668e-010, 1) LastMade.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
| |
| 377 | xNew{'SpecialMesh',Part,MeshType = Enum.MeshType.Wedge, MeshId = '', TextureId = '', Scale = v3(1, 1, 1), Offset = v3(0, 0, 0)}
| |
| 378 | end | |
| 379 | has = haw.C1 | |
| 380 | ||
| 381 | for _,v in pairs(Pack:GetChildren()) do | |
| 382 | v.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0) | |
| 383 | end | |
| 384 | -------------------------------------------------------- | |
| 385 | -------------------------------------------------------- | |
| 386 | -----------------------VARIABLES------------------------ | |
| 387 | -------------------------------------------------------- | |
| 388 | -------------------------------------------------------- | |
| 389 | State = 'Idle' | |
| 390 | FallTime = 0 | |
| 391 | Walk = 0 | |
| 392 | WalkReverse = false | |
| 393 | StompDB = false | |
| 394 | JumpDB = false | |
| 395 | -- | |
| 396 | function NewHitbox(Radius,Position) | |
| 397 | local Returning = {}
| |
| 398 | for _,v in pairs(workspace:GetChildren()) do | |
| 399 | if v~=Char and v:FindFirstChild('Humanoid') and v:FindFirstChild('Torso') then
| |
| 400 | local Mag = (v.Torso.Position - Position).magnitude | |
| 401 | if Mag < Radius then | |
| 402 | table.insert(Returning,v) | |
| 403 | end | |
| 404 | end | |
| 405 | end | |
| 406 | return Returning | |
| 407 | end | |
| 408 | -- | |
| 409 | function UpdateState() | |
| 410 | if (rp.Velocity*v3(1, 0, 1)).magnitude > 5 then | |
| 411 | if State == 'Idle' then State = 'Walking' end | |
| 412 | else | |
| 413 | if State == 'Walking' then State = 'Idle'; end | |
| 414 | end | |
| 415 | if WalkReverse then | |
| 416 | Walk = Walk - .5 | |
| 417 | else | |
| 418 | Walk = Walk + .5 | |
| 419 | end | |
| 420 | if Walk >= 10 then | |
| 421 | WalkReverse = true | |
| 422 | elseif Walk <= -10 then | |
| 423 | WalkReverse = false | |
| 424 | end | |
| 425 | end | |
| 426 | -- | |
| 427 | function JumpExplode() | |
| 428 | local Hit = NewHitbox(35,Char.Torso.Position) | |
| 429 | for _,v in pairs(Hit) do | |
| 430 | v.Humanoid.Health = v.Humanoid.Health - 15 | |
| 431 | if sit then | |
| 432 | v.Humanoid.Sit = true | |
| 433 | end | |
| 434 | end | |
| 435 | xSound('2233908',tr,1)
| |
| 436 | coroutine.wrap(function() | |
| 437 | local Explosion = xNew{'Part',Char,Anchored = true,CanCollide = false,FormFactor = 'Custom',BrickColor = bn('Earth green')}
| |
| 438 | local Mesh = xNew{'SpecialMesh', Explosion,MeshType = 'FileMesh', MeshId = 'http://www.roblox.com/asset/?id=20329976'}
| |
| 439 | Explosion.CFrame = Char.Torso.CFrame * cn(0,-20,0) | |
| 440 | Mesh.Scale = v3(1,7,1) | |
| 441 | repeat | |
| 442 | Mesh.Scale = Mesh.Scale + v3(1,0,1) | |
| 443 | Explosion.Transparency = Explosion.Transparency + .025 | |
| 444 | wait() | |
| 445 | until Explosion.Transparency >= 1 | |
| 446 | Explosion:Destroy() | |
| 447 | end)() | |
| 448 | end | |
| 449 | -- | |
| 450 | function Stomp() | |
| 451 | if State == 'Walking' or State == 'Idle' then | |
| 452 | if StompDB == false then | |
| 453 | StompDB = true | |
| 454 | State = 'Attacking' | |
| 455 | Human.WalkSpeed = 0 | |
| 456 | -- | |
| 457 | xSound('138186576',Char.Head,1)
| |
| 458 | for _=0,1,.05 do | |
| 459 | xlerp(tw,ts,.2) | |
| 460 | xlerp(hw,hs*ca(40,0,0)*cn(0,-1,-1.5),.2) | |
| 461 | xlerp(rlw,rls*ca(20,0,0),.2) | |
| 462 | xlerp(llw,lls*cn(0,-2,1.25),.2) | |
| 463 | xlerp(raw,ras*ca(20,0,-20)*cn(-.5,-.5,0),.2) | |
| 464 | xlerp(law,las*ca(20,0,0),.2) | |
| 465 | wait() | |
| 466 | end | |
| 467 | coroutine.wrap(function() | |
| 468 | local Explosion = xNew{'Part',Char,Anchored = true,CanCollide = false,FormFactor = 'Custom',BrickColor = bn('Earth green')}
| |
| 469 | local Mesh = xNew{'SpecialMesh', Explosion,MeshType = 'FileMesh', MeshId = 'http://www.roblox.com/asset/?id=3270017'}
| |
| 470 | Explosion.CFrame = rp.CFrame * cn(0,-7,0)*ca(90,0,0) | |
| 471 | Mesh.Scale = v3(5,5,10) | |
| 472 | repeat | |
| 473 | Mesh.Scale = Mesh.Scale + v3(2,2,.5) | |
| 474 | Explosion.Transparency = Explosion.Transparency + .01 | |
| 475 | wait() | |
| 476 | until Explosion.Transparency >= 1 | |
| 477 | Explosion:Destroy() | |
| 478 | end)() | |
| 479 | coroutine.wrap(function() | |
| 480 | local Already = {}
| |
| 481 | for i=1,50,2 do | |
| 482 | wait(.1) | |
| 483 | local Hit = NewHitbox(i*2,Char.Torso.Position) | |
| 484 | for _,v in pairs(Hit) do | |
| 485 | if not Already[v] then | |
| 486 | v.Humanoid.Health = v.Humanoid.Health - 30 | |
| 487 | if sit then | |
| 488 | v.Humanoid.Sit = true | |
| 489 | end | |
| 490 | Already[v] = true | |
| 491 | end | |
| 492 | end | |
| 493 | end | |
| 494 | end)() | |
| 495 | --attack | |
| 496 | for _=0,1,.05 do | |
| 497 | xlerp(tw,ts,.3) | |
| 498 | xlerp(hw,hs*ca(40,0,0)*cn(0,-1,-1.5),.3) | |
| 499 | xlerp(rlw,rls*ca(20,0,0),.3) | |
| 500 | xlerp(llw,lls*cn(0,0,1.25),.3) | |
| 501 | xlerp(raw,ras*ca(20,0,-20)*cn(-.5,-.5,0),.3) | |
| 502 | xlerp(law,las*ca(20,0,0),.3) | |
| 503 | wait() | |
| 504 | end | |
| 505 | State = 'Idle' | |
| 506 | Human.WalkSpeed = 7 | |
| 507 | coroutine.wrap(function() | |
| 508 | wait(15) | |
| 509 | StompDB = false | |
| 510 | end)() | |
| 511 | end | |
| 512 | end | |
| 513 | end | |
| 514 | -- | |
| 515 | function Charge() | |
| 516 | if State == 'Walking' or State == 'Idle' then | |
| 517 | State = 'Charge' | |
| 518 | for _, controller in pairs(game:GetService("ControllerService"):GetChildren()) do
| |
| 519 | controller.Parent = workspace | |
| 520 | end | |
| 521 | local function Exp() | |
| 522 | local Explosion = xNew{'Part',Char,Anchored = true,CanCollide = false,FormFactor = 'Custom',BrickColor = bn('White')}
| |
| 523 | local Mesh = xNew{'SpecialMesh', Explosion,MeshType = 'FileMesh', MeshId = 'http://www.roblox.com/asset/?id=20329976'}
| |
| 524 | Explosion.CFrame = rp.CFrame * cn(0,0,-15)*ca(70,0,0) | |
| 525 | Mesh.Scale = v3(1,6,1) | |
| 526 | repeat | |
| 527 | Mesh.Scale = Mesh.Scale + v3(1,.5,1) | |
| 528 | Explosion.Transparency = Explosion.Transparency + .05 | |
| 529 | wait() | |
| 530 | until Explosion.Transparency >= 1 | |
| 531 | Explosion:Destroy() | |
| 532 | end | |
| 533 | coroutine.wrap(function() | |
| 534 | wait(.25) | |
| 535 | Human.WalkSpeed = 60 | |
| 536 | for _=1, 10 do | |
| 537 | coroutine.wrap(Exp)() | |
| 538 | local Hit = NewHitbox(10,Char.Torso.Position) | |
| 539 | for _,v in pairs(Hit) do | |
| 540 | v.Humanoid.Health = v.Humanoid.Health - 20 | |
| 541 | end | |
| 542 | wait(.15) | |
| 543 | xSound('10730819',tr,.8)
| |
| 544 | end | |
| 545 | Human.WalkSpeed = 7 | |
| 546 | State = 'Idle' | |
| 547 | end)() | |
| 548 | -- | |
| 549 | for _=0,1,.05 do | |
| 550 | xlerp(tw,ts*ca(0,-90,0),.4) | |
| 551 | xlerp(hw,hs*ca(0,90,0),.4) | |
| 552 | xlerp(raw,ras*ca(-90,0,-90)*cn(0,-1,0),.4) | |
| 553 | xlerp(law,las*ca(0,0,40)*cn(1,-.5,0),.4) | |
| 554 | xlerp(rlw,rls*ca(0,0,10)*cn(1,0,0),.4) | |
| 555 | xlerp(llw,lls*ca(0,0,10)*cn(1,0,0),.4) | |
| 556 | wait() | |
| 557 | end | |
| 558 | -- | |
| 559 | end | |
| 560 | end | |
| 561 | function Combo() | |
| 562 | if State == 'Idle' or State == 'Walking' then | |
| 563 | State = 'Attacking' | |
| 564 | Human.WalkSpeed = 3 | |
| 565 | for _=0,1,.2 do | |
| 566 | xlerp(tw,ts*ca(0,20,0),.4) | |
| 567 | xlerp(hw,hs*ca(0,30,0),.4) | |
| 568 | xlerp(raw,ras*ca(0,180,-90)*cn(-1,-1,0),.4) | |
| 569 | xlerp(law,las*ca(0,0,40)*cn(1,-.5,0),.4) | |
| 570 | xlerp(rlw,rls*ca(20,0,0)*cn(0,0,-1),.4) | |
| 571 | xlerp(llw,lls*cn(0,0,1.25),.4) | |
| 572 | wait() | |
| 573 | end | |
| 574 | local Already = {}
| |
| 575 | xSound('231731980',tr,1.3)
| |
| 576 | for _=0,1,.1 do | |
| 577 | xlerp(tw,ts*ca(0,-30,0),.4) | |
| 578 | xlerp(hw,hs*ca(0,-50,0),.4) | |
| 579 | xlerp(raw,ras*ca(160,180,-130)*cn(2,-1,1),.4) | |
| 580 | xlerp(law,las*ca(0,0,40)*cn(1,-.5,0),.4) | |
| 581 | xlerp(rlw,rls*ca(20,0,0)*cn(0,0,-1),.4) | |
| 582 | xlerp(llw,lls*cn(0,0,1.25),.4) | |
| 583 | xlerp(haw,has*ca(40,0,0),.4) | |
| 584 | wait() | |
| 585 | local Hit = NewHitbox(15,(Blade.CFrame).p) | |
| 586 | for _,v in pairs(Hit) do | |
| 587 | if not Already[v] then | |
| 588 | v.Humanoid.Health = v.Humanoid.Health - 10 | |
| 589 | Already[v] = true | |
| 590 | end | |
| 591 | end | |
| 592 | end | |
| 593 | ----Combo2 | |
| 594 | for _=0,1,.2 do | |
| 595 | xlerp(tw,ts*ca(0,-35,0),.4) | |
| 596 | xlerp(haw,has,.4) | |
| 597 | xlerp(hw,hs*ca(0,-30,0),.4) | |
| 598 | xlerp(raw,ras*ca(-120,0,-70)*cn(1,-1,0),.4) | |
| 599 | xlerp(law,las*ca(0,0,40)*cn(1,-.5,0),.4) | |
| 600 | xlerp(rlw,rls*ca(20,0,0)*cn(0,0,-1),.4) | |
| 601 | xlerp(llw,lls*cn(0,0,1.25),.4) | |
| 602 | wait() | |
| 603 | end | |
| 604 | xSound('231731980',tr,1)
| |
| 605 | local Already = {}
| |
| 606 | for _=0,1,.1 do | |
| 607 | xlerp(tw,ts*ca(0,20,0),.4) | |
| 608 | xlerp(hw,hs*ca(0,30,0),.4) | |
| 609 | xlerp(raw,ras*ca(30,0,-90)*cn(0,-1,0),.4) | |
| 610 | xlerp(law,las*ca(0,0,40)*cn(1,-.5,0),.4) | |
| 611 | xlerp(rlw,rls*ca(20,0,0)*cn(0,0,-1),.4) | |
| 612 | xlerp(llw,lls*cn(0,0,1.25),.4) | |
| 613 | wait() | |
| 614 | local Hit = NewHitbox(15,(Blade.CFrame).p) | |
| 615 | for _,v in pairs(Hit) do | |
| 616 | if not Already[v] then | |
| 617 | v.Humanoid.Health = v.Humanoid.Health - 10 | |
| 618 | Already[v] = true | |
| 619 | end | |
| 620 | end | |
| 621 | end | |
| 622 | --Combo 3 | |
| 623 | for _=0,1,.1 do | |
| 624 | xlerp(tw,ts,.3) | |
| 625 | xlerp(hw,hs,.3) | |
| 626 | xlerp(haw,has,.3) | |
| 627 | xlerp(raw,ras*ca(-140,0,0)*cn(0,-1.5,0),.3) | |
| 628 | xlerp(law,las*ca(0,0,40)*cn(1,-.5,0),.3) | |
| 629 | xlerp(rlw,rls*ca(20,0,0)*cn(0,0,-1),.3) | |
| 630 | xlerp(llw,lls*cn(0,0,1.25),.4) | |
| 631 | wait() | |
| 632 | end | |
| 633 | xSound('231731980',tr,.8)
| |
| 634 | local Already = {}
| |
| 635 | for _=0,1,.1 do | |
| 636 | xlerp(tw,ts*ca(15,0,0)*cn(0,1.5,0),.4) | |
| 637 | xlerp(hw,hs,.4) | |
| 638 | xlerp(raw,ras*ca(-20,0,0)*cn(0,0,0),.4) | |
| 639 | xlerp(law,las*ca(0,0,40)*cn(1,-.5,0),.4) | |
| 640 | xlerp(haw,has*ca(20,0,0),.4) | |
| 641 | wait() | |
| 642 | local Hit = NewHitbox(10,(Blade.CFrame).p) | |
| 643 | for _,v in pairs(Hit) do | |
| 644 | if not Already[v] then | |
| 645 | v.Humanoid.Health = v.Humanoid.Health - 20 | |
| 646 | Already[v] = true | |
| 647 | end | |
| 648 | end | |
| 649 | end | |
| 650 | wait(.2) | |
| 651 | State = 'Idle' | |
| 652 | Human.WalkSpeed = 7 | |
| 653 | end | |
| 654 | end | |
| 655 | -- | |
| 656 | function SwordSlam() | |
| 657 | if State == 'Walking' or State == 'Idle' then | |
| 658 | State = 'Attacking' | |
| 659 | Human.WalkSpeed = 0 | |
| 660 | for _=0,1,.05 do | |
| 661 | xlerp(tw,ts,.2) | |
| 662 | xlerp(hw,hs,.2) | |
| 663 | xlerp(raw,ras*ca(-140,0,0)*cn(0,-1.5,0),.2) | |
| 664 | xlerp(law,las*ca(0,0,40)*cn(1,-.5,0),.2) | |
| 665 | xlerp(rlw,rls*ca(20,0,0)*cn(0,0,-1),.2) | |
| 666 | xlerp(llw,lls*cn(0,0,1.25),.2) | |
| 667 | wait() | |
| 668 | end | |
| 669 | coroutine.wrap(function() | |
| 670 | wait() | |
| 671 | xSound('10730819',tr,.5)
| |
| 672 | local Explosion = xNew{'Part',Char,Anchored = true,CanCollide = false,FormFactor = 'Custom',BrickColor = bn('dsasda')}
| |
| 673 | local Mesh = xNew{'SpecialMesh', Explosion,MeshType = 'FileMesh', MeshId = 'http://www.roblox.com/asset/?id=20329976'}
| |
| 674 | Explosion.CFrame = rp.CFrame * cn(0,-5,-20) | |
| 675 | Mesh.Scale = v3(1,5,1) | |
| 676 | repeat | |
| 677 | Mesh.Scale = Mesh.Scale + v3(1,1,1) | |
| 678 | Explosion.Transparency = Explosion.Transparency + .025 | |
| 679 | wait() | |
| 680 | until Explosion.Transparency >= 1 | |
| 681 | Explosion:Destroy() | |
| 682 | end)() | |
| 683 | for _=0,1,.15 do | |
| 684 | xlerp(tw,ts*ca(15,0,0)*cn(0,1.5,0),.4) | |
| 685 | xlerp(hw,hs,.4) | |
| 686 | xlerp(raw,ras*ca(-20,0,0)*cn(0,0,0),.4) | |
| 687 | xlerp(law,las*ca(0,0,40)*cn(1,-.5,0),.4) | |
| 688 | xlerp(haw,has*ca(20,0,0),.4) | |
| 689 | wait() | |
| 690 | end | |
| 691 | local Hit = NewHitbox(40,(rp.CFrame * cn(0,-5,-20)).p) | |
| 692 | for _,v in pairs(Hit) do | |
| 693 | v.Humanoid.Health = v.Humanoid.Health - 40 | |
| 694 | if sit then | |
| 695 | v.Humanoid.Sit = true | |
| 696 | end | |
| 697 | end | |
| 698 | wait(.5) | |
| 699 | State = 'Idle' | |
| 700 | Human.WalkSpeed = 7 | |
| 701 | end | |
| 702 | end | |
| 703 | -- | |
| 704 | Mouse.KeyDown:connect(function(key) | |
| 705 | if key == ' ' then | |
| 706 | if State == 'Walking' or State == 'Idle' then | |
| 707 | if JumpDB == false then | |
| 708 | JumpDB = true | |
| 709 | State = 'Jumping' | |
| 710 | Human.Jump = true | |
| 711 | Human.WalkSpeed = 50 | |
| 712 | wait(.5) | |
| 713 | State = 'Falling' | |
| 714 | coroutine.wrap(function() | |
| 715 | wait(5) | |
| 716 | JumpDB = false | |
| 717 | end)() | |
| 718 | end | |
| 719 | end | |
| 720 | elseif key == 'z' then | |
| 721 | Combo() | |
| 722 | elseif key == 'x' then | |
| 723 | Charge() | |
| 724 | elseif key == 'c' then | |
| 725 | SwordSlam() | |
| 726 | elseif key == 'v' then | |
| 727 | Stomp() | |
| 728 | end | |
| 729 | end) | |
| 730 | -- | |
| 731 | Human.Changed:connect(function() | |
| 732 | if State ~= 'Jumping' then | |
| 733 | Human.Jump = false | |
| 734 | end | |
| 735 | end) | |
| 736 | ||
| 737 | Human.FreeFalling:connect(function(a) | |
| 738 | if a then | |
| 739 | if State == 'Walking' or State == 'Idle' then | |
| 740 | State = 'Falling' | |
| 741 | end | |
| 742 | elseif State == 'Jumping' or State == 'Falling' then | |
| 743 | State = 'Idle' | |
| 744 | if FallTime > 10 then | |
| 745 | print('Boom!')
| |
| 746 | JumpExplode() | |
| 747 | end | |
| 748 | Human.WalkSpeed = 7 | |
| 749 | FallTime = 0 | |
| 750 | end | |
| 751 | end) | |
| 752 | -- | |
| 753 | wait(1) | |
| 754 | game:GetService('RunService').RenderStepped:connect(function()
| |
| 755 | UpdateState() | |
| 756 | if State == 'Jumping' or State == 'Falling' then | |
| 757 | FallTime = FallTime + .1 | |
| 758 | xlerp(tw,ts,.3) | |
| 759 | xlerp(hw,hs*ca(40,0,0)*cn(0,-1,-1.5),.2) | |
| 760 | xlerp(raw,ras*ca(0,0,-90)*cn(-1,-1,0),.2) | |
| 761 | xlerp(law,las*ca(0,0,90)*cn(1,-1,0),.2) | |
| 762 | xlerp(rlw,rls*ca(20,0,0),.2) | |
| 763 | xlerp(llw,lls*cn(0,-.5,1.25),.2) | |
| 764 | elseif State == 'Idle' then | |
| 765 | xlerp(tw,ts*ca(0,25,0),.1) | |
| 766 | xlerp(hw,hs*ca(0,-25,0),.1) | |
| 767 | xlerp(raw,ras*ca(20,0,-20)*cn(-.5,-.5,0),.1) | |
| 768 | xlerp(law,las*ca(20,0,0),.1) | |
| 769 | xlerp(rlw,rls*ca(20,0,0)*cn(0,0,-1),.1) | |
| 770 | xlerp(llw,lls*cn(0,0,1.25),.1) | |
| 771 | xlerp(haw,has,.4) | |
| 772 | elseif State == 'Walking' then | |
| 773 | xlerp(tw,ts,.15) | |
| 774 | xlerp(hw,hs,.15) | |
| 775 | --xlerp(law,las*ca(30,0,0),.3) | |
| 776 | --xlerp(raw,ras*ca(20,0,-40)*cn(-1,-.5,0),.15) | |
| 777 | xlerp(raw,ras*ca(20,0,-20)*cn(-.5,-.5,0),.1) | |
| 778 | xlerp(law,las*ca(20,0,0),.1) | |
| 779 | if WalkReverse then | |
| 780 | xlerp(rlw,rls*ca(30,0,0)*cn(0,-1,-1.5),.05) | |
| 781 | xlerp(llw,lls*ca(-30,0,0)*cn(0,-1,1.5),.05) | |
| 782 | else | |
| 783 | xlerp(rlw,rls*ca(-30,0,0)*cn(0,-1,1.5),.05) | |
| 784 | xlerp(llw,lls*ca(30,0,0)*cn(0,-1,-1.5),.05) | |
| 785 | end | |
| 786 | end | |
| 787 | end) | |
| 788 | -- | |
| 789 | Human.WalkSpeed = 7 | |
| 790 | Human.JumpPower = 250 | |
| 791 | Human.MaxHealth = 500 | |
| 792 | Human.Health = 500 | |
| 793 | print 'salty sieg loaded' |