Advertisement
madiik

[ROBLOX] get rekt frog

Dec 13th, 2014
2,083
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.85 KB | None | 0 0
  1.  
  2.     wait();
  3.      
  4.     local user=game:service'Players'.LocalPlayer;
  5.     local char=user.Character;
  6.     local hum=char.Humanoid;
  7.     local head=char.Head;
  8.      
  9.     for i,v in ipairs{user.Backpack,char}do
  10.             for i,v in ipairs(v:children())do
  11.                     if(v.Name=='ala_ball')then
  12.                             v:Destroy();
  13.                     end;
  14.             end;
  15.     end;
  16.      
  17.     local bin=Instance.new('HopperBin',user.Backpack);
  18.             bin.Name='mad_ball';
  19.             script.Parent=bin;
  20.            
  21.     local function raycasting(pos,dir)
  22.             local ray=Ray.new(pos,dir);
  23.             return workspace:FindPartOnRay(ray,char,false)or workspace:FindPartOnRay(ray,char,true);
  24.     end;
  25.  
  26.     local function HSV(H,S,V)
  27.         H = H % 360
  28.         local C = V * S
  29.         local H2 = H/60
  30.         local X = C * (1 - math.abs((H2 %2) -1))
  31.         local color = Color3.new(0,0,0)
  32.         if H2 <= 0 then
  33.         color = Color3.new(C,0,0)
  34.         elseif 0 <= H2 and H2 <= 1 then
  35.         color = Color3.new(C,X,0)
  36.         elseif 1 <= H2 and H2 <= 2 then
  37.         color = Color3.new(X,C,0)
  38.         elseif 2 <= H2 and H2 <= 3 then
  39.         color = Color3.new(0,C,X)
  40.         elseif 3 <= H2 and H2 <= 4 then
  41.         color = Color3.new(0,X,C)
  42.         elseif 4 <= H2 and H2 <= 5 then
  43.         color = Color3.new(X,0,C)
  44.         elseif 5 <= H2 and H2 <= 6 then
  45.         color = Color3.new(C,0,X)
  46.         end
  47.         local m = V - C
  48.         return Color3.new(color.r + m, color.g + m, color.b + m)
  49.     end
  50.      
  51.     bin.Selected:connect(function(mouse)
  52.         local hue = 0
  53.         local colur = 0
  54.             local keys={};
  55.            
  56.             mouse.KeyDown:connect(function(key)
  57.                     keys[key]=true;
  58.             end);
  59.            
  60.             mouse.KeyUp:connect(function(key)
  61.                     keys[key]=false;
  62.             end);
  63.  
  64.             game:service'SoundService'.DistanceFactor = 50
  65.             game:service'SoundService'.DopplerScale=0
  66.            
  67.             local speed=7;
  68.             local max_speed=150;
  69.  
  70.             hum.MaxHealth = math.huge
  71.            
  72.             local part=Instance.new'Part';
  73.                     part.Shape=0;
  74.                     part.Friction=10;
  75.                     part.Elasticity=1;
  76.                     part.TopSurface=0;
  77.                     part.FormFactor=0;
  78.                     part.Anchored=true;
  79.                     part.BottomSurface=0;
  80.                     part.Name='ala_ball';
  81.                     part.CanCollide=false;
  82.                     part.Transparency=1;
  83.                     part.CFrame=head.CFrame;
  84.                     part.Size=Vector3.new(10,10,10);
  85.                     part.Parent=char;
  86.             local weld=Instance.new('Weld',part);
  87.                     weld.Part0=part;
  88.                     weld.Part1=head;
  89.                     part.Anchored=false;
  90.                     part.CanCollide=true;
  91.                     hum.PlatformStand=true;
  92.             local sound=Instance.new('Sound',head);
  93.                     sound.SoundId='rbxassetid://177078299';
  94.                     sound.Volume=1;
  95.                     sound.Looped=true;
  96.                     sound:play();
  97.                     for i,v in ipairs(char:children()) do
  98.                         if v:IsA'Part' then
  99.                             v.Transparency=1;
  100.                         end
  101.                     end
  102.                     local PointLight = Instance.new('PointLight',head)
  103.                     PointLight.Range = 20
  104.                     local bbg = Instance.new('BillboardGui',head)
  105.                     bbg.Adornee=head
  106.                     bbg.Size=UDim2.new(8,0,8,0)
  107.                     local img = Instance.new('ImageLabel',bbg)
  108.                     img.BackgroundTransparency=1
  109.                     img.Size=UDim2.new(1,0,1,0)
  110.                     img.Image='rbxassetid://185945467'
  111.             coroutine.wrap(function()
  112.                 while (part.Parent) do
  113.                     pcall(function()
  114.                         img.Image='rbxassetid://185945467'
  115.                     end)
  116.                     wait()
  117.                     pcall(function()
  118.                         img.Image='rbxassetid://185945486'
  119.                     end)
  120.                     wait()
  121.                     pcall(function()
  122.                         img.Image='rbxassetid://185945493'
  123.                     end)
  124.                     wait()
  125.                     pcall(function()
  126.                         img.Image='rbxassetid://185945515'
  127.                     end)
  128.                     wait()
  129.                     pcall(function()
  130.                         img.Image='rbxassetid://185945527'
  131.                     end)
  132.                     wait()
  133.                     pcall(function()
  134.                         img.Image='rbxassetid://185945553'
  135.                     end)
  136.                     wait()
  137.                     pcall(function()
  138.                         img.Image='rbxassetid://185945573'
  139.                     end)
  140.                     wait()
  141.                     pcall(function()
  142.                         img.Image='rbxassetid://185945586'
  143.                     end)
  144.                     wait()
  145.                     pcall(function()
  146.                         img.Image='rbxassetid://185945612'
  147.                     end)
  148.                     wait()
  149.                     pcall(function()
  150.                         img.Image='rbxassetid://185945634'
  151.                     end)
  152.                     wait()
  153.                 end
  154.             end)()
  155.             while(part.Parent)do
  156.                     if(keys[' ']and raycasting(part.Position,Vector3.new(0,-10,0)))then
  157.                             part.Velocity=part.Velocity+Vector3.new(0,30,0);
  158.                     end;
  159.                    
  160.                     if(keys.w or keys.a or keys.s or keys.d)then
  161.                             local r=-math.pi/2;
  162.                            
  163.                             if(keys.s)then
  164.                                     r=r-math.pi;
  165.                             end;
  166.                            
  167.                             if(keys.a)then
  168.                                     if(keys.w)then
  169.                                             r=r-math.pi/4;
  170.                                     elseif(keys.s)then
  171.                                             r=r+math.pi/4;
  172.                                     else
  173.                                             r=r-math.pi/2;
  174.                                     end;
  175.                             end;
  176.                            
  177.                             if(keys.d)then
  178.                                     if(keys.w)then
  179.                                             r=r+math.pi/4;
  180.                                     elseif(keys.s)then
  181.                                             r=r-math.pi/4;
  182.                                     else
  183.                                             r=r+math.pi/2;
  184.                                     end;
  185.                             end;
  186.                    
  187.                             local cam=workspace.CurrentCamera;
  188.                             local crd=cam.CoordinateFrame;
  189.                             local dir=(crd.lookVector*Vector3.new(1,0,1)).unit;
  190.                                     local x=dir.x;
  191.                                     local z=dir.z;
  192.                             local dir=Vector3.new(
  193.                                     math.cos(r)*x-math.sin(r)*z,
  194.                                     0,
  195.                                     math.sin(r)*x+math.cos(r)*z
  196.                             );
  197.                             part.RotVelocity=dir*speed;
  198.                             speed=math.min(max_speed,speed+2/speed);
  199.                     else
  200.                             speed=math.min(math.abs(part.Velocity.magnitude/5),max_speed);
  201.                     end;
  202.                     wait();
  203.                     hue = ((hue+25)%360)
  204.                     colur = HSV(hue,1,1)
  205.                     PointLight.Color = Color3.new(colur.r,colur.g,colur.b)
  206.             end;
  207.             pcall(function()
  208.                 bbg:Destroy()
  209.             end)
  210.             pcall(function()
  211.                 sound:Destroy()
  212.             end)
  213.             pcall(function()
  214.                 PointLight:Destroy()
  215.             end)
  216.  
  217.     end);
  218.      
  219.     bin.Deselected:connect(function()
  220.             hum.PlatformStand=false;
  221.             for i,v in ipairs(char:children())do
  222.                     if(v.Name=='ala_ball')then
  223.                             v:Destroy();
  224.                     end;
  225.             end;
  226.             for i,v in ipairs(char:children()) do
  227.                     if v:IsA'Part' then
  228.                         v.Transparency=0;
  229.                     end
  230.             end
  231.             hum.MaxHealth = 100
  232.             char:findFirstChild'HumanoidRootPart'.Transparency=1
  233.             game:service'SoundService'.DistanceFactor = 10
  234.         game:service'SoundService'.DopplerScale=1
  235.     end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement